Fix hex tests for 64-bit machines.

This commit is contained in:
Guido van Rossum 1997-05-14 21:37:23 +00:00
parent 8cd70c3555
commit c1c96d1b5c

View File

@ -208,7 +208,9 @@ def f(): pass
print 'hex' print 'hex'
if hex(16) != '0x10': raise TestFailed, 'hex(16)' if hex(16) != '0x10': raise TestFailed, 'hex(16)'
if hex(16L) != '0x10L': raise TestFailed, 'hex(16L)' if hex(16L) != '0x10L': raise TestFailed, 'hex(16L)'
if hex(-16) != '0xfffffff0': raise TestFailed, 'hex(-16)' if len(hex(-1)) != len(hex(sys.maxint)): raise TestFailed, 'len(hex(-1))'
if hex(-16) not in ('0xfffffff0', '0xfffffffffffffff0'):
raise TestFailed, 'hex(-16)'
if hex(-16L) != '-0x10L': raise TestFailed, 'hex(-16L)' if hex(-16L) != '-0x10L': raise TestFailed, 'hex(-16L)'
print 'id' print 'id'