mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 05:50:30 +00:00
* Update winlean.nim * Update tnet_ll.nim
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user