44 lines
1.5 KiB
Plaintext
44 lines
1.5 KiB
Plaintext
Make sure that we correctly handle octal literals
|
|
|
|
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
|
|
|
|
|
|
PASS 0o0 is 0
|
|
PASS 0o1 is 1
|
|
PASS 0O1 is 1
|
|
PASS 0o000000000000 is 0
|
|
PASS 0O8 threw exception SyntaxError: No octal digits after '0o'.
|
|
PASS 0oa threw exception SyntaxError: No octal digits after '0o'.
|
|
PASS 0o0.0 threw exception SyntaxError: Unexpected number '.0'. Parse error..
|
|
PASS x=0o1y=42 threw exception SyntaxError: No space between octal literal and identifier.
|
|
PASS 0o12 is 0xa
|
|
PASS 0o110642547 is 0x01234567
|
|
PASS 0o21152746757 is 0x89abcdef
|
|
FAIL 0o70000000000000000000000000000000000000000000000000000000 should be 3.00300673152188e+256. Was 3.2737636676212225e+50.
|
|
PASS 0o377777777777777776 is 9007199254740990
|
|
PASS 0o377777777777777777 is 9007199254740991
|
|
PASS 0o777777777777777776 is 18014398509481982
|
|
PASS 0o777777777777777777 is 18014398509481984
|
|
PASS !!0o1 is true
|
|
PASS !!0o0 is false
|
|
PASS Number('0o0') is 0
|
|
PASS Number('0o1') is 1
|
|
PASS Number('0O1') is 1
|
|
PASS Number('0o00000000000000000') is 0
|
|
PASS Number('0O8') is NaN
|
|
PASS Number('0oa') is NaN
|
|
PASS Number('0o0.0') is NaN
|
|
PASS Number('0o77') is 0x3f
|
|
PASS Number('0o110642547') is 0x01234567
|
|
PASS Number('0o21152746757') is 0x89abcdef
|
|
PASS Number('0o377777777777777776') is 9007199254740990
|
|
PASS Number('0o377777777777777777') is 9007199254740991
|
|
PASS Number('0o777777777777777776') is 18014398509481982
|
|
PASS Number('0o777777777777777777') is 18014398509481984
|
|
PASS !!Number('0o1') is true
|
|
PASS !!Number('0o0') is false
|
|
PASS successfullyParsed is true
|
|
|
|
TEST COMPLETE
|
|
|