From 3ab6aa3a6d0506e805caa19369bef279c1c789b4 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sat, 4 Mar 2017 00:13:27 +0300 Subject: tests/basic: Split tests into working with small ints and not working. Tests which don't work with small ints are suffixed with _intbig.py. Some of these may still work with long long ints and need to be reclassified later. --- tests/basics/builtin_abs_intbig.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/basics/builtin_abs_intbig.py (limited to 'tests/basics/builtin_abs_intbig.py') diff --git a/tests/basics/builtin_abs_intbig.py b/tests/basics/builtin_abs_intbig.py new file mode 100644 index 000000000..3dd5ea89f --- /dev/null +++ b/tests/basics/builtin_abs_intbig.py @@ -0,0 +1,9 @@ +# test builtin abs + +# bignum +print(abs(123456789012345678901234567890)) +print(abs(-123456789012345678901234567890)) + +# edge cases for 32 and 64 bit archs (small int overflow when negating) +print(abs(-0x3fffffff - 1)) +print(abs(-0x3fffffffffffffff - 1)) -- cgit v1.2.3