diff --git a/test/built-ins/JSON/15.12-0-1.js b/test/built-ins/JSON/15.12-0-1.js index 7dcb5975bda04f0690fc0f69e2ac91bd4b61d4b5..1d0776cc74ea760b87efb01d4e50b037c00e9401 100644 --- a/test/built-ins/JSON/15.12-0-1.js +++ b/test/built-ins/JSON/15.12-0-1.js @@ -10,6 +10,6 @@ es5id: 15.12-0-1 description: JSON must be a built-in object ---*/ - var o = JSON; +var o = JSON; assert.sameValue(typeof(o), "object", 'typeof(o)'); diff --git a/test/built-ins/JSON/15.12-0-2.js b/test/built-ins/JSON/15.12-0-2.js index 924b54991a9edc430c5897bcdec588e429780906..5c086b5336e4e64c7f26776977973b147ea3ed1e 100644 --- a/test/built-ins/JSON/15.12-0-2.js +++ b/test/built-ins/JSON/15.12-0-2.js @@ -10,7 +10,7 @@ es5id: 15.12-0-2 description: JSON must not support the [[Construct]] method ---*/ - var o = JSON; +var o = JSON; assert.throws(TypeError, function() { - var j = new JSON(); + var j = new JSON(); }); diff --git a/test/built-ins/JSON/15.12-0-3.js b/test/built-ins/JSON/15.12-0-3.js index 4a511110ac453e3e2c5e7843f9b810026f538a8e..4e082c49f0fa1f1a4f3d3c5b13fc13b633678bf0 100644 --- a/test/built-ins/JSON/15.12-0-3.js +++ b/test/built-ins/JSON/15.12-0-3.js @@ -10,7 +10,7 @@ es5id: 15.12-0-3 description: JSON must not support the [[Call]] method ---*/ - var o = JSON; +var o = JSON; assert.throws(TypeError, function() { - var j = JSON(); + var j = JSON(); }); diff --git a/test/built-ins/JSON/15.12-0-4.js b/test/built-ins/JSON/15.12-0-4.js index 565dcc95b5941fbb6920be7c7b2fc6b854d81ca2..804c336872659a3a87090e5a24b3ab1bc8c47234 100644 --- a/test/built-ins/JSON/15.12-0-4.js +++ b/test/built-ins/JSON/15.12-0-4.js @@ -12,11 +12,11 @@ es5id: 15.12-0-4 description: JSON object's properties must be non enumerable ---*/ - var o = JSON; - var i = 0; - for (var p in o) { - i++; - } - +var o = JSON; +var i = 0; +for (var p in o) { + i++; +} + assert.sameValue(i, 0, 'i'); 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 d1bb9eecd009cec9bed0a79919af32b35da397e1..6134ce18f066d84c2324e24236a25c557737ee67 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 8254a4d62ab48f31568314e4999ad5afe879e7e3..e2e3f87e102f4ca670bab139c3665549f5f62cb6 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 fb213cb00dd33cd1d9b19a57bafb1d332ee02310..32fe7723100dda04c926431924c657116a1a8dab 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 34b31816c972f445d745aead541eb9105d115905..879335aa1852de23ee429fa6d0fa6bb55492312b 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 e18222fd23f7bc085a00f0b9b9e0e932c9db6012..59aff18b63d1912d7f18e4d4114ba5a7b52fe812 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 cfaf7d0505511c3571941ca95216451e97e84cb0..ff2889373fd5ff653294bfc0d0edd3981b431a82 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 fa7bb87b3d9a46c8392917af5e55c2f64e6d5ce8..d342003b96f669356af012acf2668dc4bfbcdaff 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 e669bb290ef382e2d7cf61a902b7729b334fcf03..5deb8a5813931886755d1dfdd16608e68d2537e2 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 7d3cc1d3e0858f14e352e1a1cf6c84c32bc5e452..2bb7779492198d30b502ee24bdae08ac39172244 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 40ebfdb2fdbf8b423f62dff2c20f561c7c532dfc..fe9569381de2f4eb831b3fa7f03a99b1ae9e02c5 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 068cf69fc793f5b9bbb9493f81bd9da302166b6d..de7d3f825ef42635e339a818e25aebaef67bb811 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 a2a42946f188a68f547716eb8621bef7520fc44b..d307ad6d0ee2d57c77a0f3377e23c519370c7749 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 0f3c73ac110b001832f67106c4a06eebaa8d9f11..24f298c884de2c142b527ef1419d4913fbf121eb 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 d577d5b76b1de1a041984b2d3dada7272cd61d49..6af5601aef66e85972fa0cffe367cb6d9d5a2534 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 20f19e1b2ce14388f3beedcdff61ef9c05d90fcb..0bd6dc9e9eaded2b7d4a990fbc3a31eb79564853 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 755f4578f853369418ba867262f2b2f160906162..819f7160fbcdd18de29cc520d62ae4adf5a3c6df 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 1b0a6240bb70bc5f1138ecda05b01bec1dcf48d3..ebd3e27be5d85f4ccf36dcbde2896bcc9d6ef8ff 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 c4fb8b863c5d00f654a5a728df5fdff034f7eea6..80f4a5de68f215d25899b97f112b33b577d62307 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 2cb912b1fa6448b0fa93082aa79c55380559b272..ed1db8a0956e5d3cd35bdc85e34815cbafac9980 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 ab571c59f09998ac8863ed2a4417612690f04843..ae58602b3e602442a8f15497a39ed12751657eb0 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 ab7ca39ccdce0666d34b7e867b3c2d40ff22f617..02b7bb72dc185d4db4147c23e98ef5458d0e547c 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 fe3686849c0bac4a487f179a2fc71690e8c495eb..fbcb3aa4663c7f97cda30e959ef8ab7b7c947dcb 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 c42cff0a677a4ba2fead6bb18bb598d85ec928c2..d62dbaf894300152fa2f6bf9536338b5ad7b0e0b 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 d596d4e27739155e6fd3ab8088aa3d93843a778b..edded21fa7063aab37fe3b98c50718be354383ac 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(); } diff --git a/test/built-ins/JSON/stringify/15.12.3-0-1.js b/test/built-ins/JSON/stringify/15.12.3-0-1.js index c79c6f026553283e856c6f52c844ee8360808f72..5cc4240c7de4a8978159a4a92c34af4467935a33 100644 --- a/test/built-ins/JSON/stringify/15.12.3-0-1.js +++ b/test/built-ins/JSON/stringify/15.12.3-0-1.js @@ -17,6 +17,6 @@ es5id: 15.12.3-0-1 description: JSON.stringify must exist as be a function ---*/ - var f = JSON.stringify; +var f = JSON.stringify; assert.sameValue(typeof(f), "function", 'typeof(f)'); diff --git a/test/built-ins/JSON/stringify/15.12.3-0-2.js b/test/built-ins/JSON/stringify/15.12.3-0-2.js index 3f5fe1ec080b59d708bc787f01dbfce284c15efc..08e864d0c88bc6ef2746ac68d3b6f110b97a47e3 100644 --- a/test/built-ins/JSON/stringify/15.12.3-0-2.js +++ b/test/built-ins/JSON/stringify/15.12.3-0-2.js @@ -17,7 +17,7 @@ es5id: 15.12.3-0-2 description: JSON.stringify must exist as be a function taking 3 parameters ---*/ - var f = JSON.stringify; +var f = JSON.stringify; assert.sameValue(typeof(f), "function", 'typeof(f)'); assert.sameValue(f.length, 3, 'f.length'); diff --git a/test/built-ins/JSON/stringify/15.12.3-0-3.js b/test/built-ins/JSON/stringify/15.12.3-0-3.js index d8a575973a328d2669b42127d0490b7d1d43fd06..76e41ffb8a45801e127182f5ae4d7d027ac93a56 100644 --- a/test/built-ins/JSON/stringify/15.12.3-0-3.js +++ b/test/built-ins/JSON/stringify/15.12.3-0-3.js @@ -10,7 +10,7 @@ es5id: 15.12.3-0-3 description: JSON.stringify must be deletable (configurable) ---*/ - var o = JSON; - var desc = Object.getOwnPropertyDescriptor(o, "stringify"); +var o = JSON; +var desc = Object.getOwnPropertyDescriptor(o, "stringify"); assert.sameValue(desc.configurable, true, 'desc.configurable'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-10.js b/test/built-ins/JSON/stringify/15.12.3-11-10.js index f151731964870b6a5ae47c8485768fd38c9093ac..c59045ebb057c8af13be865f39e2f5df3a2b11e0 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-10.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-10.js @@ -8,4 +8,6 @@ description: > value can return undefined. ---*/ -assert.sameValue(JSON.stringify(42, function(k, v) { return undefined }), undefined, 'JSON.stringify(42, function(k, v) { return undefined })'); +assert.sameValue(JSON.stringify(42, function(k, v) { + return undefined +}), undefined, 'JSON.stringify(42, function(k, v) { return undefined })'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-11.js b/test/built-ins/JSON/stringify/15.12.3-11-11.js index da886044b92a4bdeb12f3e8a6bc155edc9566afe..f4da04f92cd329e973e0c648ce5970363705421c 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-11.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-11.js @@ -8,4 +8,8 @@ description: > can return undefined. ---*/ -assert.sameValue(JSON.stringify({prop:1}, function(k, v) { return undefined }), undefined, 'JSON.stringify({prop:1}, function(k, v) { return undefined })'); +assert.sameValue(JSON.stringify({ + prop: 1 +}, function(k, v) { + return undefined +}), undefined, 'JSON.stringify({prop:1}, function(k, v) { return undefined })'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-12.js b/test/built-ins/JSON/stringify/15.12.3-11-12.js index 5fdfea83836c5f1a6b2c08d6f6f37ca8ed99051c..1238189a0f2868966da81b1dd12bc0a481f86b60 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-12.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-12.js @@ -8,4 +8,6 @@ description: > can return an Array. ---*/ -assert.sameValue(JSON.stringify(42, function(k, v) { return v==42 ?[4,2]:v }), '[4,2]', 'JSON.stringify(42, function(k, v) { return v==42 ?[4,2]:v })'); +assert.sameValue(JSON.stringify(42, function(k, v) { + return v == 42 ? [4, 2] : v +}), '[4,2]', 'JSON.stringify(42, function(k, v) { return v==42 ?[4,2]:v })'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-13.js b/test/built-ins/JSON/stringify/15.12.3-11-13.js index e98f67116431e878592ee123cf38261d89d95ec0..22b244c0b66f7301f3d3e2884cb8f76b0fdf441b 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-13.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-13.js @@ -8,4 +8,8 @@ description: > can return an Object. ---*/ -assert.sameValue(JSON.stringify(42, function(k, v) { return v==42 ? {forty:2}: v}), '{"forty":2}', 'JSON.stringify(42, function(k, v) { return v==42 ? {forty:2}: v})'); +assert.sameValue(JSON.stringify(42, function(k, v) { + return v == 42 ? { + forty: 2 + } : v +}), '{"forty":2}', 'JSON.stringify(42, function(k, v) { return v==42 ? {forty:2}: v})'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-15.js b/test/built-ins/JSON/stringify/15.12.3-11-15.js index d2cb9319145ed318d5473a0d0b52f59dcdc2f695..5a4b35c96e22c488de3a3808150361cb98440fd9 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-15.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-15.js @@ -8,4 +8,6 @@ description: > returns the replacer value. ---*/ -assert.sameValue(JSON.stringify(function() {}, function(k,v) {return 99}), '99', 'JSON.stringify(function() {}, function(k,v) {return 99})'); +assert.sameValue(JSON.stringify(function() {}, function(k, v) { + return 99 +}), '99', 'JSON.stringify(function() {}, function(k,v) {return 99})'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-16.js b/test/built-ins/JSON/stringify/15.12.3-11-16.js index e9d92d5c2dba3b6b441938ce0b465f113d427b00..23f89c2f9ca8dccc38a465a228b7403dbfa666d7 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-16.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-16.js @@ -9,46 +9,48 @@ description: > step 2.c) ---*/ - var result = true; +var result = true; - var expectedNullChars = new Array(); - expectedNullChars[0] = "\\u0000"; - expectedNullChars[1] = "\\u0001"; - expectedNullChars[2] = "\\u0002"; - expectedNullChars[3] = "\\u0003"; - expectedNullChars[4] = "\\u0004"; - expectedNullChars[5] = "\\u0005"; - expectedNullChars[6] = "\\u0006"; - expectedNullChars[7] = "\\u0007"; - expectedNullChars[8] = "\\b"; - expectedNullChars[9] = "\\t"; - expectedNullChars[10] = "\\n"; - expectedNullChars[11] = "\\u000b"; - expectedNullChars[12] = "\\f"; - expectedNullChars[13] = "\\r"; - expectedNullChars[14] = "\\u000e"; - expectedNullChars[15] = "\\u000f"; - expectedNullChars[16] = "\\u0010"; - expectedNullChars[17] = "\\u0011"; - expectedNullChars[18] = "\\u0012"; - expectedNullChars[19] = "\\u0013"; - expectedNullChars[20] = "\\u0014"; - expectedNullChars[21] = "\\u0015"; - expectedNullChars[22] = "\\u0016"; - expectedNullChars[23] = "\\u0017"; - expectedNullChars[24] = "\\u0018"; - expectedNullChars[25] = "\\u0019"; - expectedNullChars[26] = "\\u001a"; - expectedNullChars[27] = "\\u001b"; - expectedNullChars[28] = "\\u001c"; - expectedNullChars[29] = "\\u001d"; - expectedNullChars[30] = "\\u001e"; - expectedNullChars[31] = "\\u001f"; +var expectedNullChars = new Array(); +expectedNullChars[0] = "\\u0000"; +expectedNullChars[1] = "\\u0001"; +expectedNullChars[2] = "\\u0002"; +expectedNullChars[3] = "\\u0003"; +expectedNullChars[4] = "\\u0004"; +expectedNullChars[5] = "\\u0005"; +expectedNullChars[6] = "\\u0006"; +expectedNullChars[7] = "\\u0007"; +expectedNullChars[8] = "\\b"; +expectedNullChars[9] = "\\t"; +expectedNullChars[10] = "\\n"; +expectedNullChars[11] = "\\u000b"; +expectedNullChars[12] = "\\f"; +expectedNullChars[13] = "\\r"; +expectedNullChars[14] = "\\u000e"; +expectedNullChars[15] = "\\u000f"; +expectedNullChars[16] = "\\u0010"; +expectedNullChars[17] = "\\u0011"; +expectedNullChars[18] = "\\u0012"; +expectedNullChars[19] = "\\u0013"; +expectedNullChars[20] = "\\u0014"; +expectedNullChars[21] = "\\u0015"; +expectedNullChars[22] = "\\u0016"; +expectedNullChars[23] = "\\u0017"; +expectedNullChars[24] = "\\u0018"; +expectedNullChars[25] = "\\u0019"; +expectedNullChars[26] = "\\u001a"; +expectedNullChars[27] = "\\u001b"; +expectedNullChars[28] = "\\u001c"; +expectedNullChars[29] = "\\u001d"; +expectedNullChars[30] = "\\u001e"; +expectedNullChars[31] = "\\u001f"; - for (var index in expectedNullChars) { +for (var index in expectedNullChars) { - var str = JSON.stringify({ "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F": "John" }); - result = (result && str.indexOf(expectedNullChars[index]) !== -1); - } + var str = JSON.stringify({ + "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F": "John" + }); + result = (result && str.indexOf(expectedNullChars[index]) !== -1); +} assert(result, 'result !== true'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-17.js b/test/built-ins/JSON/stringify/15.12.3-11-17.js index fe8a268b6fa51a3881441b5d2eb014441812088b..9723236294182a0464b9ac6eaf531d35554f0f2f 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-17.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-17.js @@ -9,46 +9,48 @@ description: > Quote(value) step 2.c) ---*/ - var result = true; +var result = true; - var expectedNullChars = new Array(); - expectedNullChars[0] = "\\u0000"; - expectedNullChars[1] = "\\u0001"; - expectedNullChars[2] = "\\u0002"; - expectedNullChars[3] = "\\u0003"; - expectedNullChars[4] = "\\u0004"; - expectedNullChars[5] = "\\u0005"; - expectedNullChars[6] = "\\u0006"; - expectedNullChars[7] = "\\u0007"; - expectedNullChars[8] = "\\b"; - expectedNullChars[9] = "\\t"; - expectedNullChars[10] = "\\n"; - expectedNullChars[11] = "\\u000b"; - expectedNullChars[12] = "\\f"; - expectedNullChars[13] = "\\r"; - expectedNullChars[14] = "\\u000e"; - expectedNullChars[15] = "\\u000f"; - expectedNullChars[16] = "\\u0010"; - expectedNullChars[17] = "\\u0011"; - expectedNullChars[18] = "\\u0012"; - expectedNullChars[19] = "\\u0013"; - expectedNullChars[20] = "\\u0014"; - expectedNullChars[21] = "\\u0015"; - expectedNullChars[22] = "\\u0016"; - expectedNullChars[23] = "\\u0017"; - expectedNullChars[24] = "\\u0018"; - expectedNullChars[25] = "\\u0019"; - expectedNullChars[26] = "\\u001a"; - expectedNullChars[27] = "\\u001b"; - expectedNullChars[28] = "\\u001c"; - expectedNullChars[29] = "\\u001d"; - expectedNullChars[30] = "\\u001e"; - expectedNullChars[31] = "\\u001f"; +var expectedNullChars = new Array(); +expectedNullChars[0] = "\\u0000"; +expectedNullChars[1] = "\\u0001"; +expectedNullChars[2] = "\\u0002"; +expectedNullChars[3] = "\\u0003"; +expectedNullChars[4] = "\\u0004"; +expectedNullChars[5] = "\\u0005"; +expectedNullChars[6] = "\\u0006"; +expectedNullChars[7] = "\\u0007"; +expectedNullChars[8] = "\\b"; +expectedNullChars[9] = "\\t"; +expectedNullChars[10] = "\\n"; +expectedNullChars[11] = "\\u000b"; +expectedNullChars[12] = "\\f"; +expectedNullChars[13] = "\\r"; +expectedNullChars[14] = "\\u000e"; +expectedNullChars[15] = "\\u000f"; +expectedNullChars[16] = "\\u0010"; +expectedNullChars[17] = "\\u0011"; +expectedNullChars[18] = "\\u0012"; +expectedNullChars[19] = "\\u0013"; +expectedNullChars[20] = "\\u0014"; +expectedNullChars[21] = "\\u0015"; +expectedNullChars[22] = "\\u0016"; +expectedNullChars[23] = "\\u0017"; +expectedNullChars[24] = "\\u0018"; +expectedNullChars[25] = "\\u0019"; +expectedNullChars[26] = "\\u001a"; +expectedNullChars[27] = "\\u001b"; +expectedNullChars[28] = "\\u001c"; +expectedNullChars[29] = "\\u001d"; +expectedNullChars[30] = "\\u001e"; +expectedNullChars[31] = "\\u001f"; - for (var index in expectedNullChars) { +for (var index in expectedNullChars) { - var str = JSON.stringify({ "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001Fname": "John" }); - result = (result && str.indexOf(expectedNullChars[index]) !== -1); - } + var str = JSON.stringify({ + "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001Fname": "John" + }); + result = (result && str.indexOf(expectedNullChars[index]) !== -1); +} assert(result, 'result !== true'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-18.js b/test/built-ins/JSON/stringify/15.12.3-11-18.js index 721fe41e3c58fd5d773113cd9457875da2291b5e..6766a4e199561889e0afa537c747ee8fd6d566c7 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-18.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-18.js @@ -9,46 +9,48 @@ description: > Quote(value) step 2.c) ---*/ - var result = true; +var result = true; - var expectedNullChars = new Array(); - expectedNullChars[0] = "\\u0000"; - expectedNullChars[1] = "\\u0001"; - expectedNullChars[2] = "\\u0002"; - expectedNullChars[3] = "\\u0003"; - expectedNullChars[4] = "\\u0004"; - expectedNullChars[5] = "\\u0005"; - expectedNullChars[6] = "\\u0006"; - expectedNullChars[7] = "\\u0007"; - expectedNullChars[8] = "\\b"; - expectedNullChars[9] = "\\t"; - expectedNullChars[10] = "\\n"; - expectedNullChars[11] = "\\u000b"; - expectedNullChars[12] = "\\f"; - expectedNullChars[13] = "\\r"; - expectedNullChars[14] = "\\u000e"; - expectedNullChars[15] = "\\u000f"; - expectedNullChars[16] = "\\u0010"; - expectedNullChars[17] = "\\u0011"; - expectedNullChars[18] = "\\u0012"; - expectedNullChars[19] = "\\u0013"; - expectedNullChars[20] = "\\u0014"; - expectedNullChars[21] = "\\u0015"; - expectedNullChars[22] = "\\u0016"; - expectedNullChars[23] = "\\u0017"; - expectedNullChars[24] = "\\u0018"; - expectedNullChars[25] = "\\u0019"; - expectedNullChars[26] = "\\u001a"; - expectedNullChars[27] = "\\u001b"; - expectedNullChars[28] = "\\u001c"; - expectedNullChars[29] = "\\u001d"; - expectedNullChars[30] = "\\u001e"; - expectedNullChars[31] = "\\u001f"; +var expectedNullChars = new Array(); +expectedNullChars[0] = "\\u0000"; +expectedNullChars[1] = "\\u0001"; +expectedNullChars[2] = "\\u0002"; +expectedNullChars[3] = "\\u0003"; +expectedNullChars[4] = "\\u0004"; +expectedNullChars[5] = "\\u0005"; +expectedNullChars[6] = "\\u0006"; +expectedNullChars[7] = "\\u0007"; +expectedNullChars[8] = "\\b"; +expectedNullChars[9] = "\\t"; +expectedNullChars[10] = "\\n"; +expectedNullChars[11] = "\\u000b"; +expectedNullChars[12] = "\\f"; +expectedNullChars[13] = "\\r"; +expectedNullChars[14] = "\\u000e"; +expectedNullChars[15] = "\\u000f"; +expectedNullChars[16] = "\\u0010"; +expectedNullChars[17] = "\\u0011"; +expectedNullChars[18] = "\\u0012"; +expectedNullChars[19] = "\\u0013"; +expectedNullChars[20] = "\\u0014"; +expectedNullChars[21] = "\\u0015"; +expectedNullChars[22] = "\\u0016"; +expectedNullChars[23] = "\\u0017"; +expectedNullChars[24] = "\\u0018"; +expectedNullChars[25] = "\\u0019"; +expectedNullChars[26] = "\\u001a"; +expectedNullChars[27] = "\\u001b"; +expectedNullChars[28] = "\\u001c"; +expectedNullChars[29] = "\\u001d"; +expectedNullChars[30] = "\\u001e"; +expectedNullChars[31] = "\\u001f"; - for (var index in expectedNullChars) { +for (var index in expectedNullChars) { - var str = JSON.stringify({ "name\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F": "John" }); - result = (result && str.indexOf(expectedNullChars[index]) !== -1); - } + var str = JSON.stringify({ + "name\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F": "John" + }); + result = (result && str.indexOf(expectedNullChars[index]) !== -1); +} assert(result, 'result !== true'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-19.js b/test/built-ins/JSON/stringify/15.12.3-11-19.js index c372e890f420498a8af51095f05bf0da84b492a4..052e394f27c9aacab093d00282e603296533bb44 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-19.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-19.js @@ -9,46 +9,48 @@ description: > operation Quote(value) step 2.c) ---*/ - var result = true; +var result = true; - var expectedNullChars = new Array(); - expectedNullChars[0] = "\\u0000"; - expectedNullChars[1] = "\\u0001"; - expectedNullChars[2] = "\\u0002"; - expectedNullChars[3] = "\\u0003"; - expectedNullChars[4] = "\\u0004"; - expectedNullChars[5] = "\\u0005"; - expectedNullChars[6] = "\\u0006"; - expectedNullChars[7] = "\\u0007"; - expectedNullChars[8] = "\\b"; - expectedNullChars[9] = "\\t"; - expectedNullChars[10] = "\\n"; - expectedNullChars[11] = "\\u000b"; - expectedNullChars[12] = "\\f"; - expectedNullChars[13] = "\\r"; - expectedNullChars[14] = "\\u000e"; - expectedNullChars[15] = "\\u000f"; - expectedNullChars[16] = "\\u0010"; - expectedNullChars[17] = "\\u0011"; - expectedNullChars[18] = "\\u0012"; - expectedNullChars[19] = "\\u0013"; - expectedNullChars[20] = "\\u0014"; - expectedNullChars[21] = "\\u0015"; - expectedNullChars[22] = "\\u0016"; - expectedNullChars[23] = "\\u0017"; - expectedNullChars[24] = "\\u0018"; - expectedNullChars[25] = "\\u0019"; - expectedNullChars[26] = "\\u001a"; - expectedNullChars[27] = "\\u001b"; - expectedNullChars[28] = "\\u001c"; - expectedNullChars[29] = "\\u001d"; - expectedNullChars[30] = "\\u001e"; - expectedNullChars[31] = "\\u001f"; +var expectedNullChars = new Array(); +expectedNullChars[0] = "\\u0000"; +expectedNullChars[1] = "\\u0001"; +expectedNullChars[2] = "\\u0002"; +expectedNullChars[3] = "\\u0003"; +expectedNullChars[4] = "\\u0004"; +expectedNullChars[5] = "\\u0005"; +expectedNullChars[6] = "\\u0006"; +expectedNullChars[7] = "\\u0007"; +expectedNullChars[8] = "\\b"; +expectedNullChars[9] = "\\t"; +expectedNullChars[10] = "\\n"; +expectedNullChars[11] = "\\u000b"; +expectedNullChars[12] = "\\f"; +expectedNullChars[13] = "\\r"; +expectedNullChars[14] = "\\u000e"; +expectedNullChars[15] = "\\u000f"; +expectedNullChars[16] = "\\u0010"; +expectedNullChars[17] = "\\u0011"; +expectedNullChars[18] = "\\u0012"; +expectedNullChars[19] = "\\u0013"; +expectedNullChars[20] = "\\u0014"; +expectedNullChars[21] = "\\u0015"; +expectedNullChars[22] = "\\u0016"; +expectedNullChars[23] = "\\u0017"; +expectedNullChars[24] = "\\u0018"; +expectedNullChars[25] = "\\u0019"; +expectedNullChars[26] = "\\u001a"; +expectedNullChars[27] = "\\u001b"; +expectedNullChars[28] = "\\u001c"; +expectedNullChars[29] = "\\u001d"; +expectedNullChars[30] = "\\u001e"; +expectedNullChars[31] = "\\u001f"; - for (var index in expectedNullChars) { +for (var index in expectedNullChars) { - var str = JSON.stringify({ "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001Fname\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F": "John" }); - result = (result && str.indexOf(expectedNullChars[index]) !== -1 && str.indexOf(expectedNullChars[index]) !== -1); - } + var str = JSON.stringify({ + "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001Fname\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F": "John" + }); + result = (result && str.indexOf(expectedNullChars[index]) !== -1 && str.indexOf(expectedNullChars[index]) !== -1); +} assert(result, 'result !== true'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-2.js b/test/built-ins/JSON/stringify/15.12.3-11-2.js index f6dc5e86225351b4fb41e3685fa6e2e28ffe1fcc..adc1c36c8835ff9acd22e499764d43bf74cd6a71 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-2.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-2.js @@ -8,4 +8,6 @@ description: > undefined value. ---*/ -assert.sameValue(JSON.stringify(undefined, function(k, v) { return "replacement" }), '"replacement"', 'JSON.stringify(undefined, function(k, v) { return "replacement" })'); +assert.sameValue(JSON.stringify(undefined, function(k, v) { + return "replacement" +}), '"replacement"', 'JSON.stringify(undefined, function(k, v) { return "replacement" })'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-20.js b/test/built-ins/JSON/stringify/15.12.3-11-20.js index 6b7c2e6f4f9bad5bc1fb3af4c7acee840fa834f3..8c9bc27838e03e85b909820697854d222a9c25c1 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-20.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-20.js @@ -9,46 +9,48 @@ description: > operation Quote(value) step 2.c) ---*/ - var result = true; +var result = true; - var expectedNullChars = new Array(); - expectedNullChars[0] = "\\u0000"; - expectedNullChars[1] = "\\u0001"; - expectedNullChars[2] = "\\u0002"; - expectedNullChars[3] = "\\u0003"; - expectedNullChars[4] = "\\u0004"; - expectedNullChars[5] = "\\u0005"; - expectedNullChars[6] = "\\u0006"; - expectedNullChars[7] = "\\u0007"; - expectedNullChars[8] = "\\b"; - expectedNullChars[9] = "\\t"; - expectedNullChars[10] = "\\n"; - expectedNullChars[11] = "\\u000b"; - expectedNullChars[12] = "\\f"; - expectedNullChars[13] = "\\r"; - expectedNullChars[14] = "\\u000e"; - expectedNullChars[15] = "\\u000f"; - expectedNullChars[16] = "\\u0010"; - expectedNullChars[17] = "\\u0011"; - expectedNullChars[18] = "\\u0012"; - expectedNullChars[19] = "\\u0013"; - expectedNullChars[20] = "\\u0014"; - expectedNullChars[21] = "\\u0015"; - expectedNullChars[22] = "\\u0016"; - expectedNullChars[23] = "\\u0017"; - expectedNullChars[24] = "\\u0018"; - expectedNullChars[25] = "\\u0019"; - expectedNullChars[26] = "\\u001a"; - expectedNullChars[27] = "\\u001b"; - expectedNullChars[28] = "\\u001c"; - expectedNullChars[29] = "\\u001d"; - expectedNullChars[30] = "\\u001e"; - expectedNullChars[31] = "\\u001f"; +var expectedNullChars = new Array(); +expectedNullChars[0] = "\\u0000"; +expectedNullChars[1] = "\\u0001"; +expectedNullChars[2] = "\\u0002"; +expectedNullChars[3] = "\\u0003"; +expectedNullChars[4] = "\\u0004"; +expectedNullChars[5] = "\\u0005"; +expectedNullChars[6] = "\\u0006"; +expectedNullChars[7] = "\\u0007"; +expectedNullChars[8] = "\\b"; +expectedNullChars[9] = "\\t"; +expectedNullChars[10] = "\\n"; +expectedNullChars[11] = "\\u000b"; +expectedNullChars[12] = "\\f"; +expectedNullChars[13] = "\\r"; +expectedNullChars[14] = "\\u000e"; +expectedNullChars[15] = "\\u000f"; +expectedNullChars[16] = "\\u0010"; +expectedNullChars[17] = "\\u0011"; +expectedNullChars[18] = "\\u0012"; +expectedNullChars[19] = "\\u0013"; +expectedNullChars[20] = "\\u0014"; +expectedNullChars[21] = "\\u0015"; +expectedNullChars[22] = "\\u0016"; +expectedNullChars[23] = "\\u0017"; +expectedNullChars[24] = "\\u0018"; +expectedNullChars[25] = "\\u0019"; +expectedNullChars[26] = "\\u001a"; +expectedNullChars[27] = "\\u001b"; +expectedNullChars[28] = "\\u001c"; +expectedNullChars[29] = "\\u001d"; +expectedNullChars[30] = "\\u001e"; +expectedNullChars[31] = "\\u001f"; - for (var index in expectedNullChars) { +for (var index in expectedNullChars) { - var str = JSON.stringify({ "na\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001Fme": "John" }); - result = (result && str.indexOf(expectedNullChars[index]) !== -1); - } + var str = JSON.stringify({ + "na\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001Fme": "John" + }); + result = (result && str.indexOf(expectedNullChars[index]) !== -1); +} assert(result, 'result !== true'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-21.js b/test/built-ins/JSON/stringify/15.12.3-11-21.js index e22b848cc97221e9bb9f6bdcd014fb6c6381885f..ca7e598d61c942a2738bb7386791f14257384823 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-21.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-21.js @@ -9,46 +9,48 @@ description: > Quote(value) step 2.c) ---*/ - var result = true; +var result = true; - var expectedNullChars = new Array(); - expectedNullChars[0] = "\\u0000"; - expectedNullChars[1] = "\\u0001"; - expectedNullChars[2] = "\\u0002"; - expectedNullChars[3] = "\\u0003"; - expectedNullChars[4] = "\\u0004"; - expectedNullChars[5] = "\\u0005"; - expectedNullChars[6] = "\\u0006"; - expectedNullChars[7] = "\\u0007"; - expectedNullChars[8] = "\\b"; - expectedNullChars[9] = "\\t"; - expectedNullChars[10] = "\\n"; - expectedNullChars[11] = "\\u000b"; - expectedNullChars[12] = "\\f"; - expectedNullChars[13] = "\\r"; - expectedNullChars[14] = "\\u000e"; - expectedNullChars[15] = "\\u000f"; - expectedNullChars[16] = "\\u0010"; - expectedNullChars[17] = "\\u0011"; - expectedNullChars[18] = "\\u0012"; - expectedNullChars[19] = "\\u0013"; - expectedNullChars[20] = "\\u0014"; - expectedNullChars[21] = "\\u0015"; - expectedNullChars[22] = "\\u0016"; - expectedNullChars[23] = "\\u0017"; - expectedNullChars[24] = "\\u0018"; - expectedNullChars[25] = "\\u0019"; - expectedNullChars[26] = "\\u001a"; - expectedNullChars[27] = "\\u001b"; - expectedNullChars[28] = "\\u001c"; - expectedNullChars[29] = "\\u001d"; - expectedNullChars[30] = "\\u001e"; - expectedNullChars[31] = "\\u001f"; +var expectedNullChars = new Array(); +expectedNullChars[0] = "\\u0000"; +expectedNullChars[1] = "\\u0001"; +expectedNullChars[2] = "\\u0002"; +expectedNullChars[3] = "\\u0003"; +expectedNullChars[4] = "\\u0004"; +expectedNullChars[5] = "\\u0005"; +expectedNullChars[6] = "\\u0006"; +expectedNullChars[7] = "\\u0007"; +expectedNullChars[8] = "\\b"; +expectedNullChars[9] = "\\t"; +expectedNullChars[10] = "\\n"; +expectedNullChars[11] = "\\u000b"; +expectedNullChars[12] = "\\f"; +expectedNullChars[13] = "\\r"; +expectedNullChars[14] = "\\u000e"; +expectedNullChars[15] = "\\u000f"; +expectedNullChars[16] = "\\u0010"; +expectedNullChars[17] = "\\u0011"; +expectedNullChars[18] = "\\u0012"; +expectedNullChars[19] = "\\u0013"; +expectedNullChars[20] = "\\u0014"; +expectedNullChars[21] = "\\u0015"; +expectedNullChars[22] = "\\u0016"; +expectedNullChars[23] = "\\u0017"; +expectedNullChars[24] = "\\u0018"; +expectedNullChars[25] = "\\u0019"; +expectedNullChars[26] = "\\u001a"; +expectedNullChars[27] = "\\u001b"; +expectedNullChars[28] = "\\u001c"; +expectedNullChars[29] = "\\u001d"; +expectedNullChars[30] = "\\u001e"; +expectedNullChars[31] = "\\u001f"; - for (var index in expectedNullChars) { +for (var index in expectedNullChars) { - var str = JSON.stringify({ "name": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F" }); - result = (result && str.indexOf(expectedNullChars[index]) !== -1); - } + var str = JSON.stringify({ + "name": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F" + }); + result = (result && str.indexOf(expectedNullChars[index]) !== -1); +} assert(result, 'result !== true'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-22.js b/test/built-ins/JSON/stringify/15.12.3-11-22.js index 238b6c35f7cfde5ab6254d50ba4c891c0c149ab7..eec1325004d82a8c207601cfc4697c6be4613c4f 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-22.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-22.js @@ -9,46 +9,48 @@ description: > operation Quote(value) step 2.c) ---*/ - var result = true; +var result = true; - var expectedNullChars = new Array(); - expectedNullChars[0] = "\\u0000"; - expectedNullChars[1] = "\\u0001"; - expectedNullChars[2] = "\\u0002"; - expectedNullChars[3] = "\\u0003"; - expectedNullChars[4] = "\\u0004"; - expectedNullChars[5] = "\\u0005"; - expectedNullChars[6] = "\\u0006"; - expectedNullChars[7] = "\\u0007"; - expectedNullChars[8] = "\\b"; - expectedNullChars[9] = "\\t"; - expectedNullChars[10] = "\\n"; - expectedNullChars[11] = "\\u000b"; - expectedNullChars[12] = "\\f"; - expectedNullChars[13] = "\\r"; - expectedNullChars[14] = "\\u000e"; - expectedNullChars[15] = "\\u000f"; - expectedNullChars[16] = "\\u0010"; - expectedNullChars[17] = "\\u0011"; - expectedNullChars[18] = "\\u0012"; - expectedNullChars[19] = "\\u0013"; - expectedNullChars[20] = "\\u0014"; - expectedNullChars[21] = "\\u0015"; - expectedNullChars[22] = "\\u0016"; - expectedNullChars[23] = "\\u0017"; - expectedNullChars[24] = "\\u0018"; - expectedNullChars[25] = "\\u0019"; - expectedNullChars[26] = "\\u001a"; - expectedNullChars[27] = "\\u001b"; - expectedNullChars[28] = "\\u001c"; - expectedNullChars[29] = "\\u001d"; - expectedNullChars[30] = "\\u001e"; - expectedNullChars[31] = "\\u001f"; +var expectedNullChars = new Array(); +expectedNullChars[0] = "\\u0000"; +expectedNullChars[1] = "\\u0001"; +expectedNullChars[2] = "\\u0002"; +expectedNullChars[3] = "\\u0003"; +expectedNullChars[4] = "\\u0004"; +expectedNullChars[5] = "\\u0005"; +expectedNullChars[6] = "\\u0006"; +expectedNullChars[7] = "\\u0007"; +expectedNullChars[8] = "\\b"; +expectedNullChars[9] = "\\t"; +expectedNullChars[10] = "\\n"; +expectedNullChars[11] = "\\u000b"; +expectedNullChars[12] = "\\f"; +expectedNullChars[13] = "\\r"; +expectedNullChars[14] = "\\u000e"; +expectedNullChars[15] = "\\u000f"; +expectedNullChars[16] = "\\u0010"; +expectedNullChars[17] = "\\u0011"; +expectedNullChars[18] = "\\u0012"; +expectedNullChars[19] = "\\u0013"; +expectedNullChars[20] = "\\u0014"; +expectedNullChars[21] = "\\u0015"; +expectedNullChars[22] = "\\u0016"; +expectedNullChars[23] = "\\u0017"; +expectedNullChars[24] = "\\u0018"; +expectedNullChars[25] = "\\u0019"; +expectedNullChars[26] = "\\u001a"; +expectedNullChars[27] = "\\u001b"; +expectedNullChars[28] = "\\u001c"; +expectedNullChars[29] = "\\u001d"; +expectedNullChars[30] = "\\u001e"; +expectedNullChars[31] = "\\u001f"; - for (var index in expectedNullChars) { +for (var index in expectedNullChars) { - var str = JSON.stringify({ "name": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001FJohn" }); - result = (result && str.indexOf(expectedNullChars[index]) !== -1); - } + var str = JSON.stringify({ + "name": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001FJohn" + }); + result = (result && str.indexOf(expectedNullChars[index]) !== -1); +} assert(result, 'result !== true'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-23.js b/test/built-ins/JSON/stringify/15.12.3-11-23.js index c19435273b6438a01d5e5bc4a33915a572ae2c13..982968f34db12bbf4fba31480f94bb9cc7da7256 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-23.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-23.js @@ -9,46 +9,48 @@ description: > Quote(value) step 2.c) ---*/ - var result = true; +var result = true; - var expectedNullChars = new Array(); - expectedNullChars[0] = "\\u0000"; - expectedNullChars[1] = "\\u0001"; - expectedNullChars[2] = "\\u0002"; - expectedNullChars[3] = "\\u0003"; - expectedNullChars[4] = "\\u0004"; - expectedNullChars[5] = "\\u0005"; - expectedNullChars[6] = "\\u0006"; - expectedNullChars[7] = "\\u0007"; - expectedNullChars[8] = "\\b"; - expectedNullChars[9] = "\\t"; - expectedNullChars[10] = "\\n"; - expectedNullChars[11] = "\\u000b"; - expectedNullChars[12] = "\\f"; - expectedNullChars[13] = "\\r"; - expectedNullChars[14] = "\\u000e"; - expectedNullChars[15] = "\\u000f"; - expectedNullChars[16] = "\\u0010"; - expectedNullChars[17] = "\\u0011"; - expectedNullChars[18] = "\\u0012"; - expectedNullChars[19] = "\\u0013"; - expectedNullChars[20] = "\\u0014"; - expectedNullChars[21] = "\\u0015"; - expectedNullChars[22] = "\\u0016"; - expectedNullChars[23] = "\\u0017"; - expectedNullChars[24] = "\\u0018"; - expectedNullChars[25] = "\\u0019"; - expectedNullChars[26] = "\\u001a"; - expectedNullChars[27] = "\\u001b"; - expectedNullChars[28] = "\\u001c"; - expectedNullChars[29] = "\\u001d"; - expectedNullChars[30] = "\\u001e"; - expectedNullChars[31] = "\\u001f"; +var expectedNullChars = new Array(); +expectedNullChars[0] = "\\u0000"; +expectedNullChars[1] = "\\u0001"; +expectedNullChars[2] = "\\u0002"; +expectedNullChars[3] = "\\u0003"; +expectedNullChars[4] = "\\u0004"; +expectedNullChars[5] = "\\u0005"; +expectedNullChars[6] = "\\u0006"; +expectedNullChars[7] = "\\u0007"; +expectedNullChars[8] = "\\b"; +expectedNullChars[9] = "\\t"; +expectedNullChars[10] = "\\n"; +expectedNullChars[11] = "\\u000b"; +expectedNullChars[12] = "\\f"; +expectedNullChars[13] = "\\r"; +expectedNullChars[14] = "\\u000e"; +expectedNullChars[15] = "\\u000f"; +expectedNullChars[16] = "\\u0010"; +expectedNullChars[17] = "\\u0011"; +expectedNullChars[18] = "\\u0012"; +expectedNullChars[19] = "\\u0013"; +expectedNullChars[20] = "\\u0014"; +expectedNullChars[21] = "\\u0015"; +expectedNullChars[22] = "\\u0016"; +expectedNullChars[23] = "\\u0017"; +expectedNullChars[24] = "\\u0018"; +expectedNullChars[25] = "\\u0019"; +expectedNullChars[26] = "\\u001a"; +expectedNullChars[27] = "\\u001b"; +expectedNullChars[28] = "\\u001c"; +expectedNullChars[29] = "\\u001d"; +expectedNullChars[30] = "\\u001e"; +expectedNullChars[31] = "\\u001f"; - for (var index in expectedNullChars) { +for (var index in expectedNullChars) { - var str = JSON.stringify({ "name": "John\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F" }); - result = (result && str.indexOf(expectedNullChars[index]) !== -1); - } + var str = JSON.stringify({ + "name": "John\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F" + }); + result = (result && str.indexOf(expectedNullChars[index]) !== -1); +} assert(result, 'result !== true'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-24.js b/test/built-ins/JSON/stringify/15.12.3-11-24.js index 17a9c9631e5375609428a82c92fb5f88a26a32c2..3fc4140a2c953b2a6ca0214912bfb5a190175001 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-24.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-24.js @@ -9,46 +9,48 @@ description: > operation Quote(value) step 2.c) ---*/ - var result = true; +var result = true; - var expectedNullChars = new Array(); - expectedNullChars[0] = "\\u0000"; - expectedNullChars[1] = "\\u0001"; - expectedNullChars[2] = "\\u0002"; - expectedNullChars[3] = "\\u0003"; - expectedNullChars[4] = "\\u0004"; - expectedNullChars[5] = "\\u0005"; - expectedNullChars[6] = "\\u0006"; - expectedNullChars[7] = "\\u0007"; - expectedNullChars[8] = "\\b"; - expectedNullChars[9] = "\\t"; - expectedNullChars[10] = "\\n"; - expectedNullChars[11] = "\\u000b"; - expectedNullChars[12] = "\\f"; - expectedNullChars[13] = "\\r"; - expectedNullChars[14] = "\\u000e"; - expectedNullChars[15] = "\\u000f"; - expectedNullChars[16] = "\\u0010"; - expectedNullChars[17] = "\\u0011"; - expectedNullChars[18] = "\\u0012"; - expectedNullChars[19] = "\\u0013"; - expectedNullChars[20] = "\\u0014"; - expectedNullChars[21] = "\\u0015"; - expectedNullChars[22] = "\\u0016"; - expectedNullChars[23] = "\\u0017"; - expectedNullChars[24] = "\\u0018"; - expectedNullChars[25] = "\\u0019"; - expectedNullChars[26] = "\\u001a"; - expectedNullChars[27] = "\\u001b"; - expectedNullChars[28] = "\\u001c"; - expectedNullChars[29] = "\\u001d"; - expectedNullChars[30] = "\\u001e"; - expectedNullChars[31] = "\\u001f"; +var expectedNullChars = new Array(); +expectedNullChars[0] = "\\u0000"; +expectedNullChars[1] = "\\u0001"; +expectedNullChars[2] = "\\u0002"; +expectedNullChars[3] = "\\u0003"; +expectedNullChars[4] = "\\u0004"; +expectedNullChars[5] = "\\u0005"; +expectedNullChars[6] = "\\u0006"; +expectedNullChars[7] = "\\u0007"; +expectedNullChars[8] = "\\b"; +expectedNullChars[9] = "\\t"; +expectedNullChars[10] = "\\n"; +expectedNullChars[11] = "\\u000b"; +expectedNullChars[12] = "\\f"; +expectedNullChars[13] = "\\r"; +expectedNullChars[14] = "\\u000e"; +expectedNullChars[15] = "\\u000f"; +expectedNullChars[16] = "\\u0010"; +expectedNullChars[17] = "\\u0011"; +expectedNullChars[18] = "\\u0012"; +expectedNullChars[19] = "\\u0013"; +expectedNullChars[20] = "\\u0014"; +expectedNullChars[21] = "\\u0015"; +expectedNullChars[22] = "\\u0016"; +expectedNullChars[23] = "\\u0017"; +expectedNullChars[24] = "\\u0018"; +expectedNullChars[25] = "\\u0019"; +expectedNullChars[26] = "\\u001a"; +expectedNullChars[27] = "\\u001b"; +expectedNullChars[28] = "\\u001c"; +expectedNullChars[29] = "\\u001d"; +expectedNullChars[30] = "\\u001e"; +expectedNullChars[31] = "\\u001f"; - for (var index in expectedNullChars) { +for (var index in expectedNullChars) { - var str = JSON.stringify({ "name": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001FJohn\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F" }); - result = (result && str.indexOf(expectedNullChars[index]) !== -1 && str.indexOf(expectedNullChars[index]) !== -1); - } + var str = JSON.stringify({ + "name": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001FJohn\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F" + }); + result = (result && str.indexOf(expectedNullChars[index]) !== -1 && str.indexOf(expectedNullChars[index]) !== -1); +} assert(result, 'result !== true'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-25.js b/test/built-ins/JSON/stringify/15.12.3-11-25.js index 146d71200ebd7d25e55da71dbc8a43117a05b3e5..9a26fa418138329b7ecb4d9ad94fb9372f9a0acb 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-25.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-25.js @@ -9,46 +9,48 @@ description: > operation Quote(value) step 2.c) ---*/ - var result = true; +var result = true; - var expectedNullChars = new Array(); - expectedNullChars[0] = "\\u0000"; - expectedNullChars[1] = "\\u0001"; - expectedNullChars[2] = "\\u0002"; - expectedNullChars[3] = "\\u0003"; - expectedNullChars[4] = "\\u0004"; - expectedNullChars[5] = "\\u0005"; - expectedNullChars[6] = "\\u0006"; - expectedNullChars[7] = "\\u0007"; - expectedNullChars[8] = "\\b"; - expectedNullChars[9] = "\\t"; - expectedNullChars[10] = "\\n"; - expectedNullChars[11] = "\\u000b"; - expectedNullChars[12] = "\\f"; - expectedNullChars[13] = "\\r"; - expectedNullChars[14] = "\\u000e"; - expectedNullChars[15] = "\\u000f"; - expectedNullChars[16] = "\\u0010"; - expectedNullChars[17] = "\\u0011"; - expectedNullChars[18] = "\\u0012"; - expectedNullChars[19] = "\\u0013"; - expectedNullChars[20] = "\\u0014"; - expectedNullChars[21] = "\\u0015"; - expectedNullChars[22] = "\\u0016"; - expectedNullChars[23] = "\\u0017"; - expectedNullChars[24] = "\\u0018"; - expectedNullChars[25] = "\\u0019"; - expectedNullChars[26] = "\\u001a"; - expectedNullChars[27] = "\\u001b"; - expectedNullChars[28] = "\\u001c"; - expectedNullChars[29] = "\\u001d"; - expectedNullChars[30] = "\\u001e"; - expectedNullChars[31] = "\\u001f"; +var expectedNullChars = new Array(); +expectedNullChars[0] = "\\u0000"; +expectedNullChars[1] = "\\u0001"; +expectedNullChars[2] = "\\u0002"; +expectedNullChars[3] = "\\u0003"; +expectedNullChars[4] = "\\u0004"; +expectedNullChars[5] = "\\u0005"; +expectedNullChars[6] = "\\u0006"; +expectedNullChars[7] = "\\u0007"; +expectedNullChars[8] = "\\b"; +expectedNullChars[9] = "\\t"; +expectedNullChars[10] = "\\n"; +expectedNullChars[11] = "\\u000b"; +expectedNullChars[12] = "\\f"; +expectedNullChars[13] = "\\r"; +expectedNullChars[14] = "\\u000e"; +expectedNullChars[15] = "\\u000f"; +expectedNullChars[16] = "\\u0010"; +expectedNullChars[17] = "\\u0011"; +expectedNullChars[18] = "\\u0012"; +expectedNullChars[19] = "\\u0013"; +expectedNullChars[20] = "\\u0014"; +expectedNullChars[21] = "\\u0015"; +expectedNullChars[22] = "\\u0016"; +expectedNullChars[23] = "\\u0017"; +expectedNullChars[24] = "\\u0018"; +expectedNullChars[25] = "\\u0019"; +expectedNullChars[26] = "\\u001a"; +expectedNullChars[27] = "\\u001b"; +expectedNullChars[28] = "\\u001c"; +expectedNullChars[29] = "\\u001d"; +expectedNullChars[30] = "\\u001e"; +expectedNullChars[31] = "\\u001f"; - for (var index in expectedNullChars) { +for (var index in expectedNullChars) { - var str = JSON.stringify({ "name": "Jo\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001Fhn" }); - result = (result && str.indexOf(expectedNullChars[index]) !== -1 && str.indexOf(expectedNullChars[index]) !== -1); - } + var str = JSON.stringify({ + "name": "Jo\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000A\u000B\u000C\u000D\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001Fhn" + }); + result = (result && str.indexOf(expectedNullChars[index]) !== -1 && str.indexOf(expectedNullChars[index]) !== -1); +} assert(result, 'result !== true'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-26.js b/test/built-ins/JSON/stringify/15.12.3-11-26.js index a04f354a098170238eabc589e5c44f6c2c499437..142160ce5d3f41542b96105fae6385568de24af3 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-26.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-26.js @@ -8,11 +8,11 @@ description: > abstract operation JA(value) step 10.b.iii) ---*/ - var arrObj = []; - arrObj[0] = "a"; - arrObj[1] = "b"; - arrObj[2] = "c"; +var arrObj = []; +arrObj[0] = "a"; +arrObj[1] = "b"; +arrObj[2] = "c"; - var jsonText = JSON.stringify(arrObj, undefined, "").toString(); +var jsonText = JSON.stringify(arrObj, undefined, "").toString(); assert.sameValue(jsonText.charAt(jsonText.length - 1), "]", 'jsonText.charAt(jsonText.length - 1)'); diff --git a/test/built-ins/JSON/stringify/15.12.3-4-1.js b/test/built-ins/JSON/stringify/15.12.3-4-1.js index 0f7eafd118d0e7773753b740eab3765e63bdadfe..d681486988ddabe5a1abbb9452122b346686690c 100644 --- a/test/built-ins/JSON/stringify/15.12.3-4-1.js +++ b/test/built-ins/JSON/stringify/15.12.3-4-1.js @@ -8,4 +8,4 @@ description: > or arrays.. ---*/ -assert.sameValue(JSON.stringify([42],{}), '[42]', 'JSON.stringify([42],{})'); +assert.sameValue(JSON.stringify([42], {}), '[42]', 'JSON.stringify([42],{})'); diff --git a/test/built-ins/JSON/stringify/15.12.3-5-a-i-1.js b/test/built-ins/JSON/stringify/15.12.3-5-a-i-1.js index 719f653c9f42ec26288dfc046e48380156defa8b..0304b03c2f2fa73f214ba17b81acff2977875049 100644 --- a/test/built-ins/JSON/stringify/15.12.3-5-a-i-1.js +++ b/test/built-ins/JSON/stringify/15.12.3-5-a-i-1.js @@ -8,6 +8,15 @@ description: > Number values ---*/ - var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; +var obj = { + a1: { + b1: [1, 2, 3, 4], + b2: { + c1: 1, + c2: 2 + } + }, + a2: 'a2' +}; -assert.sameValue(JSON.stringify(obj,null, new Number(5)), JSON.stringify(obj,null, 5), 'JSON.stringify(obj,null, new Number(5))'); +assert.sameValue(JSON.stringify(obj, null, new Number(5)), JSON.stringify(obj, null, 5), 'JSON.stringify(obj,null, new Number(5))'); diff --git a/test/built-ins/JSON/stringify/15.12.3-5-b-i-1.js b/test/built-ins/JSON/stringify/15.12.3-5-b-i-1.js index 034123aec18624d3cbe726a826326b537dd8166b..baf3d06f5d126585bcb0360ddfb269b08d977396 100644 --- a/test/built-ins/JSON/stringify/15.12.3-5-b-i-1.js +++ b/test/built-ins/JSON/stringify/15.12.3-5-b-i-1.js @@ -8,6 +8,15 @@ description: > String values ---*/ - var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; +var obj = { + a1: { + b1: [1, 2, 3, 4], + b2: { + c1: 1, + c2: 2 + } + }, + a2: 'a2' +}; -assert.sameValue(JSON.stringify(obj,null, new String('xxx')), JSON.stringify(obj,null, 'xxx'), 'JSON.stringify(obj,null, new String("xxx"))'); +assert.sameValue(JSON.stringify(obj, null, new String('xxx')), JSON.stringify(obj, null, 'xxx'), 'JSON.stringify(obj,null, new String("xxx"))'); diff --git a/test/built-ins/JSON/stringify/15.12.3-6-a-1.js b/test/built-ins/JSON/stringify/15.12.3-6-a-1.js index fd0d4ded4bc661b563f4b5b64276aad30b80660c..2d7e6386f07519b53864816acd54242b6fb49f0e 100644 --- a/test/built-ins/JSON/stringify/15.12.3-6-a-1.js +++ b/test/built-ins/JSON/stringify/15.12.3-6-a-1.js @@ -8,6 +8,15 @@ description: > same as a space argument of 10. ---*/ - var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; +var obj = { + a1: { + b1: [1, 2, 3, 4], + b2: { + c1: 1, + c2: 2 + } + }, + a2: 'a2' +}; -assert.sameValue(JSON.stringify(obj,null, 10), JSON.stringify(obj,null, 100), 'JSON.stringify(obj,null, 10)'); +assert.sameValue(JSON.stringify(obj, null, 10), JSON.stringify(obj, null, 100), 'JSON.stringify(obj,null, 10)'); diff --git a/test/built-ins/JSON/stringify/15.12.3-6-a-2.js b/test/built-ins/JSON/stringify/15.12.3-6-a-2.js index 1cfe50a805e12491c66f7893b2505ed061892660..16349f1f3d6a51db3534d4ca21c4fd4415b34671 100644 --- a/test/built-ins/JSON/stringify/15.12.3-6-a-2.js +++ b/test/built-ins/JSON/stringify/15.12.3-6-a-2.js @@ -8,6 +8,15 @@ description: > their integer part. ---*/ - var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; +var obj = { + a1: { + b1: [1, 2, 3, 4], + b2: { + c1: 1, + c2: 2 + } + }, + a2: 'a2' +}; -assert.sameValue(JSON.stringify(obj,null, 5.99999), JSON.stringify(obj,null, 5), 'JSON.stringify(obj,null, 5.99999)'); +assert.sameValue(JSON.stringify(obj, null, 5.99999), JSON.stringify(obj, null, 5), 'JSON.stringify(obj,null, 5.99999)'); diff --git a/test/built-ins/JSON/stringify/15.12.3-6-b-1.js b/test/built-ins/JSON/stringify/15.12.3-6-b-1.js index d5eea1024f4028984b22bdf91547a020c0058afd..d178f1eef3b6763abd84a38bfceb0bb4f065b2fc 100644 --- a/test/built-ins/JSON/stringify/15.12.3-6-b-1.js +++ b/test/built-ins/JSON/stringify/15.12.3-6-b-1.js @@ -8,7 +8,16 @@ description: > (0.999999)the same as empty string space argument. ---*/ - var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; +var obj = { + a1: { + b1: [1, 2, 3, 4], + b2: { + c1: 1, + c2: 2 + } + }, + a2: 'a2' +}; /* empty string should be same as no space arg */ -assert.sameValue(JSON.stringify(obj,null, 0.999999), JSON.stringify(obj)); +assert.sameValue(JSON.stringify(obj, null, 0.999999), JSON.stringify(obj)); diff --git a/test/built-ins/JSON/stringify/15.12.3-6-b-2.js b/test/built-ins/JSON/stringify/15.12.3-6-b-2.js index d1bf8401b23a63d115af1b76367fa8bb3f0fd172..504e939e67811ad9fd5e49ac8c8459773153ac28 100644 --- a/test/built-ins/JSON/stringify/15.12.3-6-b-2.js +++ b/test/built-ins/JSON/stringify/15.12.3-6-b-2.js @@ -8,7 +8,16 @@ description: > same as empty string space argument. ---*/ - var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; +var obj = { + a1: { + b1: [1, 2, 3, 4], + b2: { + c1: 1, + c2: 2 + } + }, + a2: 'a2' +}; /* empty string should be same as no space arg */ -assert.sameValue(JSON.stringify(obj,null, 0), JSON.stringify(obj)); +assert.sameValue(JSON.stringify(obj, null, 0), JSON.stringify(obj)); diff --git a/test/built-ins/JSON/stringify/15.12.3-6-b-3.js b/test/built-ins/JSON/stringify/15.12.3-6-b-3.js index 9310f9470bbf95674b6ebb0d0c95a96b79c285b5..92db3c82542919b2b3befb620b1cf62b6e625f4a 100644 --- a/test/built-ins/JSON/stringify/15.12.3-6-b-3.js +++ b/test/built-ins/JSON/stringify/15.12.3-6-b-3.js @@ -8,7 +8,16 @@ description: > same as empty string space argument. ---*/ - var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; +var obj = { + a1: { + b1: [1, 2, 3, 4], + b2: { + c1: 1, + c2: 2 + } + }, + a2: 'a2' +}; - /* empty string should be same as no space arg */ - assert.sameValue(JSON.stringify(obj,null, -5), JSON.stringify(obj)); +/* empty string should be same as no space arg */ +assert.sameValue(JSON.stringify(obj, null, -5), JSON.stringify(obj)); diff --git a/test/built-ins/JSON/stringify/15.12.3-6-b-4.js b/test/built-ins/JSON/stringify/15.12.3-6-b-4.js index de033036742cd7bf9511048a260d4cfa1c40f410..e492e43a3ce14c13af820994604ff6e9f8ab9c0d 100644 --- a/test/built-ins/JSON/stringify/15.12.3-6-b-4.js +++ b/test/built-ins/JSON/stringify/15.12.3-6-b-4.js @@ -8,8 +8,17 @@ description: > is equivalent to a string of spaces of that length. ---*/ - var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; - var fiveSpaces = ' '; - // '12345' +var obj = { + a1: { + b1: [1, 2, 3, 4], + b2: { + c1: 1, + c2: 2 + } + }, + a2: 'a2' +}; +var fiveSpaces = ' '; +// '12345' -assert.sameValue(JSON.stringify(obj,null, 5), JSON.stringify(obj, null, fiveSpaces), 'JSON.stringify(obj,null, 5)'); +assert.sameValue(JSON.stringify(obj, null, 5), JSON.stringify(obj, null, fiveSpaces), 'JSON.stringify(obj,null, 5)'); diff --git a/test/built-ins/JSON/stringify/15.12.3-7-a-1.js b/test/built-ins/JSON/stringify/15.12.3-7-a-1.js index e16a25e6f905bf526a959c939da578fcdb972a31..fd579d854df1151223fa2e0bec5bb1e6465746d6 100644 --- a/test/built-ins/JSON/stringify/15.12.3-7-a-1.js +++ b/test/built-ins/JSON/stringify/15.12.3-7-a-1.js @@ -8,6 +8,15 @@ description: > arguments. ---*/ - var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; +var obj = { + a1: { + b1: [1, 2, 3, 4], + b2: { + c1: 1, + c2: 2 + } + }, + a2: 'a2' +}; -assert.sameValue(JSON.stringify(obj,null, '0123456789xxxxxxxxx'), JSON.stringify(obj,null, '0123456789'), 'JSON.stringify(obj,null, "0123456789xxxxxxxxx")'); +assert.sameValue(JSON.stringify(obj, null, '0123456789xxxxxxxxx'), JSON.stringify(obj, null, '0123456789'), 'JSON.stringify(obj,null, "0123456789xxxxxxxxx")'); diff --git a/test/built-ins/JSON/stringify/15.12.3-8-a-1.js b/test/built-ins/JSON/stringify/15.12.3-8-a-1.js index c95e950e615d1d1f10d10cf74c9cddac1dcee2f8..7fc0583f6140591481963be2d65d49c5cb959f22 100644 --- a/test/built-ins/JSON/stringify/15.12.3-8-a-1.js +++ b/test/built-ins/JSON/stringify/15.12.3-8-a-1.js @@ -8,6 +8,15 @@ description: > missing space argument. ---*/ - var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; +var obj = { + a1: { + b1: [1, 2, 3, 4], + b2: { + c1: 1, + c2: 2 + } + }, + a2: 'a2' +}; -assert.sameValue(JSON.stringify(obj), JSON.stringify(obj,null, ''), 'JSON.stringify(obj)'); +assert.sameValue(JSON.stringify(obj), JSON.stringify(obj, null, ''), 'JSON.stringify(obj)'); diff --git a/test/built-ins/JSON/stringify/15.12.3-8-a-2.js b/test/built-ins/JSON/stringify/15.12.3-8-a-2.js index 0443eb753ac0299ded060fca80cd3f39ac383f6e..eacd51d52c49dee14a1b0ac7a8ea14c11ee1368c 100644 --- a/test/built-ins/JSON/stringify/15.12.3-8-a-2.js +++ b/test/built-ins/JSON/stringify/15.12.3-8-a-2.js @@ -8,6 +8,15 @@ description: > missing space argument. ---*/ - var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; +var obj = { + a1: { + b1: [1, 2, 3, 4], + b2: { + c1: 1, + c2: 2 + } + }, + a2: 'a2' +}; -assert.sameValue(JSON.stringify(obj), JSON.stringify(obj,null, true), 'JSON.stringify(obj)'); +assert.sameValue(JSON.stringify(obj), JSON.stringify(obj, null, true), 'JSON.stringify(obj)'); diff --git a/test/built-ins/JSON/stringify/15.12.3-8-a-3.js b/test/built-ins/JSON/stringify/15.12.3-8-a-3.js index 6d4bc3eb86c3b845f07bbe805f09940344ddd50d..072eb9d5368b75938ac8069d57f6a5420ca76b31 100644 --- a/test/built-ins/JSON/stringify/15.12.3-8-a-3.js +++ b/test/built-ins/JSON/stringify/15.12.3-8-a-3.js @@ -8,6 +8,15 @@ description: > space argument. ---*/ - var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; +var obj = { + a1: { + b1: [1, 2, 3, 4], + b2: { + c1: 1, + c2: 2 + } + }, + a2: 'a2' +}; -assert.sameValue(JSON.stringify(obj), JSON.stringify(obj,null, null), 'JSON.stringify(obj)'); +assert.sameValue(JSON.stringify(obj), JSON.stringify(obj, null, null), 'JSON.stringify(obj)'); diff --git a/test/built-ins/JSON/stringify/15.12.3-8-a-4.js b/test/built-ins/JSON/stringify/15.12.3-8-a-4.js index d13b9c5c80433cab05d92301c6da5d5cb6b083d7..7ac1a28ecfd5e1e39e8add376c548802c6a5e4a7 100644 --- a/test/built-ins/JSON/stringify/15.12.3-8-a-4.js +++ b/test/built-ins/JSON/stringify/15.12.3-8-a-4.js @@ -8,6 +8,15 @@ description: > as a missing space argument. ---*/ - var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; +var obj = { + a1: { + b1: [1, 2, 3, 4], + b2: { + c1: 1, + c2: 2 + } + }, + a2: 'a2' +}; -assert.sameValue(JSON.stringify(obj), JSON.stringify(obj,null, new Boolean(true)), 'JSON.stringify(obj)'); +assert.sameValue(JSON.stringify(obj), JSON.stringify(obj, null, new Boolean(true)), 'JSON.stringify(obj)'); diff --git a/test/built-ins/JSON/stringify/15.12.3-8-a-5.js b/test/built-ins/JSON/stringify/15.12.3-8-a-5.js index 56532c4ecc27e0ea20b1cbd350d4b09c81c7f06b..4f05d178f901d94b6497d5116ff2ccbd4bc9a81a 100644 --- a/test/built-ins/JSON/stringify/15.12.3-8-a-5.js +++ b/test/built-ins/JSON/stringify/15.12.3-8-a-5.js @@ -8,6 +8,15 @@ description: > the same as a missing space argument. ---*/ - var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'}; +var obj = { + a1: { + b1: [1, 2, 3, 4], + b2: { + c1: 1, + c2: 2 + } + }, + a2: 'a2' +}; -assert.sameValue(JSON.stringify(obj), JSON.stringify(obj,null, obj), 'JSON.stringify(obj)'); +assert.sameValue(JSON.stringify(obj), JSON.stringify(obj, null, obj), 'JSON.stringify(obj)'); diff --git a/test/built-ins/JSON/stringify/15.12.3_2-2-b-i-1.js b/test/built-ins/JSON/stringify/15.12.3_2-2-b-i-1.js index 6f6fa62da5c1782c5d07fa6e970a972198a34654..447652a8b16839a310f32a3f509e36df6c619d62 100644 --- a/test/built-ins/JSON/stringify/15.12.3_2-2-b-i-1.js +++ b/test/built-ins/JSON/stringify/15.12.3_2-2-b-i-1.js @@ -8,9 +8,11 @@ description: > toJSON call to literal strings. ---*/ - var obj = { - prop:42, - toJSON: function () {return 'fortytwo objects'} - }; +var obj = { + prop: 42, + toJSON: function() { + return 'fortytwo objects' + } +}; assert.sameValue(JSON.stringify([obj]), '["fortytwo objects"]', 'JSON.stringify([obj])'); diff --git a/test/built-ins/JSON/stringify/15.12.3_2-2-b-i-2.js b/test/built-ins/JSON/stringify/15.12.3_2-2-b-i-2.js index b665d80044c0899da501d028addca9960826c505..aa418fefd56ffade3affe42241e3f138475018d3 100644 --- a/test/built-ins/JSON/stringify/15.12.3_2-2-b-i-2.js +++ b/test/built-ins/JSON/stringify/15.12.3_2-2-b-i-2.js @@ -8,9 +8,11 @@ description: > toJSON call to literal Number. ---*/ - var obj = { - prop:42, - toJSON: function () {return new Number(42)} - }; +var obj = { + prop: 42, + toJSON: function() { + return new Number(42) + } +}; assert.sameValue(JSON.stringify([obj]), '[42]', 'JSON.stringify([obj])'); diff --git a/test/built-ins/JSON/stringify/15.12.3_2-2-b-i-3.js b/test/built-ins/JSON/stringify/15.12.3_2-2-b-i-3.js index 9a192f26c13bc164f3e9a79fb6297680254f6b50..6f4eaccdf1f8e6684efd086c6e852215aa207489 100644 --- a/test/built-ins/JSON/stringify/15.12.3_2-2-b-i-3.js +++ b/test/built-ins/JSON/stringify/15.12.3_2-2-b-i-3.js @@ -8,9 +8,11 @@ description: > toJSON call to literal Boolean values. ---*/ - var obj = { - prop:42, - toJSON: function () {return new Boolean(true)} - }; +var obj = { + prop: 42, + toJSON: function() { + return new Boolean(true) + } +}; assert.sameValue(JSON.stringify([obj]), '[true]', 'JSON.stringify([obj])'); diff --git a/test/built-ins/JSON/stringify/15.12.3_2-3-a-1.js b/test/built-ins/JSON/stringify/15.12.3_2-3-a-1.js index 853acb01d693a6f7fb55a133415254c324118d6a..aefb5d77ca4210e3410a3eaa4ff472d093cf0e6c 100644 --- a/test/built-ins/JSON/stringify/15.12.3_2-3-a-1.js +++ b/test/built-ins/JSON/stringify/15.12.3_2-3-a-1.js @@ -8,4 +8,6 @@ description: > replacer functions to literal strings. ---*/ -assert.sameValue(JSON.stringify([42], function(k,v) {return v===42? new String('fortytwo'):v}), '["fortytwo"]', 'JSON.stringify([42], function(k,v) {return v===42? new String("fortytwo"):v})'); +assert.sameValue(JSON.stringify([42], function(k, v) { + return v === 42 ? new String('fortytwo') : v +}), '["fortytwo"]', 'JSON.stringify([42], function(k,v) {return v===42? new String("fortytwo"):v})'); diff --git a/test/built-ins/JSON/stringify/15.12.3_2-3-a-2.js b/test/built-ins/JSON/stringify/15.12.3_2-3-a-2.js index 7888996d77a7f1501871296d41270a8742b67e6f..87b0df0ac0627dcf02bdf105e1ecca5e4a2669f8 100644 --- a/test/built-ins/JSON/stringify/15.12.3_2-3-a-2.js +++ b/test/built-ins/JSON/stringify/15.12.3_2-3-a-2.js @@ -8,4 +8,6 @@ description: > replacer functions to literal numbers. ---*/ -assert.sameValue(JSON.stringify([42], function(k,v) {return v===42? new Number(84):v}), '[84]', 'JSON.stringify([42], function(k,v) {return v===42? new Number(84):v})'); +assert.sameValue(JSON.stringify([42], function(k, v) { + return v === 42 ? new Number(84) : v +}), '[84]', 'JSON.stringify([42], function(k,v) {return v===42? new Number(84):v})'); diff --git a/test/built-ins/JSON/stringify/15.12.3_2-3-a-3.js b/test/built-ins/JSON/stringify/15.12.3_2-3-a-3.js index adb582fe2016c60122f9b180a303f6a459b0cc75..a26ae4b2f03e70f1f61ad855d8e0c10fb7e1ea2a 100644 --- a/test/built-ins/JSON/stringify/15.12.3_2-3-a-3.js +++ b/test/built-ins/JSON/stringify/15.12.3_2-3-a-3.js @@ -8,4 +8,6 @@ description: > replacer functions to literal numbers. ---*/ -assert.sameValue(JSON.stringify([42], function(k,v) {return v===42? new Boolean(false):v}), '[false]', 'JSON.stringify([42], function(k,v) {return v===42? new Boolean(false):v})'); +assert.sameValue(JSON.stringify([42], function(k, v) { + return v === 42 ? new Boolean(false) : v +}), '[false]', 'JSON.stringify([42], function(k,v) {return v===42? new Boolean(false):v})'); diff --git a/test/built-ins/JSON/stringify/15.12.3_4-1-1.js b/test/built-ins/JSON/stringify/15.12.3_4-1-1.js index f9b5f68ab3b846ae3519141110ab98784b4602ae..40b42f57424a7a39b03bc1af9b8aa92481a9fa2d 100644 --- a/test/built-ins/JSON/stringify/15.12.3_4-1-1.js +++ b/test/built-ins/JSON/stringify/15.12.3_4-1-1.js @@ -6,9 +6,9 @@ es5id: 15.12.3_4-1-1 description: JSON.stringify a circular object throws a error ---*/ - var obj = {}; - obj.prop = obj; +var obj = {}; +obj.prop = obj; assert.throws(TypeError, function() { - JSON.stringify(obj); + JSON.stringify(obj); }); diff --git a/test/built-ins/JSON/stringify/15.12.3_4-1-2.js b/test/built-ins/JSON/stringify/15.12.3_4-1-2.js index a79907bd0faa48d401ce7a84a3e01eeaec4ee8aa..299853c9164d41fd05d63bcf17e2fe28dbe766aa 100644 --- a/test/built-ins/JSON/stringify/15.12.3_4-1-2.js +++ b/test/built-ins/JSON/stringify/15.12.3_4-1-2.js @@ -6,9 +6,9 @@ es5id: 15.12.3_4-1-2 description: JSON.stringify a circular object throws a TypeError ---*/ - var obj = {}; - obj.prop = obj; +var obj = {}; +obj.prop = obj; assert.throws(TypeError, function() { - JSON.stringify(obj); + JSON.stringify(obj); }); diff --git a/test/built-ins/JSON/stringify/15.12.3_4-1-3.js b/test/built-ins/JSON/stringify/15.12.3_4-1-3.js index 30d0a4339c7bd45721d0047404f0321b62b3bbc1..feb1a6c9c30ed52d16c9a1b31b2f9f4b7246895a 100644 --- a/test/built-ins/JSON/stringify/15.12.3_4-1-3.js +++ b/test/built-ins/JSON/stringify/15.12.3_4-1-3.js @@ -6,9 +6,13 @@ es5id: 15.12.3_4-1-3 description: JSON.stringify a indirectly circular object throws a error ---*/ - var obj = {p1: {p2: {}}}; - obj.p1.p2.prop = obj; +var obj = { + p1: { + p2: {} + } +}; +obj.p1.p2.prop = obj; assert.throws(TypeError, function() { - JSON.stringify(obj); + JSON.stringify(obj); });