mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 01:14:41 +00:00
* fix #16256: nimout: <empty> should give error (vacuously true); improve some tests * renamed: tests/stdlib/t9710.nim -> tests/misc/t9710.nim * improve tests * fix non-DRY tests * improve $nim_prs_D/tests/stdlib/t9091.nim * renamed: tests/stdlib/t9091.nim -> tests/misc/t9091.nim * fixup * address comment: doAssert => result.parseErrors
26 lines
582 B
Nim
26 lines
582 B
Nim
import std/nativesockets
|
|
import stdtest/testutils
|
|
|
|
block:
|
|
let hostname = getHostname()
|
|
doAssert hostname.len > 0
|
|
|
|
when defined(windows):
|
|
assertAll:
|
|
toInt(IPPROTO_IP) == 0
|
|
toInt(IPPROTO_ICMP) == 1
|
|
toInt(IPPROTO_TCP) == 6
|
|
toInt(IPPROTO_UDP) == 17
|
|
toInt(IPPROTO_IPV6) == 41
|
|
toInt(IPPROTO_ICMPV6) == 58
|
|
toInt(IPPROTO_RAW) == 20
|
|
|
|
# no changes to enum value
|
|
ord(IPPROTO_TCP) == 6
|
|
ord(IPPROTO_UDP) == 17
|
|
ord(IPPROTO_IP) == 18
|
|
ord(IPPROTO_IPV6) == 19
|
|
ord(IPPROTO_RAW) == 20
|
|
ord(IPPROTO_ICMP) == 21
|
|
ord(IPPROTO_ICMPV6) == 22
|