tests/basics: Modify int-big tests to prevent constant folding.

So that these tests test the runtime behaviour, not the compiler (which may
be executed offline).
pull/3691/merge
Damien George 2018-04-04 13:57:22 +10:00
rodzic f684e9e1ab
commit 7d5c753b17
2 zmienionych plików z 6 dodań i 3 usunięć

Wyświetl plik

@ -3,5 +3,7 @@ print(i >> 1)
print(i >> 1000)
# result needs rounding up
print(-(1<<70) >> 80)
print(-0xffffffffffffffff >> 32)
i = -(1 << 70)
print(i >> 80)
i = -0xffffffffffffffff
print(i >> 32)

Wyświetl plik

@ -19,7 +19,8 @@ print((-a) ^ (1 << 100))
print((-a) ^ (1 << 200))
print((-a) ^ a == 0)
print(bool((-a) ^ a))
print(-1 ^ 0xffffffffffffffff) # carry overflows to higher digit
i = -1
print(i ^ 0xffffffffffffffff) # carry overflows to higher digit
# test + -