code cleanup
This commit is contained in:
parent
beae8a4283
commit
2bae744c5c
|
@ -40,10 +40,9 @@ proc buildBinary(name: string, srcDir = "./", params = "", lang = "c") =
|
|||
try:
|
||||
exec(cmd)
|
||||
finally:
|
||||
if defined(macosx):
|
||||
if defined(macosx):
|
||||
renameFile(newVersionFile, oldVersionFile)
|
||||
|
||||
|
||||
proc test(name: string, srcDir = "tests/", params = "", lang = "c") =
|
||||
buildBinary name, srcDir, params
|
||||
exec "build/" & name
|
||||
|
|
|
@ -90,4 +90,4 @@ proc getAddressAndPort*(ma: MultiAddress): tuple[ip: Option[ValidIpAddress], por
|
|||
|
||||
result = (ip: ip, port: port)
|
||||
except Exception:
|
||||
result = (ip: none(ValidIpAddress), port: none(Port))
|
||||
result = (ip: none(ValidIpAddress), port: none(Port))
|
||||
|
|
|
@ -43,4 +43,4 @@ suite "NAT Address Tests":
|
|||
|
||||
# Verify results
|
||||
check(discoveryAddrs == expectedDiscoveryAddrs)
|
||||
check(libp2pAddrs == expectedlibp2pAddrs)
|
||||
check(libp2pAddrs == expectedlibp2pAddrs)
|
||||
|
|
Loading…
Reference in New Issue