| OLD | NEW |
| (Empty) |
| 1 This test checks that object literals are serialized properly. It's needed in pa
rt because JavaScriptCore converts numeric property names to string and back. | |
| 2 | |
| 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | |
| 4 | |
| 5 | |
| 6 PASS compileAndSerialize('a = { 1: null }') is 'a = { 1: null }' | |
| 7 PASS compileAndSerialize('a = { 0: null }') is 'a = { 0: null }' | |
| 8 PASS compileAndSerialize('a = { 1.0: null }') is 'a = { 1.0: null }' | |
| 9 PASS compileAndSerialize('a = { "1.0": null }') is 'a = { "1.0": null }' | |
| 10 PASS compileAndSerialize('a = { 1e-500: null }') is 'a = { 1e-500: null }' | |
| 11 PASS compileAndSerialize('a = { 1e-300: null }') is 'a = { 1e-300: null }' | |
| 12 PASS compileAndSerialize('a = { 1e300: null }') is 'a = { 1e300: null }' | |
| 13 PASS compileAndSerialize('a = { 1e500: null }') is 'a = { 1e500: null }' | |
| 14 PASS compileAndSerialize('a = { NaN: null }') is 'a = { NaN: null }' | |
| 15 PASS compileAndSerialize('a = { Infinity: null }') is 'a = { Infinity: null }' | |
| 16 PASS compileAndSerialize('a = { "1": null }') is 'a = { "1": null }' | |
| 17 PASS compileAndSerialize('a = { "1hi": null }') is 'a = { "1hi": null }' | |
| 18 PASS compileAndSerialize('a = { "\'": null }') is 'a = { "\'": null }' | |
| 19 PASS compileAndSerialize('a = { "\\"": null }') is 'a = { "\\"": null }' | |
| 20 PASS compileAndSerialize('a = { get x() { } }') is 'a = { get x() { } }' | |
| 21 PASS compileAndSerialize('a = { set x(y) { } }') is 'a = { set x(y) { } }' | |
| 22 PASS compileAndSerialize('a = { --1: null }') threw exception SyntaxError: Unexp
ected token '--'. | |
| 23 PASS compileAndSerialize('a = { -NaN: null }') threw exception SyntaxError: Unex
pected token '-'. | |
| 24 PASS compileAndSerialize('a = { -0: null }') threw exception SyntaxError: Unexpe
cted token '-'. | |
| 25 PASS compileAndSerialize('a = { -0.0: null }') threw exception SyntaxError: Unex
pected token '-'. | |
| 26 PASS compileAndSerialize('a = { -Infinity: null }') threw exception SyntaxError:
Unexpected token '-'. | |
| 27 PASS successfullyParsed is true | |
| 28 | |
| 29 TEST COMPLETE | |
| 30 | |
| OLD | NEW |