From 31897750123be5671a48dc5cd511a070afa4eb02 Mon Sep 17 00:00:00 2001 From: andri lim Date: Wed, 16 Oct 2019 18:53:57 +0700 Subject: [PATCH] fixes 32bit failure --- tests/test_io.nim | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/test_io.nim b/tests/test_io.nim index 1011ee1..e9b9d35 100644 --- a/tests/test_io.nim +++ b/tests/test_io.nim @@ -173,8 +173,9 @@ template testIO(chk, tst: untyped) = nativeStuint(chk, high(int64), 64) when sizeof(uint) == 4: - nativeStuint(chk, high(uint), 32) - nativeStuint(chk, low(uint), 32) + when (NimMajor, NimMinor, NimPatch) >= (1, 0, 0): + nativeStuint(chk, high(uint), 32) + nativeStuint(chk, low(uint), 32) nativeStuint(chk, high(int), 32) else: when (NimMajor, NimMinor, NimPatch) >= (1, 0, 0): @@ -254,7 +255,8 @@ template testIO(chk, tst: untyped) = when sizeof(uint) == 4: nativeStint(chk, high(int), 32) nativeStint(chk, low(int), 32) - nativeStint(chk, low(uint), 32) + when (NimMajor, NimMinor, NimPatch) >= (1, 0, 0): + nativeStint(chk, low(uint), 32) else: nativeStint(chk, high(int), 64) nativeStint(chk, low(int), 64)