std/hashes: hash(ref|ptr|pointer) + other improvements (#17731)

This commit is contained in:
Timothee Cour 2021-04-16 05:21:26 -07:00 • committed by GitHub
commit d19e4310dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 96 additions and 36 deletions

View file

@ -3,7 +3,7 @@ discard """
"""
import std/strutils
from stdtest/testutils import disableVm
# xxx each instance of `disableVm` and `when not defined js:` should eventually be fixed
template rejectParse(e) =
@ -12,10 +12,6 @@ template rejectParse(e) =
raise newException(AssertionDefect, "This was supposed to fail: $#!" % astToStr(e))
except ValueError: discard
template disableVm(body) =
when nimvm: discard
else: body
template main() =
block: # strip
doAssert strip(" ha ") == "ha"