diff options
Diffstat (limited to 'test/built-ins/JSON/parse')
24 files changed, 406 insertions, 399 deletions
diff --git a/test/built-ins/JSON/parse/15.12.1.1-0-1.js b/test/built-ins/JSON/parse/15.12.1.1-0-1.js index d1bb9eecd..6134ce18f 100644 --- a/test/built-ins/JSON/parse/15.12.1.1-0-1.js +++ b/test/built-ins/JSON/parse/15.12.1.1-0-1.js @@ -7,5 +7,5 @@ description: The JSON lexical grammar treats whitespace as a token seperator ---*/ assert.throws(SyntaxError, function() { - JSON.parse('12\t\r\n 34'); // should produce a syntax error as whitespace results in two tokens + JSON.parse('12\t\r\n 34'); // should produce a syntax error as whitespace results in two tokens }); diff --git a/test/built-ins/JSON/parse/15.12.1.1-0-2.js b/test/built-ins/JSON/parse/15.12.1.1-0-2.js index 8254a4d62..e2e3f87e1 100644 --- a/test/built-ins/JSON/parse/15.12.1.1-0-2.js +++ b/test/built-ins/JSON/parse/15.12.1.1-0-2.js @@ -9,5 +9,5 @@ description: > ---*/ assert.throws(SyntaxError, function() { - JSON.parse('\u000b1234'); // should produce a syntax error + JSON.parse('\u000b1234'); // should produce a syntax error }); diff --git a/test/built-ins/JSON/parse/15.12.1.1-0-3.js b/test/built-ins/JSON/parse/15.12.1.1-0-3.js index fb213cb00..32fe77231 100644 --- a/test/built-ins/JSON/parse/15.12.1.1-0-3.js +++ b/test/built-ins/JSON/parse/15.12.1.1-0-3.js @@ -9,5 +9,5 @@ description: > ---*/ assert.throws(SyntaxError, function() { - JSON.parse('\u000c1234'); // should produce a syntax error + JSON.parse('\u000c1234'); // should produce a syntax error }); diff --git a/test/built-ins/JSON/parse/15.12.1.1-0-4.js b/test/built-ins/JSON/parse/15.12.1.1-0-4.js index 34b31816c..879335aa1 100644 --- a/test/built-ins/JSON/parse/15.12.1.1-0-4.js +++ b/test/built-ins/JSON/parse/15.12.1.1-0-4.js @@ -9,5 +9,5 @@ description: > ---*/ assert.throws(SyntaxError, function() { - JSON.parse('\u00a01234'); // should produce a syntax error + JSON.parse('\u00a01234'); // should produce a syntax error }); diff --git a/test/built-ins/JSON/parse/15.12.1.1-0-5.js b/test/built-ins/JSON/parse/15.12.1.1-0-5.js index e18222fd2..59aff18b6 100644 --- a/test/built-ins/JSON/parse/15.12.1.1-0-5.js +++ b/test/built-ins/JSON/parse/15.12.1.1-0-5.js @@ -9,5 +9,5 @@ description: > ---*/ assert.throws(SyntaxError, function() { - JSON.parse('\u200b1234'); // should produce a syntax error + JSON.parse('\u200b1234'); // should produce a syntax error }); diff --git a/test/built-ins/JSON/parse/15.12.1.1-0-6.js b/test/built-ins/JSON/parse/15.12.1.1-0-6.js index cfaf7d050..ff2889373 100644 --- a/test/built-ins/JSON/parse/15.12.1.1-0-6.js +++ b/test/built-ins/JSON/parse/15.12.1.1-0-6.js @@ -9,5 +9,5 @@ description: > ---*/ assert.throws(SyntaxError, function() { - JSON.parse('\ufeff1234'); // should produce a syntax error a + JSON.parse('\ufeff1234'); // should produce a syntax error a }); diff --git a/test/built-ins/JSON/parse/15.12.1.1-0-8.js b/test/built-ins/JSON/parse/15.12.1.1-0-8.js index fa7bb87b3..d342003b9 100644 --- a/test/built-ins/JSON/parse/15.12.1.1-0-8.js +++ b/test/built-ins/JSON/parse/15.12.1.1-0-8.js @@ -9,5 +9,5 @@ description: > ---*/ assert.throws(SyntaxError, function() { - JSON.parse('\u2028\u20291234'); // should produce a syntax error + JSON.parse('\u2028\u20291234'); // should produce a syntax error }); diff --git a/test/built-ins/JSON/parse/15.12.1.1-0-9.js b/test/built-ins/JSON/parse/15.12.1.1-0-9.js index e669bb290..5deb8a581 100644 --- a/test/built-ins/JSON/parse/15.12.1.1-0-9.js +++ b/test/built-ins/JSON/parse/15.12.1.1-0-9.js @@ -6,8 +6,8 @@ es5id: 15.12.1.1-0-9 description: Whitespace characters can appear before/after any JSONtoken ---*/ - JSON.parse('\t\r \n{\t\r \n'+ - '"property"\t\r \n:\t\r \n{\t\r \n}\t\r \n,\t\r \n' + - '"prop2"\t\r \n:\t\r \n'+ - '[\t\r \ntrue\t\r \n,\t\r \nnull\t\r \n,123.456\t\r \n]'+ - '\t\r \n}\t\r \n'); // should JOSN parse without error +JSON.parse('\t\r \n{\t\r \n' + + '"property"\t\r \n:\t\r \n{\t\r \n}\t\r \n,\t\r \n' + + '"prop2"\t\r \n:\t\r \n' + + '[\t\r \ntrue\t\r \n,\t\r \nnull\t\r \n,123.456\t\r \n]' + + '\t\r \n}\t\r \n'); // should JOSN parse without error diff --git a/test/built-ins/JSON/parse/15.12.2-0-1.js b/test/built-ins/JSON/parse/15.12.2-0-1.js index 7d3cc1d3e..2bb777949 100644 --- a/test/built-ins/JSON/parse/15.12.2-0-1.js +++ b/test/built-ins/JSON/parse/15.12.2-0-1.js @@ -17,6 +17,6 @@ es5id: 15.12.2-0-1 description: JSON.parse must exist as a function ---*/ - var f = JSON.parse; +var f = JSON.parse; assert.sameValue(typeof(f), "function", 'typeof(f)'); diff --git a/test/built-ins/JSON/parse/15.12.2-0-2.js b/test/built-ins/JSON/parse/15.12.2-0-2.js index 40ebfdb2f..fe9569381 100644 --- a/test/built-ins/JSON/parse/15.12.2-0-2.js +++ b/test/built-ins/JSON/parse/15.12.2-0-2.js @@ -17,7 +17,7 @@ es5id: 15.12.2-0-2 description: JSON.parse must exist as a function taking 2 parameters ---*/ - var f = JSON.parse; +var f = JSON.parse; assert.sameValue(typeof(f), "function", 'typeof(f)'); assert.sameValue(f.length, 2, 'f.length'); diff --git a/test/built-ins/JSON/parse/15.12.2-0-3.js b/test/built-ins/JSON/parse/15.12.2-0-3.js index 068cf69fc..de7d3f825 100644 --- a/test/built-ins/JSON/parse/15.12.2-0-3.js +++ b/test/built-ins/JSON/parse/15.12.2-0-3.js @@ -10,7 +10,7 @@ es5id: 15.12.2-0-3 description: JSON.parse must be deletable (configurable) ---*/ - var o = JSON; - var desc = Object.getOwnPropertyDescriptor(o, "parse"); +var o = JSON; +var desc = Object.getOwnPropertyDescriptor(o, "parse"); assert.sameValue(desc.configurable, true, 'desc.configurable'); diff --git a/test/built-ins/JSON/parse/15.12.2-2-1.js b/test/built-ins/JSON/parse/15.12.2-2-1.js index a2a42946f..d307ad6d0 100644 --- a/test/built-ins/JSON/parse/15.12.2-2-1.js +++ b/test/built-ins/JSON/parse/15.12.2-2-1.js @@ -8,42 +8,42 @@ description: > character ---*/ - var nullChars = new Array(); - nullChars[0] = '\"\u0000\"'; - nullChars[1] = '\"\u0001\"'; - nullChars[2] = '\"\u0002\"'; - nullChars[3] = '\"\u0003\"'; - nullChars[4] = '\"\u0004\"'; - nullChars[5] = '\"\u0005\"'; - nullChars[6] = '\"\u0006\"'; - nullChars[7] = '\"\u0007\"'; - nullChars[8] = '\"\u0008\"'; - nullChars[9] = '\"\u0009\"'; - nullChars[10] = '\"\u000A\"'; - nullChars[11] = '\"\u000B\"'; - nullChars[12] = '\"\u000C\"'; - nullChars[13] = '\"\u000D\"'; - nullChars[14] = '\"\u000E\"'; - nullChars[15] = '\"\u000F\"'; - nullChars[16] = '\"\u0010\"'; - nullChars[17] = '\"\u0011\"'; - nullChars[18] = '\"\u0012\"'; - nullChars[19] = '\"\u0013\"'; - nullChars[20] = '\"\u0014\"'; - nullChars[21] = '\"\u0015\"'; - nullChars[22] = '\"\u0016\"'; - nullChars[23] = '\"\u0017\"'; - nullChars[24] = '\"\u0018\"'; - nullChars[25] = '\"\u0019\"'; - nullChars[26] = '\"\u001A\"'; - nullChars[27] = '\"\u001B\"'; - nullChars[28] = '\"\u001C\"'; - nullChars[29] = '\"\u001D\"'; - nullChars[30] = '\"\u001E\"'; - nullChars[31] = '\"\u001F\"'; +var nullChars = new Array(); +nullChars[0] = '\"\u0000\"'; +nullChars[1] = '\"\u0001\"'; +nullChars[2] = '\"\u0002\"'; +nullChars[3] = '\"\u0003\"'; +nullChars[4] = '\"\u0004\"'; +nullChars[5] = '\"\u0005\"'; +nullChars[6] = '\"\u0006\"'; +nullChars[7] = '\"\u0007\"'; +nullChars[8] = '\"\u0008\"'; +nullChars[9] = '\"\u0009\"'; +nullChars[10] = '\"\u000A\"'; +nullChars[11] = '\"\u000B\"'; +nullChars[12] = '\"\u000C\"'; +nullChars[13] = '\"\u000D\"'; +nullChars[14] = '\"\u000E\"'; +nullChars[15] = '\"\u000F\"'; +nullChars[16] = '\"\u0010\"'; +nullChars[17] = '\"\u0011\"'; +nullChars[18] = '\"\u0012\"'; +nullChars[19] = '\"\u0013\"'; +nullChars[20] = '\"\u0014\"'; +nullChars[21] = '\"\u0015\"'; +nullChars[22] = '\"\u0016\"'; +nullChars[23] = '\"\u0017\"'; +nullChars[24] = '\"\u0018\"'; +nullChars[25] = '\"\u0019\"'; +nullChars[26] = '\"\u001A\"'; +nullChars[27] = '\"\u001B\"'; +nullChars[28] = '\"\u001C\"'; +nullChars[29] = '\"\u001D\"'; +nullChars[30] = '\"\u001E\"'; +nullChars[31] = '\"\u001F\"'; - for (var index in nullChars) { - assert.throws(SyntaxError, function() { - var obj = JSON.parse('{ ' + nullChars[index] + ' : "John" } '); - }); - } +for (var index in nullChars) { + assert.throws(SyntaxError, function() { + var obj = JSON.parse('{ ' + nullChars[index] + ' : "John" } '); + }); +} diff --git a/test/built-ins/JSON/parse/15.12.2-2-10.js b/test/built-ins/JSON/parse/15.12.2-2-10.js index 0f3c73ac1..24f298c88 100644 --- a/test/built-ins/JSON/parse/15.12.2-2-10.js +++ b/test/built-ins/JSON/parse/15.12.2-2-10.js @@ -8,42 +8,42 @@ description: > null character ---*/ - var nullChars = new Array(); - nullChars[0] = '\"\u0000\"'; - nullChars[1] = '\"\u0001\"'; - nullChars[2] = '\"\u0002\"'; - nullChars[3] = '\"\u0003\"'; - nullChars[4] = '\"\u0004\"'; - nullChars[5] = '\"\u0005\"'; - nullChars[6] = '\"\u0006\"'; - nullChars[7] = '\"\u0007\"'; - nullChars[8] = '\"\u0008\"'; - nullChars[9] = '\"\u0009\"'; - nullChars[10] = '\"\u000A\"'; - nullChars[11] = '\"\u000B\"'; - nullChars[12] = '\"\u000C\"'; - nullChars[13] = '\"\u000D\"'; - nullChars[14] = '\"\u000E\"'; - nullChars[15] = '\"\u000F\"'; - nullChars[16] = '\"\u0010\"'; - nullChars[17] = '\"\u0011\"'; - nullChars[18] = '\"\u0012\"'; - nullChars[19] = '\"\u0013\"'; - nullChars[20] = '\"\u0014\"'; - nullChars[21] = '\"\u0015\"'; - nullChars[22] = '\"\u0016\"'; - nullChars[23] = '\"\u0017\"'; - nullChars[24] = '\"\u0018\"'; - nullChars[25] = '\"\u0019\"'; - nullChars[26] = '\"\u001A\"'; - nullChars[27] = '\"\u001B\"'; - nullChars[28] = '\"\u001C\"'; - nullChars[29] = '\"\u001D\"'; - nullChars[30] = '\"\u001E\"'; - nullChars[31] = '\"\u001F\"'; +var nullChars = new Array(); +nullChars[0] = '\"\u0000\"'; +nullChars[1] = '\"\u0001\"'; +nullChars[2] = '\"\u0002\"'; +nullChars[3] = '\"\u0003\"'; +nullChars[4] = '\"\u0004\"'; +nullChars[5] = '\"\u0005\"'; +nullChars[6] = '\"\u0006\"'; +nullChars[7] = '\"\u0007\"'; +nullChars[8] = '\"\u0008\"'; +nullChars[9] = '\"\u0009\"'; +nullChars[10] = '\"\u000A\"'; +nullChars[11] = '\"\u000B\"'; +nullChars[12] = '\"\u000C\"'; +nullChars[13] = '\"\u000D\"'; +nullChars[14] = '\"\u000E\"'; +nullChars[15] = '\"\u000F\"'; +nullChars[16] = '\"\u0010\"'; +nullChars[17] = '\"\u0011\"'; +nullChars[18] = '\"\u0012\"'; +nullChars[19] = '\"\u0013\"'; +nullChars[20] = '\"\u0014\"'; +nullChars[21] = '\"\u0015\"'; +nullChars[22] = '\"\u0016\"'; +nullChars[23] = '\"\u0017\"'; +nullChars[24] = '\"\u0018\"'; +nullChars[25] = '\"\u0019\"'; +nullChars[26] = '\"\u001A\"'; +nullChars[27] = '\"\u001B\"'; +nullChars[28] = '\"\u001C\"'; +nullChars[29] = '\"\u001D\"'; +nullChars[30] = '\"\u001E\"'; +nullChars[31] = '\"\u001F\"'; - for (var index in nullChars) { - assert.throws(SyntaxError, function() { - var obj = JSON.parse('{ "name" : ' + "Jo" + nullChars[index] + "hn" + ' } '); - }); - } +for (var index in nullChars) { + assert.throws(SyntaxError, function() { + var obj = JSON.parse('{ "name" : ' + "Jo" + nullChars[index] + "hn" + ' } '); + }); +} diff --git a/test/built-ins/JSON/parse/15.12.2-2-2.js b/test/built-ins/JSON/parse/15.12.2-2-2.js index d577d5b76..6af5601ae 100644 --- a/test/built-ins/JSON/parse/15.12.2-2-2.js +++ b/test/built-ins/JSON/parse/15.12.2-2-2.js @@ -8,42 +8,42 @@ description: > null character ---*/ - var nullChars = new Array(); - nullChars[0] = '\"\u0000\"'; - nullChars[1] = '\"\u0001\"'; - nullChars[2] = '\"\u0002\"'; - nullChars[3] = '\"\u0003\"'; - nullChars[4] = '\"\u0004\"'; - nullChars[5] = '\"\u0005\"'; - nullChars[6] = '\"\u0006\"'; - nullChars[7] = '\"\u0007\"'; - nullChars[8] = '\"\u0008\"'; - nullChars[9] = '\"\u0009\"'; - nullChars[10] = '\"\u000A\"'; - nullChars[11] = '\"\u000B\"'; - nullChars[12] = '\"\u000C\"'; - nullChars[13] = '\"\u000D\"'; - nullChars[14] = '\"\u000E\"'; - nullChars[15] = '\"\u000F\"'; - nullChars[16] = '\"\u0010\"'; - nullChars[17] = '\"\u0011\"'; - nullChars[18] = '\"\u0012\"'; - nullChars[19] = '\"\u0013\"'; - nullChars[20] = '\"\u0014\"'; - nullChars[21] = '\"\u0015\"'; - nullChars[22] = '\"\u0016\"'; - nullChars[23] = '\"\u0017\"'; - nullChars[24] = '\"\u0018\"'; - nullChars[25] = '\"\u0019\"'; - nullChars[26] = '\"\u001A\"'; - nullChars[27] = '\"\u001B\"'; - nullChars[28] = '\"\u001C\"'; - nullChars[29] = '\"\u001D\"'; - nullChars[30] = '\"\u001E\"'; - nullChars[31] = '\"\u001F\"'; +var nullChars = new Array(); +nullChars[0] = '\"\u0000\"'; +nullChars[1] = '\"\u0001\"'; +nullChars[2] = '\"\u0002\"'; +nullChars[3] = '\"\u0003\"'; +nullChars[4] = '\"\u0004\"'; +nullChars[5] = '\"\u0005\"'; +nullChars[6] = '\"\u0006\"'; +nullChars[7] = '\"\u0007\"'; +nullChars[8] = '\"\u0008\"'; +nullChars[9] = '\"\u0009\"'; +nullChars[10] = '\"\u000A\"'; +nullChars[11] = '\"\u000B\"'; +nullChars[12] = '\"\u000C\"'; +nullChars[13] = '\"\u000D\"'; +nullChars[14] = '\"\u000E\"'; +nullChars[15] = '\"\u000F\"'; +nullChars[16] = '\"\u0010\"'; +nullChars[17] = '\"\u0011\"'; +nullChars[18] = '\"\u0012\"'; +nullChars[19] = '\"\u0013\"'; +nullChars[20] = '\"\u0014\"'; +nullChars[21] = '\"\u0015\"'; +nullChars[22] = '\"\u0016\"'; +nullChars[23] = '\"\u0017\"'; +nullChars[24] = '\"\u0018\"'; +nullChars[25] = '\"\u0019\"'; +nullChars[26] = '\"\u001A\"'; +nullChars[27] = '\"\u001B\"'; +nullChars[28] = '\"\u001C\"'; +nullChars[29] = '\"\u001D\"'; +nullChars[30] = '\"\u001E\"'; +nullChars[31] = '\"\u001F\"'; - for (var index in nullChars) { - assert.throws(SyntaxError, function() { - var obj = JSON.parse('{ ' + nullChars[index] + "name" + ' : "John" } '); - }); - } +for (var index in nullChars) { + assert.throws(SyntaxError, function() { + var obj = JSON.parse('{ ' + nullChars[index] + "name" + ' : "John" } '); + }); +} diff --git a/test/built-ins/JSON/parse/15.12.2-2-3.js b/test/built-ins/JSON/parse/15.12.2-2-3.js index 20f19e1b2..0bd6dc9e9 100644 --- a/test/built-ins/JSON/parse/15.12.2-2-3.js +++ b/test/built-ins/JSON/parse/15.12.2-2-3.js @@ -8,42 +8,42 @@ description: > null character ---*/ - var nullChars = new Array(); - nullChars[0] = '\"\u0000\"'; - nullChars[1] = '\"\u0001\"'; - nullChars[2] = '\"\u0002\"'; - nullChars[3] = '\"\u0003\"'; - nullChars[4] = '\"\u0004\"'; - nullChars[5] = '\"\u0005\"'; - nullChars[6] = '\"\u0006\"'; - nullChars[7] = '\"\u0007\"'; - nullChars[8] = '\"\u0008\"'; - nullChars[9] = '\"\u0009\"'; - nullChars[10] = '\"\u000A\"'; - nullChars[11] = '\"\u000B\"'; - nullChars[12] = '\"\u000C\"'; - nullChars[13] = '\"\u000D\"'; - nullChars[14] = '\"\u000E\"'; - nullChars[15] = '\"\u000F\"'; - nullChars[16] = '\"\u0010\"'; - nullChars[17] = '\"\u0011\"'; - nullChars[18] = '\"\u0012\"'; - nullChars[19] = '\"\u0013\"'; - nullChars[20] = '\"\u0014\"'; - nullChars[21] = '\"\u0015\"'; - nullChars[22] = '\"\u0016\"'; - nullChars[23] = '\"\u0017\"'; - nullChars[24] = '\"\u0018\"'; - nullChars[25] = '\"\u0019\"'; - nullChars[26] = '\"\u001A\"'; - nullChars[27] = '\"\u001B\"'; - nullChars[28] = '\"\u001C\"'; - nullChars[29] = '\"\u001D\"'; - nullChars[30] = '\"\u001E\"'; - nullChars[31] = '\"\u001F\"'; +var nullChars = new Array(); +nullChars[0] = '\"\u0000\"'; +nullChars[1] = '\"\u0001\"'; +nullChars[2] = '\"\u0002\"'; +nullChars[3] = '\"\u0003\"'; +nullChars[4] = '\"\u0004\"'; +nullChars[5] = '\"\u0005\"'; +nullChars[6] = '\"\u0006\"'; +nullChars[7] = '\"\u0007\"'; +nullChars[8] = '\"\u0008\"'; +nullChars[9] = '\"\u0009\"'; +nullChars[10] = '\"\u000A\"'; +nullChars[11] = '\"\u000B\"'; +nullChars[12] = '\"\u000C\"'; +nullChars[13] = '\"\u000D\"'; +nullChars[14] = '\"\u000E\"'; +nullChars[15] = '\"\u000F\"'; +nullChars[16] = '\"\u0010\"'; +nullChars[17] = '\"\u0011\"'; +nullChars[18] = '\"\u0012\"'; +nullChars[19] = '\"\u0013\"'; +nullChars[20] = '\"\u0014\"'; +nullChars[21] = '\"\u0015\"'; +nullChars[22] = '\"\u0016\"'; +nullChars[23] = '\"\u0017\"'; +nullChars[24] = '\"\u0018\"'; +nullChars[25] = '\"\u0019\"'; +nullChars[26] = '\"\u001A\"'; +nullChars[27] = '\"\u001B\"'; +nullChars[28] = '\"\u001C\"'; +nullChars[29] = '\"\u001D\"'; +nullChars[30] = '\"\u001E\"'; +nullChars[31] = '\"\u001F\"'; - for (var index in nullChars) { - assert.throws(SyntaxError, function() { - var obj = JSON.parse('{' + "name" + nullChars[index] + ' : "John" } '); - }); - } +for (var index in nullChars) { + assert.throws(SyntaxError, function() { + var obj = JSON.parse('{' + "name" + nullChars[index] + ' : "John" } '); + }); +} diff --git a/test/built-ins/JSON/parse/15.12.2-2-4.js b/test/built-ins/JSON/parse/15.12.2-2-4.js index 755f4578f..819f7160f 100644 --- a/test/built-ins/JSON/parse/15.12.2-2-4.js +++ b/test/built-ins/JSON/parse/15.12.2-2-4.js @@ -8,42 +8,42 @@ description: > with a null character ---*/ - var nullChars = new Array(); - nullChars[0] = '\"\u0000\"'; - nullChars[1] = '\"\u0001\"'; - nullChars[2] = '\"\u0002\"'; - nullChars[3] = '\"\u0003\"'; - nullChars[4] = '\"\u0004\"'; - nullChars[5] = '\"\u0005\"'; - nullChars[6] = '\"\u0006\"'; - nullChars[7] = '\"\u0007\"'; - nullChars[8] = '\"\u0008\"'; - nullChars[9] = '\"\u0009\"'; - nullChars[10] = '\"\u000A\"'; - nullChars[11] = '\"\u000B\"'; - nullChars[12] = '\"\u000C\"'; - nullChars[13] = '\"\u000D\"'; - nullChars[14] = '\"\u000E\"'; - nullChars[15] = '\"\u000F\"'; - nullChars[16] = '\"\u0010\"'; - nullChars[17] = '\"\u0011\"'; - nullChars[18] = '\"\u0012\"'; - nullChars[19] = '\"\u0013\"'; - nullChars[20] = '\"\u0014\"'; - nullChars[21] = '\"\u0015\"'; - nullChars[22] = '\"\u0016\"'; - nullChars[23] = '\"\u0017\"'; - nullChars[24] = '\"\u0018\"'; - nullChars[25] = '\"\u0019\"'; - nullChars[26] = '\"\u001A\"'; - nullChars[27] = '\"\u001B\"'; - nullChars[28] = '\"\u001C\"'; - nullChars[29] = '\"\u001D\"'; - nullChars[30] = '\"\u001E\"'; - nullChars[31] = '\"\u001F\"'; +var nullChars = new Array(); +nullChars[0] = '\"\u0000\"'; +nullChars[1] = '\"\u0001\"'; +nullChars[2] = '\"\u0002\"'; +nullChars[3] = '\"\u0003\"'; +nullChars[4] = '\"\u0004\"'; +nullChars[5] = '\"\u0005\"'; +nullChars[6] = '\"\u0006\"'; +nullChars[7] = '\"\u0007\"'; +nullChars[8] = '\"\u0008\"'; +nullChars[9] = '\"\u0009\"'; +nullChars[10] = '\"\u000A\"'; +nullChars[11] = '\"\u000B\"'; +nullChars[12] = '\"\u000C\"'; +nullChars[13] = '\"\u000D\"'; +nullChars[14] = '\"\u000E\"'; +nullChars[15] = '\"\u000F\"'; +nullChars[16] = '\"\u0010\"'; +nullChars[17] = '\"\u0011\"'; +nullChars[18] = '\"\u0012\"'; +nullChars[19] = '\"\u0013\"'; +nullChars[20] = '\"\u0014\"'; +nullChars[21] = '\"\u0015\"'; +nullChars[22] = '\"\u0016\"'; +nullChars[23] = '\"\u0017\"'; +nullChars[24] = '\"\u0018\"'; +nullChars[25] = '\"\u0019\"'; +nullChars[26] = '\"\u001A\"'; +nullChars[27] = '\"\u001B\"'; +nullChars[28] = '\"\u001C\"'; +nullChars[29] = '\"\u001D\"'; +nullChars[30] = '\"\u001E\"'; +nullChars[31] = '\"\u001F\"'; - for (var index in nullChars) { - assert.throws(SyntaxError, function() { - var obj = JSON.parse('{' + nullChars[index] + "name" + nullChars[index] + ' : "John" } '); - }); - } +for (var index in nullChars) { + assert.throws(SyntaxError, function() { + var obj = JSON.parse('{' + nullChars[index] + "name" + nullChars[index] + ' : "John" } '); + }); +} diff --git a/test/built-ins/JSON/parse/15.12.2-2-5.js b/test/built-ins/JSON/parse/15.12.2-2-5.js index 1b0a6240b..ebd3e27be 100644 --- a/test/built-ins/JSON/parse/15.12.2-2-5.js +++ b/test/built-ins/JSON/parse/15.12.2-2-5.js @@ -8,42 +8,42 @@ description: > null character ---*/ - var nullChars = new Array(); - nullChars[0] = '\"\u0000\"'; - nullChars[1] = '\"\u0001\"'; - nullChars[2] = '\"\u0002\"'; - nullChars[3] = '\"\u0003\"'; - nullChars[4] = '\"\u0004\"'; - nullChars[5] = '\"\u0005\"'; - nullChars[6] = '\"\u0006\"'; - nullChars[7] = '\"\u0007\"'; - nullChars[8] = '\"\u0008\"'; - nullChars[9] = '\"\u0009\"'; - nullChars[10] = '\"\u000A\"'; - nullChars[11] = '\"\u000B\"'; - nullChars[12] = '\"\u000C\"'; - nullChars[13] = '\"\u000D\"'; - nullChars[14] = '\"\u000E\"'; - nullChars[15] = '\"\u000F\"'; - nullChars[16] = '\"\u0010\"'; - nullChars[17] = '\"\u0011\"'; - nullChars[18] = '\"\u0012\"'; - nullChars[19] = '\"\u0013\"'; - nullChars[20] = '\"\u0014\"'; - nullChars[21] = '\"\u0015\"'; - nullChars[22] = '\"\u0016\"'; - nullChars[23] = '\"\u0017\"'; - nullChars[24] = '\"\u0018\"'; - nullChars[25] = '\"\u0019\"'; - nullChars[26] = '\"\u001A\"'; - nullChars[27] = '\"\u001B\"'; - nullChars[28] = '\"\u001C\"'; - nullChars[29] = '\"\u001D\"'; - nullChars[30] = '\"\u001E\"'; - nullChars[31] = '\"\u001F\"'; +var nullChars = new Array(); +nullChars[0] = '\"\u0000\"'; +nullChars[1] = '\"\u0001\"'; +nullChars[2] = '\"\u0002\"'; +nullChars[3] = '\"\u0003\"'; +nullChars[4] = '\"\u0004\"'; +nullChars[5] = '\"\u0005\"'; +nullChars[6] = '\"\u0006\"'; +nullChars[7] = '\"\u0007\"'; +nullChars[8] = '\"\u0008\"'; +nullChars[9] = '\"\u0009\"'; +nullChars[10] = '\"\u000A\"'; +nullChars[11] = '\"\u000B\"'; +nullChars[12] = '\"\u000C\"'; +nullChars[13] = '\"\u000D\"'; +nullChars[14] = '\"\u000E\"'; +nullChars[15] = '\"\u000F\"'; +nullChars[16] = '\"\u0010\"'; +nullChars[17] = '\"\u0011\"'; +nullChars[18] = '\"\u0012\"'; +nullChars[19] = '\"\u0013\"'; +nullChars[20] = '\"\u0014\"'; +nullChars[21] = '\"\u0015\"'; +nullChars[22] = '\"\u0016\"'; +nullChars[23] = '\"\u0017\"'; +nullChars[24] = '\"\u0018\"'; +nullChars[25] = '\"\u0019\"'; +nullChars[26] = '\"\u001A\"'; +nullChars[27] = '\"\u001B\"'; +nullChars[28] = '\"\u001C\"'; +nullChars[29] = '\"\u001D\"'; +nullChars[30] = '\"\u001E\"'; +nullChars[31] = '\"\u001F\"'; - for (var index in nullChars) { - assert.throws(SyntaxError, function() { - var obj = JSON.parse('{ ' + "na" + nullChars[index] + "me" + ' : "John" } '); - }); - } +for (var index in nullChars) { + assert.throws(SyntaxError, function() { + var obj = JSON.parse('{ ' + "na" + nullChars[index] + "me" + ' : "John" } '); + }); +} diff --git a/test/built-ins/JSON/parse/15.12.2-2-6.js b/test/built-ins/JSON/parse/15.12.2-2-6.js index c4fb8b863..80f4a5de6 100644 --- a/test/built-ins/JSON/parse/15.12.2-2-6.js +++ b/test/built-ins/JSON/parse/15.12.2-2-6.js @@ -8,42 +8,42 @@ description: > character ---*/ - var nullChars = new Array(); - nullChars[0] = '\"\u0000\"'; - nullChars[1] = '\"\u0001\"'; - nullChars[2] = '\"\u0002\"'; - nullChars[3] = '\"\u0003\"'; - nullChars[4] = '\"\u0004\"'; - nullChars[5] = '\"\u0005\"'; - nullChars[6] = '\"\u0006\"'; - nullChars[7] = '\"\u0007\"'; - nullChars[8] = '\"\u0008\"'; - nullChars[9] = '\"\u0009\"'; - nullChars[10] = '\"\u000A\"'; - nullChars[11] = '\"\u000B\"'; - nullChars[12] = '\"\u000C\"'; - nullChars[13] = '\"\u000D\"'; - nullChars[14] = '\"\u000E\"'; - nullChars[15] = '\"\u000F\"'; - nullChars[16] = '\"\u0010\"'; - nullChars[17] = '\"\u0011\"'; - nullChars[18] = '\"\u0012\"'; - nullChars[19] = '\"\u0013\"'; - nullChars[20] = '\"\u0014\"'; - nullChars[21] = '\"\u0015\"'; - nullChars[22] = '\"\u0016\"'; - nullChars[23] = '\"\u0017\"'; - nullChars[24] = '\"\u0018\"'; - nullChars[25] = '\"\u0019\"'; - nullChars[26] = '\"\u001A\"'; - nullChars[27] = '\"\u001B\"'; - nullChars[28] = '\"\u001C\"'; - nullChars[29] = '\"\u001D\"'; - nullChars[30] = '\"\u001E\"'; - nullChars[31] = '\"\u001F\"'; +var nullChars = new Array(); +nullChars[0] = '\"\u0000\"'; +nullChars[1] = '\"\u0001\"'; +nullChars[2] = '\"\u0002\"'; +nullChars[3] = '\"\u0003\"'; +nullChars[4] = '\"\u0004\"'; +nullChars[5] = '\"\u0005\"'; +nullChars[6] = '\"\u0006\"'; +nullChars[7] = '\"\u0007\"'; +nullChars[8] = '\"\u0008\"'; +nullChars[9] = '\"\u0009\"'; +nullChars[10] = '\"\u000A\"'; +nullChars[11] = '\"\u000B\"'; +nullChars[12] = '\"\u000C\"'; +nullChars[13] = '\"\u000D\"'; +nullChars[14] = '\"\u000E\"'; +nullChars[15] = '\"\u000F\"'; +nullChars[16] = '\"\u0010\"'; +nullChars[17] = '\"\u0011\"'; +nullChars[18] = '\"\u0012\"'; +nullChars[19] = '\"\u0013\"'; +nullChars[20] = '\"\u0014\"'; +nullChars[21] = '\"\u0015\"'; +nullChars[22] = '\"\u0016\"'; +nullChars[23] = '\"\u0017\"'; +nullChars[24] = '\"\u0018\"'; +nullChars[25] = '\"\u0019\"'; +nullChars[26] = '\"\u001A\"'; +nullChars[27] = '\"\u001B\"'; +nullChars[28] = '\"\u001C\"'; +nullChars[29] = '\"\u001D\"'; +nullChars[30] = '\"\u001E\"'; +nullChars[31] = '\"\u001F\"'; - for (var index in nullChars) { - assert.throws(SyntaxError, function() { - var obj = JSON.parse('{ "name" : ' + nullChars[index] + ' } '); - }); - } +for (var index in nullChars) { + assert.throws(SyntaxError, function() { + var obj = JSON.parse('{ "name" : ' + nullChars[index] + ' } '); + }); +} diff --git a/test/built-ins/JSON/parse/15.12.2-2-7.js b/test/built-ins/JSON/parse/15.12.2-2-7.js index 2cb912b1f..ed1db8a09 100644 --- a/test/built-ins/JSON/parse/15.12.2-2-7.js +++ b/test/built-ins/JSON/parse/15.12.2-2-7.js @@ -8,42 +8,42 @@ description: > null character ---*/ - var nullChars = new Array(); - nullChars[0] = '\"\u0000\"'; - nullChars[1] = '\"\u0001\"'; - nullChars[2] = '\"\u0002\"'; - nullChars[3] = '\"\u0003\"'; - nullChars[4] = '\"\u0004\"'; - nullChars[5] = '\"\u0005\"'; - nullChars[6] = '\"\u0006\"'; - nullChars[7] = '\"\u0007\"'; - nullChars[8] = '\"\u0008\"'; - nullChars[9] = '\"\u0009\"'; - nullChars[10] = '\"\u000A\"'; - nullChars[11] = '\"\u000B\"'; - nullChars[12] = '\"\u000C\"'; - nullChars[13] = '\"\u000D\"'; - nullChars[14] = '\"\u000E\"'; - nullChars[15] = '\"\u000F\"'; - nullChars[16] = '\"\u0010\"'; - nullChars[17] = '\"\u0011\"'; - nullChars[18] = '\"\u0012\"'; - nullChars[19] = '\"\u0013\"'; - nullChars[20] = '\"\u0014\"'; - nullChars[21] = '\"\u0015\"'; - nullChars[22] = '\"\u0016\"'; - nullChars[23] = '\"\u0017\"'; - nullChars[24] = '\"\u0018\"'; - nullChars[25] = '\"\u0019\"'; - nullChars[26] = '\"\u001A\"'; - nullChars[27] = '\"\u001B\"'; - nullChars[28] = '\"\u001C\"'; - nullChars[29] = '\"\u001D\"'; - nullChars[30] = '\"\u001E\"'; - nullChars[31] = '\"\u001F\"'; +var nullChars = new Array(); +nullChars[0] = '\"\u0000\"'; +nullChars[1] = '\"\u0001\"'; +nullChars[2] = '\"\u0002\"'; +nullChars[3] = '\"\u0003\"'; +nullChars[4] = '\"\u0004\"'; +nullChars[5] = '\"\u0005\"'; +nullChars[6] = '\"\u0006\"'; +nullChars[7] = '\"\u0007\"'; +nullChars[8] = '\"\u0008\"'; +nullChars[9] = '\"\u0009\"'; +nullChars[10] = '\"\u000A\"'; +nullChars[11] = '\"\u000B\"'; +nullChars[12] = '\"\u000C\"'; +nullChars[13] = '\"\u000D\"'; +nullChars[14] = '\"\u000E\"'; +nullChars[15] = '\"\u000F\"'; +nullChars[16] = '\"\u0010\"'; +nullChars[17] = '\"\u0011\"'; +nullChars[18] = '\"\u0012\"'; +nullChars[19] = '\"\u0013\"'; +nullChars[20] = '\"\u0014\"'; +nullChars[21] = '\"\u0015\"'; +nullChars[22] = '\"\u0016\"'; +nullChars[23] = '\"\u0017\"'; +nullChars[24] = '\"\u0018\"'; +nullChars[25] = '\"\u0019\"'; +nullChars[26] = '\"\u001A\"'; +nullChars[27] = '\"\u001B\"'; +nullChars[28] = '\"\u001C\"'; +nullChars[29] = '\"\u001D\"'; +nullChars[30] = '\"\u001E\"'; +nullChars[31] = '\"\u001F\"'; - for (var index in nullChars) { - assert.throws(SyntaxError, function() { - var obj = JSON.parse('{ "name" : ' + nullChars[index] + "John" + ' } '); - }); - } +for (var index in nullChars) { + assert.throws(SyntaxError, function() { + var obj = JSON.parse('{ "name" : ' + nullChars[index] + "John" + ' } '); + }); +} diff --git a/test/built-ins/JSON/parse/15.12.2-2-8.js b/test/built-ins/JSON/parse/15.12.2-2-8.js index ab571c59f..ae58602b3 100644 --- a/test/built-ins/JSON/parse/15.12.2-2-8.js +++ b/test/built-ins/JSON/parse/15.12.2-2-8.js @@ -8,42 +8,42 @@ description: > null character ---*/ - var nullChars = new Array(); - nullChars[0] = '\"\u0000\"'; - nullChars[1] = '\"\u0001\"'; - nullChars[2] = '\"\u0002\"'; - nullChars[3] = '\"\u0003\"'; - nullChars[4] = '\"\u0004\"'; - nullChars[5] = '\"\u0005\"'; - nullChars[6] = '\"\u0006\"'; - nullChars[7] = '\"\u0007\"'; - nullChars[8] = '\"\u0008\"'; - nullChars[9] = '\"\u0009\"'; - nullChars[10] = '\"\u000A\"'; - nullChars[11] = '\"\u000B\"'; - nullChars[12] = '\"\u000C\"'; - nullChars[13] = '\"\u000D\"'; - nullChars[14] = '\"\u000E\"'; - nullChars[15] = '\"\u000F\"'; - nullChars[16] = '\"\u0010\"'; - nullChars[17] = '\"\u0011\"'; - nullChars[18] = '\"\u0012\"'; - nullChars[19] = '\"\u0013\"'; - nullChars[20] = '\"\u0014\"'; - nullChars[21] = '\"\u0015\"'; - nullChars[22] = '\"\u0016\"'; - nullChars[23] = '\"\u0017\"'; - nullChars[24] = '\"\u0018\"'; - nullChars[25] = '\"\u0019\"'; - nullChars[26] = '\"\u001A\"'; - nullChars[27] = '\"\u001B\"'; - nullChars[28] = '\"\u001C\"'; - nullChars[29] = '\"\u001D\"'; - nullChars[30] = '\"\u001E\"'; - nullChars[31] = '\"\u001F\"'; +var nullChars = new Array(); +nullChars[0] = '\"\u0000\"'; +nullChars[1] = '\"\u0001\"'; +nullChars[2] = '\"\u0002\"'; +nullChars[3] = '\"\u0003\"'; +nullChars[4] = '\"\u0004\"'; +nullChars[5] = '\"\u0005\"'; +nullChars[6] = '\"\u0006\"'; +nullChars[7] = '\"\u0007\"'; +nullChars[8] = '\"\u0008\"'; +nullChars[9] = '\"\u0009\"'; +nullChars[10] = '\"\u000A\"'; +nullChars[11] = '\"\u000B\"'; +nullChars[12] = '\"\u000C\"'; +nullChars[13] = '\"\u000D\"'; +nullChars[14] = '\"\u000E\"'; +nullChars[15] = '\"\u000F\"'; +nullChars[16] = '\"\u0010\"'; +nullChars[17] = '\"\u0011\"'; +nullChars[18] = '\"\u0012\"'; +nullChars[19] = '\"\u0013\"'; +nullChars[20] = '\"\u0014\"'; +nullChars[21] = '\"\u0015\"'; +nullChars[22] = '\"\u0016\"'; +nullChars[23] = '\"\u0017\"'; +nullChars[24] = '\"\u0018\"'; +nullChars[25] = '\"\u0019\"'; +nullChars[26] = '\"\u001A\"'; +nullChars[27] = '\"\u001B\"'; +nullChars[28] = '\"\u001C\"'; +nullChars[29] = '\"\u001D\"'; +nullChars[30] = '\"\u001E\"'; +nullChars[31] = '\"\u001F\"'; - for (var index in nullChars) { - assert.throws(SyntaxError, function() { - var obj = JSON.parse('{ "name" : ' + "John" + nullChars[index] + ' } '); - }); - } +for (var index in nullChars) { + assert.throws(SyntaxError, function() { + var obj = JSON.parse('{ "name" : ' + "John" + nullChars[index] + ' } '); + }); +} diff --git a/test/built-ins/JSON/parse/15.12.2-2-9.js b/test/built-ins/JSON/parse/15.12.2-2-9.js index ab7ca39cc..02b7bb72d 100644 --- a/test/built-ins/JSON/parse/15.12.2-2-9.js +++ b/test/built-ins/JSON/parse/15.12.2-2-9.js @@ -8,42 +8,42 @@ description: > ends with a null character ---*/ - var nullChars = new Array(); - nullChars[0] = '\"\u0000\"'; - nullChars[1] = '\"\u0001\"'; - nullChars[2] = '\"\u0002\"'; - nullChars[3] = '\"\u0003\"'; - nullChars[4] = '\"\u0004\"'; - nullChars[5] = '\"\u0005\"'; - nullChars[6] = '\"\u0006\"'; - nullChars[7] = '\"\u0007\"'; - nullChars[8] = '\"\u0008\"'; - nullChars[9] = '\"\u0009\"'; - nullChars[10] = '\"\u000A\"'; - nullChars[11] = '\"\u000B\"'; - nullChars[12] = '\"\u000C\"'; - nullChars[13] = '\"\u000D\"'; - nullChars[14] = '\"\u000E\"'; - nullChars[15] = '\"\u000F\"'; - nullChars[16] = '\"\u0010\"'; - nullChars[17] = '\"\u0011\"'; - nullChars[18] = '\"\u0012\"'; - nullChars[19] = '\"\u0013\"'; - nullChars[20] = '\"\u0014\"'; - nullChars[21] = '\"\u0015\"'; - nullChars[22] = '\"\u0016\"'; - nullChars[23] = '\"\u0017\"'; - nullChars[24] = '\"\u0018\"'; - nullChars[25] = '\"\u0019\"'; - nullChars[26] = '\"\u001A\"'; - nullChars[27] = '\"\u001B\"'; - nullChars[28] = '\"\u001C\"'; - nullChars[29] = '\"\u001D\"'; - nullChars[30] = '\"\u001E\"'; - nullChars[31] = '\"\u001F\"'; +var nullChars = new Array(); +nullChars[0] = '\"\u0000\"'; +nullChars[1] = '\"\u0001\"'; +nullChars[2] = '\"\u0002\"'; +nullChars[3] = '\"\u0003\"'; +nullChars[4] = '\"\u0004\"'; +nullChars[5] = '\"\u0005\"'; +nullChars[6] = '\"\u0006\"'; +nullChars[7] = '\"\u0007\"'; +nullChars[8] = '\"\u0008\"'; +nullChars[9] = '\"\u0009\"'; +nullChars[10] = '\"\u000A\"'; +nullChars[11] = '\"\u000B\"'; +nullChars[12] = '\"\u000C\"'; +nullChars[13] = '\"\u000D\"'; +nullChars[14] = '\"\u000E\"'; +nullChars[15] = '\"\u000F\"'; +nullChars[16] = '\"\u0010\"'; +nullChars[17] = '\"\u0011\"'; +nullChars[18] = '\"\u0012\"'; +nullChars[19] = '\"\u0013\"'; +nullChars[20] = '\"\u0014\"'; +nullChars[21] = '\"\u0015\"'; +nullChars[22] = '\"\u0016\"'; +nullChars[23] = '\"\u0017\"'; +nullChars[24] = '\"\u0018\"'; +nullChars[25] = '\"\u0019\"'; +nullChars[26] = '\"\u001A\"'; +nullChars[27] = '\"\u001B\"'; +nullChars[28] = '\"\u001C\"'; +nullChars[29] = '\"\u001D\"'; +nullChars[30] = '\"\u001E\"'; +nullChars[31] = '\"\u001F\"'; - for (var index in nullChars) { - assert.throws(SyntaxError, function() { - var obj = JSON.parse('{ "name" : ' + nullChars[index] + "John" + nullChars[index] + ' } '); - }); - } +for (var index in nullChars) { + assert.throws(SyntaxError, function() { + var obj = JSON.parse('{ "name" : ' + nullChars[index] + "John" + nullChars[index] + ' } '); + }); +} diff --git a/test/built-ins/JSON/parse/revived-proxy.js b/test/built-ins/JSON/parse/revived-proxy.js index fe3686849..fbcb3aa46 100644 --- a/test/built-ins/JSON/parse/revived-proxy.js +++ b/test/built-ins/JSON/parse/revived-proxy.js @@ -35,7 +35,10 @@ info: | features: [Proxy] ---*/ -var objectProxy = new Proxy({ length: 0, other: 0 }, {}); +var objectProxy = new Proxy({ + length: 0, + other: 0 +}, {}); var arrayProxy = new Proxy([], {}); var arrayProxyProxy = new Proxy(arrayProxy, {}); var visitedOther, injectProxy; diff --git a/test/built-ins/JSON/parse/reviver-object-define-prop-err.js b/test/built-ins/JSON/parse/reviver-object-define-prop-err.js index c42cff0a6..d62dbaf89 100644 --- a/test/built-ins/JSON/parse/reviver-object-define-prop-err.js +++ b/test/built-ins/JSON/parse/reviver-object-define-prop-err.js @@ -30,7 +30,9 @@ info: | features: [Proxy] ---*/ -var badDefine = new Proxy({ 0: null }, { +var badDefine = new Proxy({ + 0: null +}, { defineProperty: function() { throw new Test262Error(); } diff --git a/test/built-ins/JSON/parse/reviver-object-delete-err.js b/test/built-ins/JSON/parse/reviver-object-delete-err.js index d596d4e27..edded21fa 100644 --- a/test/built-ins/JSON/parse/reviver-object-delete-err.js +++ b/test/built-ins/JSON/parse/reviver-object-delete-err.js @@ -28,7 +28,9 @@ info: | features: [Proxy] ---*/ -var badDelete = new Proxy({ a: 1 }, { +var badDelete = new Proxy({ + a: 1 +}, { deleteProperty: function() { throw new Test262Error(); } |