From 8c3858b01623f9527b57b13c44ff97c67bafb00b Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 19 Jan 2014 18:41:55 +0200 Subject: Move tests in basic/tests/ up one level preparating to multiple test dirs. --- tests/basics/int-small.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/basics/int-small.py (limited to 'tests/basics/int-small.py') diff --git a/tests/basics/int-small.py b/tests/basics/int-small.py new file mode 100644 index 0000000000..be338c4a4c --- /dev/null +++ b/tests/basics/int-small.py @@ -0,0 +1,26 @@ +# This test small int range for 32-bit machine + +a = 0x3fffff +print(a) +a *= 0x10 +print(a) +a *= 0x10 +print(a) +a += 0xff +print(a) +# This would overflow +#a += 1 + +a = -0x3fffff +print(a) +a *= 0x10 +print(a) +a *= 0x10 +print(a) +a -= 0xff +print(a) +# This still doesn't overflow +a -= 1 +print(a) +# This would overflow +#a -= 1 -- cgit v1.2.3