Fix 32bit issues in tests.

This commit is contained in:
cheatfate 2021-03-02 20:18:44 +02:00
parent 1b94fe21dd
commit a61baae44c
No known key found for this signature in database
GPG Key ID: 46ADD633A7201F95
2 changed files with 6 additions and 3 deletions

View File

@ -1 +1,4 @@
switch("threads", "on")
# The compiler doth protest too much, methinks, about all these cases where it can't
# do its (N)RVO pass: https://github.com/nim-lang/RFCs/issues/230
switch("warning", "ObservableStores:off")

View File

@ -24,7 +24,7 @@ proc decodeString*(t: typedesc[GenericType[int]],
if parseSaturatedNatural(value, v) == 0:
err("Unable to decode decimal string")
else:
if v == high(int64):
if v == high(int):
err("Integer overflow")
else:
ok(GenericType[int](data: v))
@ -51,7 +51,7 @@ proc decodeString*(t: typedesc[CustomType1],
if parseSaturatedNatural(res, v) == 0:
err("Unable to decode decimal string")
else:
if v == high(int64):
if v == high(int):
err("Integer overflow")
else:
ok(CustomType1(kind: CustomKind.Level1, level1: v))
@ -73,7 +73,7 @@ proc decodeString*(t: typedesc[int], value: string): RestResult[int] =
if parseSaturatedNatural(value, v) == 0:
err("Unable to decode decimal string")
else:
if v == high(int64):
if v == high(int):
err("Integer overflow")
else:
ok(v)