summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-03-10 02:11:43 +0100
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-03-10 02:11:43 +0100
commit854bb322bf9e20f1c5afe5e8a796ebeca238fa95 (patch)
tree4f74269f08ab4697caf96dd6ffa1a144c22e28f4
parent776883cb80be675fad1fee1ffae5dcdb75f14f64 (diff)
tests/feature_check/int_big: Rework "big int" detection.
MICROPY_LONGINT_IMPL_LONGLONG doesn't have overflow detection, so just parsing a large number won't give an error, we need to print it out to check that the whole number was parsed.
-rw-r--r--tests/feature_check/int_big.py2
-rw-r--r--tests/feature_check/int_big.py.exp1
-rwxr-xr-xtests/run-tests2
3 files changed, 3 insertions, 2 deletions
diff --git a/tests/feature_check/int_big.py b/tests/feature_check/int_big.py
index 8b82814ae..f30285a98 100644
--- a/tests/feature_check/int_big.py
+++ b/tests/feature_check/int_big.py
@@ -1,2 +1,2 @@
# Check whether arbitrary-precision integers (MPZ) are supported
-1000000000000000000000000000000000000000000000
+print(1000000000000000000000000000000000000000000000)
diff --git a/tests/feature_check/int_big.py.exp b/tests/feature_check/int_big.py.exp
index e69de29bb..9dfe3354d 100644
--- a/tests/feature_check/int_big.py.exp
+++ b/tests/feature_check/int_big.py.exp
@@ -0,0 +1 @@
+1000000000000000000000000000000000000000000000
diff --git a/tests/run-tests b/tests/run-tests
index bacaebea8..6a78c2764 100755
--- a/tests/run-tests
+++ b/tests/run-tests
@@ -209,7 +209,7 @@ def run_tests(pyb, tests, args):
# Check if arbitrary-precision integers are supported, and skip such tests if it's not
native = run_micropython(pyb, args, 'feature_check/int_big.py')
- if native == b'CRASH':
+ if native != b'1000000000000000000000000000000000000000000000\n':
skip_int_big = True
# Check if set type (and set literals) is supported, and skip such tests if it's not