* Update winlean.nim * Update tnet_ll.nim
This commit is contained in:
parent
609388e33f
commit
5ddaf3e1fb
2 changed files with 7 additions and 1 deletions
|
|
@ -26,6 +26,7 @@ suite "inet_ntop tests":
|
|||
# regular
|
||||
var ip4 = InAddr()
|
||||
ip4.s_addr = 0x10111213'u32
|
||||
check: ip4.s_addr == 0x10111213'u32
|
||||
|
||||
var buff: array[0..255, char]
|
||||
let r = inet_ntop(AF_INET, cast[pointer](ip4.s_addr.addr), buff[0].addr, buff.len.int32)
|
||||
|
|
@ -43,3 +44,8 @@ suite "inet_ntop tests":
|
|||
let r = inet_ntop(AF_INET6, cast[pointer](ip6[0].addr), buff[0].addr, buff.len.int32)
|
||||
let res = if r == nil: "" else: $r
|
||||
check: not ipv6Support or res == "10:110:20:120:30:130:40:140"
|
||||
|
||||
test "InAddr":
|
||||
# issue 19244
|
||||
var ip4 = InAddr(s_addr: 0x10111213'u32)
|
||||
check: ip4.s_addr == 0x10111213'u32
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue