summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBung <crc32@qq.com>2020-12-13 11:52:38 +0800
committerGitHub <noreply@github.com>2020-12-13 11:52:38 +0800
commit5514b299ebc1de4ef0c1c182d4f21a02e3c2fa90 (patch)
tree3aa5b836e1704f3e68a0851025ab0b4e10de0644
parent5a58440ebe4ba794f0127ebb6ad33824a92dfb58 (diff)
downloadNim-5514b299ebc1de4ef0c1c182d4f21a02e3c2fa90.tar.gz
add testcase for #15937 (#15933)
* test for issue #15624 and PR #15915 for patch #13823

* Update thashes.nim

no need mention PR #15915, fixed in https://github.com/nim-lang/Nim/pull/15937

* rebase to devel(issue maybe fixed), ignore ouputs

* Apply suggestions from code review

Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
-rw-r--r--tests/stdlib/thashes.nim6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/stdlib/thashes.nim b/tests/stdlib/thashes.nim
index d155111ff..92154825e 100644
--- a/tests/stdlib/thashes.nim
+++ b/tests/stdlib/thashes.nim
@@ -1,3 +1,7 @@
+discard """
+  targets: '''c c++ js'''
+"""
+
 import hashes
 
 block hashes:
@@ -13,8 +17,10 @@ block hashes:
   # "VM and runtime should make the same hash value (hashWangYi1)"
   block:
     const wy123 = hashWangYi1(123)
+    doAssert wy123 != 0
     doAssert hashWangYi1(123) == wy123
 
+
   # "hashIdentity value incorrect at 456"
   block:
     doAssert hashIdentity(456) == 456