diff options
Diffstat (limited to 'tests/system')
-rw-r--r-- | tests/system/tdollars.nim | 8 | ||||
-rw-r--r-- | tests/system/tensuremove.nim | 2 | ||||
-rw-r--r-- | tests/system/tsystem_misc.nim | 13 |
3 files changed, 18 insertions, 5 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/tensuremove.nim b/tests/system/tensuremove.nim index 52d9a43a8..668d5aed1 100644 --- a/tests/system/tensuremove.nim +++ b/tests/system/tensuremove.nim @@ -1,5 +1,5 @@ discard """ - target: "c js" + targets: "c js" matrix: "--cursorinference:on; --cursorinference:off" """ diff --git a/tests/system/tsystem_misc.nim b/tests/system/tsystem_misc.nim index 7f5914725..1debb7c48 100644 --- a/tests/system/tsystem_misc.nim +++ b/tests/system/tsystem_misc.nim @@ -212,3 +212,16 @@ block: doAssert not compiles(echo p.rawProc.repr) doAssert not compiles(echo p.rawEnv.repr) doAssert not compiles(echo p.finished) + +proc bug23223 = # bug #23223 + var stuff = "hello" + stuff.insert "" + 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 |