Move tests in basic/tests/ up one level preparating to multiple test dirs.
This commit is contained in:
26
tests/basics/int-small.py
Normal file
26
tests/basics/int-small.py
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user