This commit is contained in:
flywind
2021-01-02 10:13:01 -06:00
committed by GitHub
parent b8775bff57
commit e869767aa7
2 changed files with 16 additions and 5 deletions

View File

@@ -86,8 +86,13 @@ block largeSize: # longer than 4 characters
doAssert hash(xx, 0, 3) == hash(ssl, 0, 3)
proc main() =
doAssert hash(0.0) == hash(0)
when sizeof(int) == 8:
doAssert hash(cstring"abracadabra") == 97309975
doAssert hash(cstring"abracadabra") == hash("abracadabra")
when sizeof(int) == 8 or defined(js):
block:
var s: seq[Hash]
for a in [0.0, 1.0, -1.0, 1000.0, -1000.0]: