summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_grammar.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_grammar.py')
-rw-r--r--Lib/test/test_grammar.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py
index c57bbed..6666c13 100644
--- a/Lib/test/test_grammar.py
+++ b/Lib/test/test_grammar.py
@@ -39,20 +39,20 @@ except ImportError:
if maxint == 2147483647:
# The following test will start to fail in Python 2.4;
# change the 020000000000 to -020000000000
- if -2147483647-1 != 020000000000: raise TestFailed, 'max negative int'
+ if -2147483647-1 != -020000000000: raise TestFailed, 'max negative int'
# XXX -2147483648
- if 037777777777 != -1: raise TestFailed, 'oct -1'
- if 0xffffffff != -1: raise TestFailed, 'hex -1'
+ if 037777777777 < 0: raise TestFailed, 'large oct'
+ if 0xffffffff < 0: raise TestFailed, 'large hex'
for s in '2147483648', '040000000000', '0x100000000':
try:
x = eval(s)
except OverflowError:
print "OverflowError on huge integer literal " + `s`
elif eval('maxint == 9223372036854775807'):
- if eval('-9223372036854775807-1 != 01000000000000000000000'):
+ if eval('-9223372036854775807-1 != -01000000000000000000000'):
raise TestFailed, 'max negative int'
- if eval('01777777777777777777777') != -1: raise TestFailed, 'oct -1'
- if eval('0xffffffffffffffff') != -1: raise TestFailed, 'hex -1'
+ if eval('01777777777777777777777') < 0: raise TestFailed, 'large oct'
+ if eval('0xffffffffffffffff') < 0: raise TestFailed, 'large hex'
for s in '9223372036854775808', '02000000000000000000000', \
'0x10000000000000000':
try: