From a421452df2791a354f81e5567a531773875eaa42 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/global --- .../adding-global-var-nonextensible-error.js | 18 +----------------- .../sm/global/decodeURI-decodes-FFFE-FFFF.js | 17 +---------------- .../sm/global/delete-global-NaN-property.js | 16 +--------------- test/staging/sm/global/direct-eval-but-not.js | 17 +---------------- .../eval-in-strict-eval-in-normal-function.js | 17 +---------------- .../sm/global/eval-inside-with-is-direct.js | 15 +-------------- .../global/eval-native-callback-is-indirect.js | 15 +-------------- .../sm/global/parenthesized-eval-is-direct.js | 12 +----------- test/staging/sm/global/parseFloat-01.js | 9 +-------- test/staging/sm/global/parseInt-01.js | 16 +--------------- .../sm/global/parseInt-default-to-decimal.js | 17 +---------------- 11 files changed, 11 insertions(+), 158 deletions(-) diff --git a/test/staging/sm/global/adding-global-var-nonextensible-error.js b/test/staging/sm/global/adding-global-var-nonextensible-error.js index d2bbe30a8d..b7cdb1b223 100644 --- a/test/staging/sm/global/adding-global-var-nonextensible-error.js +++ b/test/staging/sm/global/adding-global-var-nonextensible-error.js @@ -10,21 +10,9 @@ flags: info: | preventExtensions on global description: | - pending + If a var statement can't create a global property because the global object isn't extensible, and an error is thrown while decompiling the global, don't assert esid: pending ---*/ -//----------------------------------------------------------------------------- -var BUGNUMBER = 621432; -var summary = - "If a var statement can't create a global property because the global " + - "object isn't extensible, and an error is thrown while decompiling the " + - "global, don't assert"; - -print(BUGNUMBER + ": " + summary); - -/************** - * BEGIN TEST * - **************/ var toSource = []; Object.preventExtensions(this); @@ -38,7 +26,3 @@ catch (e) { assert.sameValue(e instanceof TypeError, true, "expected TypeError, got: " + e); } - -/******************************************************************************/ - -print("All tests passed!"); diff --git a/test/staging/sm/global/decodeURI-decodes-FFFE-FFFF.js b/test/staging/sm/global/decodeURI-decodes-FFFE-FFFF.js index 73fdd203f1..9fffe0a236 100644 --- a/test/staging/sm/global/decodeURI-decodes-FFFE-FFFF.js +++ b/test/staging/sm/global/decodeURI-decodes-FFFE-FFFF.js @@ -8,26 +8,11 @@ includes: [sm/non262.js, sm/non262-shell.js] flags: - noStrict description: | - pending + decodeURI{,Component} should return the specified character for '%EF%BF%BE' and '%EF%BF%BF', not return U+FFFD esid: pending ---*/ -//----------------------------------------------------------------------------- -var BUGNUMBER = 520095; -var summary = - "decodeURI{,Component} should return the specified character for " + - "'%EF%BF%BE' and '%EF%BF%BF', not return U+FFFD"; - -print(BUGNUMBER + ": " + summary); - -/************** - * BEGIN TEST * - **************/ assert.sameValue(decodeURI("%EF%BF%BE"), "\uFFFE"); assert.sameValue(decodeURI("%EF%BF%BF"), "\uFFFF"); assert.sameValue(decodeURIComponent("%EF%BF%BE"), "\uFFFE"); assert.sameValue(decodeURIComponent("%EF%BF%BF"), "\uFFFF"); - -/******************************************************************************/ - -print("All tests passed!"); diff --git a/test/staging/sm/global/delete-global-NaN-property.js b/test/staging/sm/global/delete-global-NaN-property.js index 2023cb7899..8c39f23390 100644 --- a/test/staging/sm/global/delete-global-NaN-property.js +++ b/test/staging/sm/global/delete-global-NaN-property.js @@ -8,21 +8,11 @@ flags: - onlyStrict includes: [sm/non262.js, sm/non262-shell.js] description: | - pending + |delete window.NaN| should throw a TypeError esid: pending ---*/ "use strict" -//----------------------------------------------------------------------------- -var BUGNUMBER = 649570; -var summary = "|delete window.NaN| should throw a TypeError"; - -print(BUGNUMBER + ": " + summary); - -/************** - * BEGIN TEST * - **************/ - var g = this, v = false; try { @@ -34,7 +24,3 @@ catch (e) assert.sameValue(e instanceof TypeError, true, "Expected a TypeError, got: " + e); } - -/******************************************************************************/ - -print("Tests complete"); diff --git a/test/staging/sm/global/direct-eval-but-not.js b/test/staging/sm/global/direct-eval-but-not.js index 0e9901fc67..4e67c729d7 100644 --- a/test/staging/sm/global/direct-eval-but-not.js +++ b/test/staging/sm/global/direct-eval-but-not.js @@ -8,20 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js] flags: - noStrict description: | - pending + Don't crash doing a direct eval when eval doesn't resolve to an object (let alone the original eval function) esid: pending ---*/ -//----------------------------------------------------------------------------- -var BUGNUMBER = 609256; -var summary = - "Don't crash doing a direct eval when eval doesn't resolve to an object " + - "(let alone the original eval function)"; - -print(BUGNUMBER + ": " + summary); - -/************** - * BEGIN TEST * - **************/ var eval = ""; try @@ -33,7 +22,3 @@ catch (e) { assert.sameValue(e instanceof TypeError, true); } - -/******************************************************************************/ - -print("All tests passed!"); diff --git a/test/staging/sm/global/eval-in-strict-eval-in-normal-function.js b/test/staging/sm/global/eval-in-strict-eval-in-normal-function.js index 95288347cf..f71cf793f7 100644 --- a/test/staging/sm/global/eval-in-strict-eval-in-normal-function.js +++ b/test/staging/sm/global/eval-in-strict-eval-in-normal-function.js @@ -8,20 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js] flags: - noStrict description: | - pending + Calls to eval with same code + varying strict mode of script containing eval == fail esid: pending ---*/ -//----------------------------------------------------------------------------- -var BUGNUMBER = 620130; -var summary = - "Calls to eval with same code + varying strict mode of script containing " + - "eval == fail"; - -print(BUGNUMBER + ": " + summary); - -/************** - * BEGIN TEST * - **************/ function t(code) { return eval(code); } @@ -31,7 +20,3 @@ assert.sameValue(t("try { eval('with (5) 17'); } catch (e) { 'threw'; }"), 17); assert.sameValue(t("'use strict'; try { eval('with (5) 17'); } catch (e) { 'threw'; }"), "threw"); - -/******************************************************************************/ - -print("All tests passed!"); diff --git a/test/staging/sm/global/eval-inside-with-is-direct.js b/test/staging/sm/global/eval-inside-with-is-direct.js index 0a2726e033..5392dbc063 100644 --- a/test/staging/sm/global/eval-inside-with-is-direct.js +++ b/test/staging/sm/global/eval-inside-with-is-direct.js @@ -8,18 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js] flags: - noStrict description: | - pending + with (...) eval(...) is a direct eval esid: pending ---*/ -//----------------------------------------------------------------------------- -var BUGNUMBER = 601307; -var summary = "with (...) eval(...) is a direct eval"; - -print(BUGNUMBER + ": " + summary); - -/************** - * BEGIN TEST * - **************/ var t = "global"; function test() @@ -29,7 +20,3 @@ function test() return eval("t"); } assert.sameValue(test(), "local"); - -/******************************************************************************/ - -print("All tests passed!"); diff --git a/test/staging/sm/global/eval-native-callback-is-indirect.js b/test/staging/sm/global/eval-native-callback-is-indirect.js index 146842d4ce..20bab3161b 100644 --- a/test/staging/sm/global/eval-native-callback-is-indirect.js +++ b/test/staging/sm/global/eval-native-callback-is-indirect.js @@ -8,18 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js] flags: - noStrict description: | - pending + eval called from a native function is indirect esid: pending ---*/ -//----------------------------------------------------------------------------- -var BUGNUMBER = 604504; -var summary = "eval called from a native function is indirect"; - -print(BUGNUMBER + ": " + summary); - -/************** - * BEGIN TEST * - **************/ var originalEval = eval; @@ -33,7 +24,3 @@ function testBound() assert.sameValue(eval(), true); } testBound(); - -/******************************************************************************/ - -print("All tests passed!"); diff --git a/test/staging/sm/global/parenthesized-eval-is-direct.js b/test/staging/sm/global/parenthesized-eval-is-direct.js index 72e01b4aff..4f048bd9b1 100644 --- a/test/staging/sm/global/parenthesized-eval-is-direct.js +++ b/test/staging/sm/global/parenthesized-eval-is-direct.js @@ -8,15 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js] flags: - noStrict description: | - pending + (eval)(...) is a direct eval, (1, eval)() isn't, etc. esid: pending ---*/ -//----------------------------------------------------------------------------- -print("(eval)(...) is a direct eval, (1, eval)() isn't, etc."); - -/************** - * BEGIN TEST * - **************/ /* * Justification: @@ -69,7 +63,3 @@ function groupAndNaNTernary() return (0 / 0 ? null : eval)("t"); } assert.sameValue(groupAndNaNTernary(), "global"); - -/******************************************************************************/ - -print("All tests passed!"); diff --git a/test/staging/sm/global/parseFloat-01.js b/test/staging/sm/global/parseFloat-01.js index f617803ebc..b2bc05faa0 100644 --- a/test/staging/sm/global/parseFloat-01.js +++ b/test/staging/sm/global/parseFloat-01.js @@ -8,14 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js] flags: - noStrict description: | - pending + parseFloat(string) esid: pending ---*/ -//----------------------------------------------------------------------------- -var BUGNUMBER = 613492; -var summary = "ES5 15.1.2.3 parseFloat(string)"; - -print(BUGNUMBER + ": " + summary); assert.sameValue(parseFloat("Infinity"), Infinity); assert.sameValue(parseFloat("+Infinity"), Infinity); @@ -27,5 +22,3 @@ assert.sameValue(parseFloat("infinity"), NaN); assert.sameValue(parseFloat("nan"), NaN); assert.sameValue(parseFloat("NaN"), NaN); - -print("All tests passed!"); diff --git a/test/staging/sm/global/parseInt-01.js b/test/staging/sm/global/parseInt-01.js index f09ca4a858..51b9699c79 100644 --- a/test/staging/sm/global/parseInt-01.js +++ b/test/staging/sm/global/parseInt-01.js @@ -8,18 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js] flags: - noStrict description: | - pending + parseInt(string, radix) esid: pending ---*/ -//----------------------------------------------------------------------------- -var BUGNUMBER = 577536; -var summary = "ES5 15.1.2.2 parseInt(string, radix)"; - -print(BUGNUMBER + ": " + summary); - -/************** - * BEGIN TEST * - **************/ var str, radix; var upvar; @@ -170,8 +161,3 @@ assert.sameValue(parseInt("00A", 16), 10); assert.sameValue(parseInt("A", 17), 10); assert.sameValue(parseInt("0A", 17), 10); assert.sameValue(parseInt("00A", 17), 10); - - -/******************************************************************************/ - -print("All tests passed!"); diff --git a/test/staging/sm/global/parseInt-default-to-decimal.js b/test/staging/sm/global/parseInt-default-to-decimal.js index b4fb2576c0..4fb111b27e 100644 --- a/test/staging/sm/global/parseInt-default-to-decimal.js +++ b/test/staging/sm/global/parseInt-default-to-decimal.js @@ -8,20 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js] flags: - noStrict description: | - pending + parseInt should treat leading-zero inputs (with radix unspecified) as decimal, not octal esid: pending ---*/ -//----------------------------------------------------------------------------- -var BUGNUMBER = 583925; -var summary = - "parseInt should treat leading-zero inputs (with radix unspecified) as " + - "decimal, not octal (this changed in bug 786135)"; - -print(BUGNUMBER + ": " + summary); - -/************** - * BEGIN TEST * - **************/ assert.sameValue(parseInt("08"), 8); assert.sameValue(parseInt("09"), 9); @@ -32,7 +21,3 @@ function strictParseInt(s) { "use strict"; return parseInt(s); } assert.sameValue(strictParseInt("08"), 8); assert.sameValue(strictParseInt("09"), 9); assert.sameValue(strictParseInt("014"), 14); - -/******************************************************************************/ - -print("All tests passed!");