From ddfa6c608a6c2a843d7b405f377a22703947267a Mon Sep 17 00:00:00 2001 From: Mamy Ratsimbazafy Date: Thu, 13 Jan 2022 12:04:26 +0100 Subject: [PATCH] Fix 32-bit failure on Nim 1.6 (#116) * Nim 1.6 compiletime can now be affected by https://github.com/status-im/nim-stint/issues/92 ? * seems like it happens on runtime too --- tests/test_int_addsub.nim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_int_addsub.nim b/tests/test_int_addsub.nim index 110d770..e659cf0 100644 --- a/tests/test_int_addsub.nim +++ b/tests/test_int_addsub.nim @@ -228,7 +228,10 @@ template testAddSub(chk, tst: untyped) = chkNegation(chk, 127, -127, 128) chkNegation(chk, 32768, -32768, 128) chkNegation(chk, 32767, -32767, 128) - chkNegation(chk, 2147483648, -2147483648, 128) + # With Nim 1.6, it seems like https://github.com/status-im/nim-stint/issues/92 + # can now happen on 32-bit platforms. + when (NimMajor,NimMinor,NimPatch) < (1,6,0): + chkNegation(chk, 2147483648, -2147483648, 128) chkNegation(chk, 2147483647, -2147483647, 128) #chkNegation(chk, 9223372036854775808, -9223372036854775808, 128) # TODO: bug #92