Remove print calls in sm/statements

This commit is contained in:
André Bargull 2025-04-30 14:16:05 +02:00 committed by Philip Chimento
parent 232893dbe5
commit e79abfc182
13 changed files with 13 additions and 182 deletions

View File

@ -8,21 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags: flags:
- noStrict - noStrict
description: | description: |
pending Don't assert when an arrow function occurs at the end of a declaration init-component of a for(;;) loop head
esid: pending esid: pending
---*/ ---*/
//-----------------------------------------------------------------------------
var gTestfile = "arrow-function-in-for-statement-head.js";
var BUGNUMBER = 1302994;
var summary =
"Don't assert when an arrow function occurs at the end of a declaration " +
"init-component of a for(;;) loop head";
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
function f1() function f1()
{ {
@ -65,7 +53,3 @@ function g2()
{} {}
} }
g2(); g2();
/******************************************************************************/
print("Tests complete");

View File

@ -8,21 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags: flags:
- noStrict - noStrict
description: | description: |
pending |for (x => 0 in 1;;) break;| must be a syntax error per ES6, not an elaborate nop
esid: pending esid: pending
---*/ ---*/
//-----------------------------------------------------------------------------
var gTestfile = "arrow-function-in-for-statement-head.js";
var BUGNUMBER = 1163851;
var summary =
"|for (x => 0 in 1;;) break;| must be a syntax error per ES6, not an " +
"elaborate nop";
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
try try
{ {
@ -34,7 +22,3 @@ catch (e)
assert.sameValue(e instanceof SyntaxError, true, assert.sameValue(e instanceof SyntaxError, true,
"expected syntax error, got " + e); "expected syntax error, got " + e);
} }
/******************************************************************************/
print("Tests complete");

View File

@ -8,21 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags: flags:
- noStrict - noStrict
description: | description: |
pending Declarations in for-in loop heads must not contain |in|-expression initializers
esid: pending esid: pending
---*/ ---*/
//-----------------------------------------------------------------------------
var gTestfile = "for-in-with-declaration.js";
var BUGNUMBER = 1163851;
var summary =
"Declarations in for-in loop heads must not contain |in|-expression " +
"initializers";
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
assert.throws(SyntaxError, () => Function("for (var x = 3 in {}; ; ) break;")); assert.throws(SyntaxError, () => Function("for (var x = 3 in {}; ; ) break;"));
assert.throws(SyntaxError, () => Function("for (var x, y = 3 in {}; ; ) break;")); assert.throws(SyntaxError, () => Function("for (var x, y = 3 in {}; ; ) break;"));
@ -32,7 +20,3 @@ assert.throws(SyntaxError, () => Function("for (const x = 5, y = 3 in {}; ; ) br
assert.throws(SyntaxError, () => Function("for (let x = 3 in {}; ; ) break;")); assert.throws(SyntaxError, () => Function("for (let x = 3 in {}; ; ) break;"));
assert.throws(SyntaxError, () => Function("for (let x, y = 3 in {}; ; ) break;")); assert.throws(SyntaxError, () => Function("for (let x, y = 3 in {}; ; ) break;"));
assert.throws(SyntaxError, () => Function("for (let x = 2, y = 3 in {}; ; ) break;")); assert.throws(SyntaxError, () => Function("for (let x = 2, y = 3 in {}; ; ) break;"));
/******************************************************************************/
print("Tests complete");

View File

@ -8,21 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags: flags:
- noStrict - noStrict
description: | description: |
pending Don't mishandle deletion of a property from the internal iterator created for a for-in loop, when a gc occurs just after it
esid: pending esid: pending
---*/ ---*/
//-----------------------------------------------------------------------------
var gTestfile = "for-in-with-gc-and-unvisited-deletion.js";
var BUGNUMBER = 1462939;
var summary =
"Don't mishandle deletion of a property from the internal iterator " +
"created for a for-in loop, when a gc occurs just after it";
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
function testOneDeletion() function testOneDeletion()
{ {
@ -77,7 +65,3 @@ function testThreeDeletions()
} }
} }
testThreeDeletions(); testThreeDeletions();
/******************************************************************************/
print("Tests complete");

View File

@ -6,14 +6,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags: flags:
- noStrict - noStrict
description: | description: |
pending Leaving for-in and try should handle stack value in correct order
esid: pending esid: pending
---*/ ---*/
var BUGNUMBER = 1332881;
var summary =
"Leaving for-in and try should handle stack value in correct order";
print(BUGNUMBER + ": " + summary);
var called = 0; var called = 0;
function reset() { function reset() {
@ -84,4 +79,3 @@ var d = (function () {
})(); })();
assert.sameValue(called, 2); assert.sameValue(called, 2);
assert.sameValue(d, 14); assert.sameValue(d, 14);

View File

@ -8,18 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags: flags:
- noStrict - noStrict
description: | description: |
pending Support const declarations in for-of loop heads
esid: pending esid: pending
---*/ ---*/
var gTestfile = "for-inof-loop-const-declaration.js";
var BUGNUMBER = 1278150;
var summary = "Support const declarations in for-of loop heads";
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
var count; var count;
@ -93,7 +84,3 @@ for (const { length, 0: c } of "012345")
"didn't get a TypeError, instead got: " + e); "didn't get a TypeError, instead got: " + e);
} }
} }
/******************************************************************************/
print("Tests complete");

View File

@ -8,21 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags: flags:
- noStrict - noStrict
description: | description: |
pending Don't assert parsing a for-in/of loop whose target is a name, where the expression being iterated over contains a string containing an index
esid: pending esid: pending
---*/ ---*/
//-----------------------------------------------------------------------------
var gTestfile = "for-inof-name-iteration-expression-contains-index-string.js";
var BUGNUMBER = 1235640;
var summary =
"Don't assert parsing a for-in/of loop whose target is a name, where the " +
"expression being iterated over contains a string containing an index";
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
function f() function f()
{ {
@ -44,7 +32,3 @@ function g()
} }
g(); g();
/******************************************************************************/
print("Tests complete");

View File

@ -8,20 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags: flags:
- noStrict - noStrict
description: | description: |
pending Support computed property names in destructuring declarations in for-in/of loop heads
esid: pending esid: pending
---*/ ---*/
var gTestfile = "for-loop-declaration-contains-computed-name.js";
var BUGNUMBER = 1233767;
var summary =
"Support computed property names in destructuring declarations in " +
"for-in/of loop heads";
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
var count; var count;
@ -47,7 +36,3 @@ for (var { length: x, [x - 1]: y } in "foo")
count++; count++;
} }
/******************************************************************************/
print("Tests complete");

View File

@ -8,20 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags: flags:
- noStrict - noStrict
description: | description: |
pending Support initializer defaults in destructuring declarations in for-in/of loop heads
esid: pending esid: pending
---*/ ---*/
var gTestfile = "for-loop-declaration-contains-computed-name.js";
var BUGNUMBER = 1233767;
var summary =
"Support initializer defaults in destructuring declarations in for-in/of " +
"loop heads";
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
var count; var count;
var expr; var expr;
@ -49,7 +38,3 @@ for (var { length: x, [x - 1 + count]: y = "psych" } in "foo")
count++; count++;
} }
/******************************************************************************/
print("Tests complete");

View File

@ -6,13 +6,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags: flags:
- noStrict - noStrict
description: | description: |
pending Returning non-object from @@iterator should throw
esid: pending esid: pending
---*/ ---*/
var BUGNUMBER = 1021835;
var summary = "Returning non-object from @@iterator should throw";
print(BUGNUMBER + ": " + summary);
let primitives = [ let primitives = [
1, 1,
@ -34,4 +30,3 @@ for (let primitive of primitives) {
} }
}); });
} }

View File

@ -8,18 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags: flags:
- noStrict - noStrict
description: | description: |
pending Don't assert parsing |for (var x = 3 of 42);|
esid: pending esid: pending
---*/ ---*/
var gTestfile = "for-of-var-with-initializer.js";
var BUGNUMBER = 1164741;
var summary = "Don't assert parsing |for (var x = 3 of 42);|";
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
try try
{ {
@ -31,7 +22,3 @@ catch (e)
assert.sameValue(e instanceof SyntaxError, true, assert.sameValue(e instanceof SyntaxError, true,
"expected syntax error, got: " + e); "expected syntax error, got: " + e);
} }
/******************************************************************************/
print("Tests complete");

View File

@ -8,21 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags: flags:
- noStrict - noStrict
description: | description: |
pending Don't crash constant-folding an |if| governed by a truthy constant, whose alternative statement is another |if|
esid: pending esid: pending
---*/ ---*/
//-----------------------------------------------------------------------------
var gTestfile = "if-constant-folding.js";
var BUGNUMBER = 1183400;
var summary =
"Don't crash constant-folding an |if| governed by a truthy constant, whose " +
"alternative statement is another |if|";
print(BUGNUMBER + ": " + summary);
/**************
* BEGIN TEST *
**************/
// Perform |if| constant folding correctly when the condition is constantly // Perform |if| constant folding correctly when the condition is constantly
// truthy and the alternative statement is another |if|. // truthy and the alternative statement is another |if|.
@ -35,8 +23,3 @@ else if (42)
assert.sameValue(false, true, "not reached"); assert.sameValue(false, true, "not reached");
assert.sameValue(true, false, "also not reached"); assert.sameValue(true, false, "also not reached");
} }
/******************************************************************************/
print("Tests complete");

View File

@ -6,13 +6,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
flags: flags:
- noStrict - noStrict
description: | description: |
pending try block should return try value if finally returned normally
esid: pending esid: pending
---*/ ---*/
var BUGNUMBER = 819125;
var summary = "try block should return try value if finally returned normally";
print(BUGNUMBER + ": " + summary);
function expectTryValue(code, isUndefined) { function expectTryValue(code, isUndefined) {
assert.sameValue(eval(code), isUndefined ? undefined : 'try'); assert.sameValue(eval(code), isUndefined ? undefined : 'try');
@ -488,4 +484,3 @@ do {
} }
} while (false); } while (false);
`, true); `, true);