From 3de16a5e9471b1dad61611f4742d416d2dee1edb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bargull?= Date: Wed, 30 Apr 2025 14:16:02 +0200 Subject: [PATCH] Remove print calls in sm/JSON --- .../sm/JSON/cyclic-stringify-unrelated.js | 15 +-------------- test/staging/sm/JSON/cyclic-stringify.js | 17 +---------------- test/staging/sm/JSON/parse-arguments.js | 16 +--------------- test/staging/sm/JSON/parse-crockford-01.js | 5 +---- test/staging/sm/JSON/parse-mega-huge-array.js | 16 +--------------- test/staging/sm/JSON/parse-primitives.js | 5 +---- .../sm/JSON/parse-reviver-array-delete.js | 17 +---------------- test/staging/sm/JSON/parse-reviver.js | 5 +---- test/staging/sm/JSON/parse.js | 4 ---- .../sm/JSON/stringify-boxed-primitives.js | 16 +--------------- .../sm/JSON/stringify-call-replacer-once.js | 16 +--------------- .../sm/JSON/stringify-call-toJSON-once.js | 16 +--------------- .../sm/JSON/stringify-dropping-elements.js | 5 +---- test/staging/sm/JSON/stringify-gap.js | 17 +---------------- .../stringify-ignore-noncallable-toJSON.js | 16 +--------------- .../sm/JSON/stringify-large-replacer-array.js | 16 +--------------- .../sm/JSON/stringify-missing-arguments.js | 16 +--------------- .../stringify-nonarray-noncallable-replacer.js | 17 +---------------- test/staging/sm/JSON/stringify-primitives.js | 5 +---- .../stringify-replacer-array-boxed-elements.js | 16 +--------------- ...ingify-replacer-array-duplicated-element.js | 18 +----------------- ...fy-replacer-array-edgecase-jsid-elements.js | 18 +----------------- .../JSON/stringify-replacer-array-hijinks.js | 18 +----------------- ...stringify-replacer-array-skipped-element.js | 18 +----------------- .../stringify-replacer-array-trailing-holes.js | 18 +----------------- .../stringify-replacer-with-array-indexes.js | 17 +---------------- test/staging/sm/JSON/stringify-replacer.js | 5 +---- .../sm/JSON/stringify-special-escapes.js | 17 +---------------- .../sm/JSON/stringify-toJSON-arguments.js | 16 +--------------- test/staging/sm/JSON/stringify.js | 5 +---- 30 files changed, 29 insertions(+), 377 deletions(-) diff --git a/test/staging/sm/JSON/cyclic-stringify-unrelated.js b/test/staging/sm/JSON/cyclic-stringify-unrelated.js index c2057bd461..380915b201 100644 --- a/test/staging/sm/JSON/cyclic-stringify-unrelated.js +++ b/test/staging/sm/JSON/cyclic-stringify-unrelated.js @@ -8,18 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js] flags: - noStrict description: | - pending + JSON.stringify shouldn't use context-wide cycle detection esid: pending ---*/ -//----------------------------------------------------------------------------- -var BUGNUMBER = 1197097; -var summary = "JSON.stringify shouldn't use context-wide cycle detection"; - -print(BUGNUMBER + ": " + summary); - -/************** - * BEGIN TEST * - **************/ var arr; @@ -40,7 +31,3 @@ arr = [{ } }]; assert.sameValue(arr.join(), "[{}]"); - -/******************************************************************************/ - -print("Tests complete"); diff --git a/test/staging/sm/JSON/cyclic-stringify.js b/test/staging/sm/JSON/cyclic-stringify.js index 32311b9373..1f96ba07fe 100644 --- a/test/staging/sm/JSON/cyclic-stringify.js +++ b/test/staging/sm/JSON/cyclic-stringify.js @@ -8,20 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js] flags: - noStrict description: | - pending + Properly detect cycles in JSON.stringify (throw TypeError, check for cycles rather than imprecisely rely on recursion limits) esid: pending ---*/ -//----------------------------------------------------------------------------- -var BUGNUMBER = 578273; -var summary = - "ES5: Properly detect cycles in JSON.stringify (throw TypeError, check for " + - "cycles rather than imprecisely rely on recursion limits)"; - -print(BUGNUMBER + ": " + summary); - -/************** - * BEGIN TEST * - **************/ // objects @@ -101,7 +90,3 @@ catch (e) assert.sameValue(count, 2, "cyclic data structures not detected immediately"); } - -/******************************************************************************/ - -print("Tests complete"); diff --git a/test/staging/sm/JSON/parse-arguments.js b/test/staging/sm/JSON/parse-arguments.js index e5a836d458..fc12923a76 100644 --- a/test/staging/sm/JSON/parse-arguments.js +++ b/test/staging/sm/JSON/parse-arguments.js @@ -8,19 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js] flags: - noStrict description: | - pending + JSON.parse handling of omitted arguments esid: pending ---*/ -var gTestfile = 'parse-arguments.js'; -//----------------------------------------------------------------------------- -var BUGNUMBER = 653847; -var summary = "JSON.parse handling of omitted arguments"; - -print(BUGNUMBER + ": " + summary); - -/************** - * BEGIN TEST * - **************/ try { @@ -31,7 +21,3 @@ catch (e) { assert.sameValue(e instanceof SyntaxError, true, "expected syntax error, got: " + e); } - -/******************************************************************************/ - -print("Tests complete"); diff --git a/test/staging/sm/JSON/parse-crockford-01.js b/test/staging/sm/JSON/parse-crockford-01.js index 19f3681446..e984a68a2e 100644 --- a/test/staging/sm/JSON/parse-crockford-01.js +++ b/test/staging/sm/JSON/parse-crockford-01.js @@ -9,6 +9,7 @@ description: | pending esid: pending ---*/ + var str = '[\n' + ' "JSON Test Pattern pass1",\n' + @@ -123,7 +124,3 @@ assert.sameValue(x[16], 1e00); assert.sameValue(x[17], 2e+00); assert.sameValue(x[18], 2e-00); assert.sameValue(x[19], "rosebud"); - -/******************************************************************************/ - -print("Tests complete"); diff --git a/test/staging/sm/JSON/parse-mega-huge-array.js b/test/staging/sm/JSON/parse-mega-huge-array.js index a8cb9c190f..cc61e6e693 100644 --- a/test/staging/sm/JSON/parse-mega-huge-array.js +++ b/test/staging/sm/JSON/parse-mega-huge-array.js @@ -8,19 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js] flags: - noStrict description: | - pending + JSON.parse should parse arrays of essentially unlimited size esid: pending ---*/ -var gTestfile = 'parse-mega-huge-array.js'; -//----------------------------------------------------------------------------- -var BUGNUMBER = 667527; -var summary = "JSON.parse should parse arrays of essentially unlimited size"; - -print(BUGNUMBER + ": " + summary); - -/************** - * BEGIN TEST * - **************/ var body = "0,"; for (var i = 0; i < 21; i++) @@ -29,7 +19,3 @@ var str = '[' + body + '0]'; var arr = JSON.parse(str); assert.sameValue(arr.length, Math.pow(2, 21) + 1); - -/******************************************************************************/ - -print("Tests complete"); diff --git a/test/staging/sm/JSON/parse-primitives.js b/test/staging/sm/JSON/parse-primitives.js index c9dd72c080..7027058d22 100644 --- a/test/staging/sm/JSON/parse-primitives.js +++ b/test/staging/sm/JSON/parse-primitives.js @@ -9,6 +9,7 @@ description: | pending esid: pending ---*/ + var x; // check an empty object, just for sanity @@ -64,7 +65,3 @@ assert.sameValue(x, "\uabcd"); x = JSON.parse('"\\f"'); assert.sameValue(x, "\f"); - -/******************************************************************************/ - -print("Tests complete"); diff --git a/test/staging/sm/JSON/parse-reviver-array-delete.js b/test/staging/sm/JSON/parse-reviver-array-delete.js index 0dd126be5b..b981e8f5aa 100644 --- a/test/staging/sm/JSON/parse-reviver-array-delete.js +++ b/test/staging/sm/JSON/parse-reviver-array-delete.js @@ -8,19 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js] flags: - noStrict description: | - pending + JSON.parse with a reviver which elides array elements esid: pending ---*/ -var gTestfile = 'parse-reviver-array-delete.js'; -//----------------------------------------------------------------------------- -var BUGNUMBER = 999999; -var summary = "JSON.parse with a reviver which elides array elements"; - -print(BUGNUMBER + ": " + summary); - -/************** - * BEGIN TEST * - **************/ /* * The reviver deletes all properties from the to-be-returned array. Thus @@ -89,8 +79,3 @@ assert.sameValue(JSON.parse(str, return undefined; }) + "", expected2); - - -/******************************************************************************/ - -print("Tests complete"); diff --git a/test/staging/sm/JSON/parse-reviver.js b/test/staging/sm/JSON/parse-reviver.js index 777faf7e6a..0b7df1add3 100644 --- a/test/staging/sm/JSON/parse-reviver.js +++ b/test/staging/sm/JSON/parse-reviver.js @@ -9,6 +9,7 @@ description: | pending esid: pending ---*/ + function doubler(k, v) { assert.sameValue(typeof k, "string"); @@ -47,7 +48,3 @@ catch (e) assert.sameValue(e instanceof SyntaxError, true, "wrong exception: " + e); } assert.sameValue(called, false); - -/******************************************************************************/ - -print("Tests complete"); diff --git a/test/staging/sm/JSON/parse.js b/test/staging/sm/JSON/parse.js index 69c0ea38d6..2540822349 100644 --- a/test/staging/sm/JSON/parse.js +++ b/test/staging/sm/JSON/parse.js @@ -177,7 +177,3 @@ assert.sameValue(props[1], "The outermost value"); assert.sameValue(x["JSON Test Pattern pass3"]["The outermost value"], "must be an object or array."); assert.sameValue(x["JSON Test Pattern pass3"]["In this test"], "It is an object."); - -/******************************************************************************/ - -print("Tests complete"); diff --git a/test/staging/sm/JSON/stringify-boxed-primitives.js b/test/staging/sm/JSON/stringify-boxed-primitives.js index 6d15601302..7ab04cc479 100644 --- a/test/staging/sm/JSON/stringify-boxed-primitives.js +++ b/test/staging/sm/JSON/stringify-boxed-primitives.js @@ -8,19 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js] flags: - noStrict description: | - pending + Stringification of Boolean/String/Number objects esid: pending ---*/ -var gTestfile = 'stringify-boxed-primitives.js'; -//----------------------------------------------------------------------------- -var BUGNUMBER = 584909; -var summary = "Stringification of Boolean/String/Number objects"; - -print(BUGNUMBER + ": " + summary); - -/************** - * BEGIN TEST * - **************/ function redefine(obj, prop, fun) { @@ -128,7 +118,3 @@ catch (e) assert.sameValue(e instanceof TypeError, true, "ToString failure, should throw TypeError"); } - -/******************************************************************************/ - -print("All tests passed!"); diff --git a/test/staging/sm/JSON/stringify-call-replacer-once.js b/test/staging/sm/JSON/stringify-call-replacer-once.js index c0d1473253..a34fc551f3 100644 --- a/test/staging/sm/JSON/stringify-call-replacer-once.js +++ b/test/staging/sm/JSON/stringify-call-replacer-once.js @@ -8,19 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js] flags: - noStrict description: | - pending + Call replacer function exactly once per value esid: pending ---*/ -var gTestfile = 'stringify-call-replacer-once.js'; -//----------------------------------------------------------------------------- -var BUGNUMBER = 584909; -var summary = "Call replacer function exactly once per value"; - -print(BUGNUMBER + ": " + summary); - -/************** - * BEGIN TEST * - **************/ var factor = 1; function replacer(k, v) @@ -35,7 +25,3 @@ var obj = { a: 1, b: 2, c: 3 }; assert.sameValue(JSON.stringify(obj, replacer), '{"a":2,"b":6,"c":12}'); assert.sameValue(factor, 4); - -/******************************************************************************/ - -print("Tests complete"); diff --git a/test/staging/sm/JSON/stringify-call-toJSON-once.js b/test/staging/sm/JSON/stringify-call-toJSON-once.js index e8a8b74e3e..773d4b77b0 100644 --- a/test/staging/sm/JSON/stringify-call-toJSON-once.js +++ b/test/staging/sm/JSON/stringify-call-toJSON-once.js @@ -8,19 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js] flags: - noStrict description: | - pending + Stringification of Boolean/String/Number objects esid: pending ---*/ -var gTestfile = 'stringify-call-toJSON-once.js'; -//----------------------------------------------------------------------------- -var BUGNUMBER = 584909; -var summary = "Stringification of Boolean/String/Number objects"; - -print(BUGNUMBER + ": " + summary); - -/************** - * BEGIN TEST * - **************/ var obj = { @@ -33,7 +23,3 @@ var obj = }; assert.sameValue(JSON.stringify(obj), '{"p":{}}'); - -/******************************************************************************/ - -print("Tests complete"); diff --git a/test/staging/sm/JSON/stringify-dropping-elements.js b/test/staging/sm/JSON/stringify-dropping-elements.js index b5f90b2ecb..f7a2293a68 100644 --- a/test/staging/sm/JSON/stringify-dropping-elements.js +++ b/test/staging/sm/JSON/stringify-dropping-elements.js @@ -9,6 +9,7 @@ description: | pending esid: pending ---*/ + assert.sameValue(JSON.stringify({foo: 123}), '{"foo":123}'); assert.sameValue(JSON.stringify({foo: 123, bar: function () {}}), @@ -22,7 +23,3 @@ assert.sameValue(JSON.stringify([123, function () {}]), '[123,null]'); assert.sameValue(JSON.stringify([123, function () {}, 456]), '[123,null,456]'); - -/******************************************************************************/ - -print("Tests complete"); diff --git a/test/staging/sm/JSON/stringify-gap.js b/test/staging/sm/JSON/stringify-gap.js index c48304adbc..7534cb6e01 100644 --- a/test/staging/sm/JSON/stringify-gap.js +++ b/test/staging/sm/JSON/stringify-gap.js @@ -8,20 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js] flags: - noStrict description: | - pending + JSON.stringify(_1, _2, numberGreaterThanOne) produces wrong output esid: pending ---*/ -var gTestfile = 'stringify-gap.js'; -//----------------------------------------------------------------------------- -var BUGNUMBER = 584909; -var summary = - "JSON.stringify(_1, _2, numberGreaterThanOne) produces wrong output"; - -print(BUGNUMBER + ": " + summary); - -/************** - * BEGIN TEST * - **************/ var LF = "\n"; var GAP = " "; @@ -62,7 +51,3 @@ assert.sameValue(JSON.stringify(obj, null, new String(" ")), "[\n--1,\n--2,\n-- Number.prototype.valueOf = function() { return 0; }; assert.sameValue(JSON.stringify(obj, null, new Number(3)), "[1,2,3]"); - -/******************************************************************************/ - -print("All tests passed!"); diff --git a/test/staging/sm/JSON/stringify-ignore-noncallable-toJSON.js b/test/staging/sm/JSON/stringify-ignore-noncallable-toJSON.js index e352d1aa06..963fd688b6 100644 --- a/test/staging/sm/JSON/stringify-ignore-noncallable-toJSON.js +++ b/test/staging/sm/JSON/stringify-ignore-noncallable-toJSON.js @@ -8,19 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js] flags: - noStrict description: | - pending + If the toJSON property isn't callable, don't try to call it esid: pending ---*/ -var gTestfile = 'stringify-ignore-noncallable-toJSON.js'; -//----------------------------------------------------------------------------- -var BUGNUMBER = 584909; -var summary = "If the toJSON property isn't callable, don't try to call it"; - -print(BUGNUMBER + ": " + summary); - -/************** - * BEGIN TEST * - **************/ var obj = { @@ -29,7 +19,3 @@ var obj = }; assert.sameValue(JSON.stringify(obj), '{"p":{"toJSON":null},"m":{"toJSON":{}}}'); - -/******************************************************************************/ - -print("Tests complete"); diff --git a/test/staging/sm/JSON/stringify-large-replacer-array.js b/test/staging/sm/JSON/stringify-large-replacer-array.js index 914e1f22f7..148ab2643a 100644 --- a/test/staging/sm/JSON/stringify-large-replacer-array.js +++ b/test/staging/sm/JSON/stringify-large-replacer-array.js @@ -8,26 +8,12 @@ includes: [sm/non262.js, sm/non262-shell.js] flags: - noStrict description: | - pending + JSON.stringify with a large replacer array esid: pending ---*/ -var gTestfile = 'stringify-large-replacer-array.js'; -//----------------------------------------------------------------------------- -var BUGNUMBER = 816033; -var summary = "JSON.stringify with a large replacer array"; - -print(BUGNUMBER + ": " + summary); - -/************** - * BEGIN TEST * - **************/ var replacer = []; for (var i = 0; i < 4096; i++) replacer.push(i); assert.sameValue(JSON.stringify({ "foopy": "FAIL", "4093": 17 }, replacer), '{"4093":17}'); - -/******************************************************************************/ - -print("Tests complete"); diff --git a/test/staging/sm/JSON/stringify-missing-arguments.js b/test/staging/sm/JSON/stringify-missing-arguments.js index 576246f012..5a56a343b9 100644 --- a/test/staging/sm/JSON/stringify-missing-arguments.js +++ b/test/staging/sm/JSON/stringify-missing-arguments.js @@ -8,22 +8,8 @@ includes: [sm/non262.js, sm/non262-shell.js] flags: - noStrict description: | - pending + JSON.stringify with no arguments esid: pending ---*/ -var gTestfile = 'stringify-missing-arguments.js'; -//----------------------------------------------------------------------------- -var BUGNUMBER = 648471; -var summary = "JSON.stringify with no arguments"; - -print(BUGNUMBER + ": " + summary); - -/************** - * BEGIN TEST * - **************/ assert.sameValue(JSON.stringify(), undefined); - -/******************************************************************************/ - -print("All tests passed!"); diff --git a/test/staging/sm/JSON/stringify-nonarray-noncallable-replacer.js b/test/staging/sm/JSON/stringify-nonarray-noncallable-replacer.js index 2fe6b056ed..0bf796d3dc 100644 --- a/test/staging/sm/JSON/stringify-nonarray-noncallable-replacer.js +++ b/test/staging/sm/JSON/stringify-nonarray-noncallable-replacer.js @@ -8,20 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js] flags: - noStrict description: | - pending + Treat non-array, non-callable replacers as if none had been specified esid: pending ---*/ -var gTestfile = 'stringify-nonarray-noncallable-replacer.js'; -//----------------------------------------------------------------------------- -var BUGNUMBER = 653782; -var summary = - "Treat non-array, non-callable replacers as if none had been specified"; - -print(BUGNUMBER + ": " + summary); - -/************** - * BEGIN TEST * - **************/ var obj = { p: 2 }; var str = '{"p":2}'; @@ -42,7 +31,3 @@ assert.sameValue(JSON.stringify(obj, /abcd/), str); assert.sameValue(JSON.stringify(obj, new Boolean(true)), str); assert.sameValue(JSON.stringify(obj, new Number(42)), str); assert.sameValue(JSON.stringify(obj, new String("aequorin")), str); - -/******************************************************************************/ - -print("Tests complete"); diff --git a/test/staging/sm/JSON/stringify-primitives.js b/test/staging/sm/JSON/stringify-primitives.js index 64baf15657..30cb99192d 100644 --- a/test/staging/sm/JSON/stringify-primitives.js +++ b/test/staging/sm/JSON/stringify-primitives.js @@ -9,6 +9,7 @@ description: | pending esid: pending ---*/ + // sanity var x = JSON.stringify({}); assert.sameValue(x, "{}"); @@ -41,7 +42,3 @@ assert.sameValue(x, '"asdf"'); assert.sameValue(JSON.stringify(undefined), undefined); assert.sameValue(JSON.stringify(function(){}), undefined); assert.sameValue(JSON.stringify(JSON.stringify), undefined); - -/******************************************************************************/ - -print("Tests complete"); diff --git a/test/staging/sm/JSON/stringify-replacer-array-boxed-elements.js b/test/staging/sm/JSON/stringify-replacer-array-boxed-elements.js index bc31dc7883..815cbef110 100644 --- a/test/staging/sm/JSON/stringify-replacer-array-boxed-elements.js +++ b/test/staging/sm/JSON/stringify-replacer-array-boxed-elements.js @@ -8,19 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js] flags: - noStrict description: | - pending + Boxed-string/number objects in replacer arrays esid: pending ---*/ -var gTestfile = 'stringify-replacer-array-boxed-elements.js'; -//----------------------------------------------------------------------------- -var BUGNUMBER = 648471; -var summary = "Boxed-string/number objects in replacer arrays"; - -print(BUGNUMBER + ": " + summary); - -/************** - * BEGIN TEST * - **************/ var S = new String(3); var N = new Number(4); @@ -61,7 +51,3 @@ assert.sameValue(JSON.stringify({ 4: 4, 17: 17 }, [N]), String.prototype.valueOf = function() { return 42; }; assert.sameValue(JSON.stringify({ 3: 3, 42: 42 }, [S]), '{"42":42}'); - -/******************************************************************************/ - -print("Tests complete"); diff --git a/test/staging/sm/JSON/stringify-replacer-array-duplicated-element.js b/test/staging/sm/JSON/stringify-replacer-array-duplicated-element.js index ab59a76f5c..bb4e833517 100644 --- a/test/staging/sm/JSON/stringify-replacer-array-duplicated-element.js +++ b/test/staging/sm/JSON/stringify-replacer-array-duplicated-element.js @@ -8,21 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js] flags: - noStrict description: | - pending + Better/more correct handling for replacer arrays with getter array index properties esid: pending ---*/ -var gTestfile = 'stringify-replacer-array-hijinks.js'; -//----------------------------------------------------------------------------- -var BUGNUMBER = 648471; -var summary = - "Better/more correct handling for replacer arrays with getter array index " + - "properties"; - -print(BUGNUMBER + ": " + summary); - -/************** - * BEGIN TEST * - **************/ var bigOdd = Math.pow(2, 50) + 1; @@ -70,7 +58,3 @@ assert.sameValue(JSON.stringify({ 1: 1 }, [new String(1), new Number(1)]), '{"1" assert.sameValue(JSON.stringify({ 1: 1 }, [new Number(1), new String(1)]), '{"1":1}'); assert.sameValue(JSON.stringify({ 1: 1 }, [new Number(1), new Number(1)]), '{"1":1}'); - -/******************************************************************************/ - -print("Tests complete"); diff --git a/test/staging/sm/JSON/stringify-replacer-array-edgecase-jsid-elements.js b/test/staging/sm/JSON/stringify-replacer-array-edgecase-jsid-elements.js index 3b32de2475..289e3f332d 100644 --- a/test/staging/sm/JSON/stringify-replacer-array-edgecase-jsid-elements.js +++ b/test/staging/sm/JSON/stringify-replacer-array-edgecase-jsid-elements.js @@ -8,21 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js] flags: - noStrict description: | - pending + Better/more correct handling for replacer arrays with getter array index properties esid: pending ---*/ -var gTestfile = 'stringify-replacer-array-edgecase-jsid-elements.js'; -//----------------------------------------------------------------------------- -var BUGNUMBER = 648471; -var summary = - "Better/more correct handling for replacer arrays with getter array index " + - "properties"; - -print(BUGNUMBER + ": " + summary); - -/************** - * BEGIN TEST * - **************/ /* JSID_INT_MIN/MAX copied from jsapi.h. */ @@ -78,7 +66,3 @@ assert.sameValue(JSON.stringify({ "-0": 17, 0: 42 }, ["-0", -0]), assert.sameValue(JSON.stringify({ "-0": 17, 0: 42 }, [-0, "-0"]), '{"0":42,"-0":17}', "Failed to stringify number then string properties (-0, '-0) correctly"); - -/******************************************************************************/ - -print("Tests complete"); diff --git a/test/staging/sm/JSON/stringify-replacer-array-hijinks.js b/test/staging/sm/JSON/stringify-replacer-array-hijinks.js index acb9d60820..a2b0b643d7 100644 --- a/test/staging/sm/JSON/stringify-replacer-array-hijinks.js +++ b/test/staging/sm/JSON/stringify-replacer-array-hijinks.js @@ -8,21 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js] flags: - noStrict description: | - pending + Better/more correct handling for replacer arrays with getter array index properties esid: pending ---*/ -var gTestfile = 'stringify-replacer-array-hijinks.js'; -//----------------------------------------------------------------------------- -var BUGNUMBER = 648471; -var summary = - "Better/more correct handling for replacer arrays with getter array index " + - "properties"; - -print(BUGNUMBER + ": " + summary); - -/************** - * BEGIN TEST * - **************/ var replacer = [0, 1, 2, 3]; Object.prototype[3] = 3; @@ -60,7 +48,3 @@ Object.defineProperty(replacer, 0, { // used to determine property names which will be included in the final string. assert.sameValue(JSON.stringify({ 0: 0, 1: 1, 2: 2, 3: 3 }, replacer), '{"3":3}'); - -/******************************************************************************/ - -print("Tests complete"); diff --git a/test/staging/sm/JSON/stringify-replacer-array-skipped-element.js b/test/staging/sm/JSON/stringify-replacer-array-skipped-element.js index 6b7b5628c0..a1bebc2884 100644 --- a/test/staging/sm/JSON/stringify-replacer-array-skipped-element.js +++ b/test/staging/sm/JSON/stringify-replacer-array-skipped-element.js @@ -8,21 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js] flags: - noStrict description: | - pending + Better/more correct handling for replacer arrays with getter array index properties esid: pending ---*/ -var gTestfile = 'stringify-replacer-array-skipped-element.js'; -//----------------------------------------------------------------------------- -var BUGNUMBER = 648471; -var summary = - "Better/more correct handling for replacer arrays with getter array index " + - "properties"; - -print(BUGNUMBER + ": " + summary); - -/************** - * BEGIN TEST * - **************/ assert.sameValue(JSON.stringify({ 3: 3, 4: 4 }, ["3", { toString: function() { return "4" } }]), @@ -63,7 +51,3 @@ assert.sameValue(JSON.stringify({ 3: 3, null: 4 }, ["3", "null", null]), assert.sameValue(JSON.stringify({ 3: 3, null: 4 }, ["3", null, "null"]), '{"3":3,"null":4}'); - -/******************************************************************************/ - -print("Tests complete"); diff --git a/test/staging/sm/JSON/stringify-replacer-array-trailing-holes.js b/test/staging/sm/JSON/stringify-replacer-array-trailing-holes.js index d98cc37a44..06fb04a109 100644 --- a/test/staging/sm/JSON/stringify-replacer-array-trailing-holes.js +++ b/test/staging/sm/JSON/stringify-replacer-array-trailing-holes.js @@ -8,21 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js] flags: - noStrict description: | - pending + Better/more correct handling for replacer arrays with trailing holes through which inherited elements might appear esid: pending ---*/ -var gTestfile = "stringify-replacer-array-trailing-holes.js"; -//----------------------------------------------------------------------------- -var BUGNUMBER = 1217069; -var summary = - "Better/more correct handling for replacer arrays with trailing holes " + - "through which inherited elements might appear"; - -print(BUGNUMBER + ": " + summary); - -/************** - * BEGIN TEST * - **************/ var obj = { 0: "hi", 1: "n-nao", 2: "run away!", 3: "bye" }; @@ -50,7 +38,3 @@ Object.prototype[3] = 3; assert.sameValue(JSON.stringify(obj, replacer), '{"0":"hi","1":"n-nao","2":"run away!","3":"bye"}'); - -/******************************************************************************/ - -print("Tests complete"); diff --git a/test/staging/sm/JSON/stringify-replacer-with-array-indexes.js b/test/staging/sm/JSON/stringify-replacer-with-array-indexes.js index 07f8e13782..3c9c4c3032 100644 --- a/test/staging/sm/JSON/stringify-replacer-with-array-indexes.js +++ b/test/staging/sm/JSON/stringify-replacer-with-array-indexes.js @@ -8,20 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js] flags: - noStrict description: | - pending + Call the replacer function for array elements with stringified indexes esid: pending ---*/ -var gTestfile = 'stringify-replacer-with-array-indexes.js'; -//----------------------------------------------------------------------------- -var BUGNUMBER = 584909; -var summary = - "Call the replacer function for array elements with stringified indexes"; - -print(BUGNUMBER + ": " + summary); - -/************** - * BEGIN TEST * - **************/ var arr = [0, 1, 2, 3, 4]; @@ -57,7 +46,3 @@ function replacer() } assert.sameValue(JSON.stringify(arr, replacer), '[0,1,2,3,4]'); - -/******************************************************************************/ - -print("Tests complete"); diff --git a/test/staging/sm/JSON/stringify-replacer.js b/test/staging/sm/JSON/stringify-replacer.js index fb9c5b7397..4086d9fd51 100644 --- a/test/staging/sm/JSON/stringify-replacer.js +++ b/test/staging/sm/JSON/stringify-replacer.js @@ -9,6 +9,7 @@ description: | pending esid: pending ---*/ + /** * These return* functions are used by the * replacer tests taken from bug 512447 @@ -157,7 +158,3 @@ catch (e) { assert.sameValue(e instanceof TypeError, true, "no TypeError thrown: " + e); } - -/******************************************************************************/ - -print("Tests complete"); diff --git a/test/staging/sm/JSON/stringify-special-escapes.js b/test/staging/sm/JSON/stringify-special-escapes.js index aa9a52a615..201fa686ee 100644 --- a/test/staging/sm/JSON/stringify-special-escapes.js +++ b/test/staging/sm/JSON/stringify-special-escapes.js @@ -8,20 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js] flags: - noStrict description: | - pending + JSON.stringify of \\b\\f\\n\\r\\t should use one-character escapes, not hex esid: pending ---*/ -var gTestfile = 'stringify-special-escapes.js'; -//----------------------------------------------------------------------------- -var BUGNUMBER = 512266; -var summary = - "JSON.stringify of \\b\\f\\n\\r\\t should use one-character escapes, not hex"; - -print(BUGNUMBER + ": " + summary); - -/************** - * BEGIN TEST * - **************/ assert.sameValue(JSON.stringify("\u0000"), '"\\u0000"'); assert.sameValue(JSON.stringify("\u0001"), '"\\u0001"'); @@ -278,7 +267,3 @@ assert.sameValue(JSON.stringify("\udddd\udc00"), '"\\udddd\\udc00"'); assert.sameValue(JSON.stringify("\udeaf\udc00"), '"\\udeaf\\udc00"'); assert.sameValue(JSON.stringify("\udfff\udc00"), '"\\udfff\\udc00"'); assert.sameValue(JSON.stringify("\ue000\udc00"), '"\ue000\\udc00"'); - -/******************************************************************************/ - -print("Tests complete"); diff --git a/test/staging/sm/JSON/stringify-toJSON-arguments.js b/test/staging/sm/JSON/stringify-toJSON-arguments.js index afa9593374..e550073657 100644 --- a/test/staging/sm/JSON/stringify-toJSON-arguments.js +++ b/test/staging/sm/JSON/stringify-toJSON-arguments.js @@ -8,19 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js] flags: - noStrict description: | - pending + Arguments when an object's toJSON method is called esid: pending ---*/ -var gTestfile = 'stringify-toJSON-arguments.js'; -//----------------------------------------------------------------------------- -var BUGNUMBER = 584909; -var summary = "Arguments when an object's toJSON method is called"; - -print(BUGNUMBER + ": " + summary); - -/************** - * BEGIN TEST * - **************/ var obj = { @@ -35,7 +25,3 @@ var obj = }; assert.sameValue(JSON.stringify(obj), '{"p":17}'); - -/******************************************************************************/ - -print("Tests complete"); diff --git a/test/staging/sm/JSON/stringify.js b/test/staging/sm/JSON/stringify.js index 29ccb91c3c..80a116ff15 100644 --- a/test/staging/sm/JSON/stringify.js +++ b/test/staging/sm/JSON/stringify.js @@ -9,6 +9,7 @@ description: | pending esid: pending ---*/ + function assertStringify(v, expect) { assert.sameValue(JSON.stringify(v), expect); @@ -89,7 +90,3 @@ assertStringify(x, '[1]'); var X = function() { this.a = "b" }; X.prototype = { c: "d" }; assertStringify(new X(), '{"a":"b"}'); - -/******************************************************************************/ - -print("Tests complete");