diff options
Diffstat (limited to 'tests/system')
-rw-r--r-- | tests/system/tdollars.nim | 8 | ||||
-rw-r--r-- | tests/system/tsystem_misc.nim | 6 |
2 files changed, 10 insertions, 4 deletions
diff --git a/tests/system/tdollars.nim b/tests/system/tdollars.nim index 39337cca7..eabee81b3 100644 --- a/tests/system/tdollars.nim +++ b/tests/system/tdollars.nim @@ -1,5 +1,5 @@ discard """ - matrix: "--mm:refc; --mm:orc; --backend:cpp; --backend:js --jsbigint64:off; --backend:js --jsbigint64:on" + matrix: "--mm:refc; --mm:orc; --backend:cpp; --backend:js --jsbigint64:off -d:nimStringHash2; --backend:js --jsbigint64:on" """ #[ @@ -109,10 +109,10 @@ block: # if `uint8(a1)` changes meaning to `cast[uint8](a1)` in future, update this test; # until then, this is the correct semantics. let a3 = $a2 - doAssert a2 < 3 - doAssert a3 == "-1" + doAssert a2 == 255'u8 + doAssert a3 == "255" proc intToStr(a: uint8): cstring {.importjs: "(# + \"\")".} - doAssert $intToStr(a2) == "-1" + doAssert $intToStr(a2) == "255" else: block: let x = -1'i8 diff --git a/tests/system/tsystem_misc.nim b/tests/system/tsystem_misc.nim index c8e2b2a9d..1debb7c48 100644 --- a/tests/system/tsystem_misc.nim +++ b/tests/system/tsystem_misc.nim @@ -219,3 +219,9 @@ proc bug23223 = # bug #23223 doAssert stuff == "hello" bug23223() + +block: # bug #23894 + let v = high(uint) div 2 + let s = v + 1 # 9223372036854775808 + let m = succ v + doAssert s == m |