mirror of
https://github.com/tc39/test262.git
synced 2025-09-24 10:38:30 +02:00
Remove print calls in sm/syntax
This commit is contained in:
parent
e79abfc182
commit
b58523b3f9
@ -8,20 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
pending
|
||||
Properly implement the spec's distinctions between StatementListItem and Statement grammar productions and their uses
|
||||
esid: pending
|
||||
---*/
|
||||
//-----------------------------------------------------------------------------
|
||||
var BUGNUMBER = 1288459;
|
||||
var summary =
|
||||
"Properly implement the spec's distinctions between StatementListItem and " +
|
||||
"Statement grammar productions and their uses";
|
||||
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
/**************
|
||||
* BEGIN TEST *
|
||||
**************/
|
||||
|
||||
assert.throws(SyntaxError, () => Function("a: let x;"));
|
||||
assert.throws(SyntaxError, () => Function("b: const y = 3;"));
|
||||
@ -33,7 +22,3 @@ assert.throws(SyntaxError, () => Function("'use strict'; d: function w() {};"));
|
||||
Function("e: function x() {};");
|
||||
|
||||
assert.throws(SyntaxError, () => Function("f: function* y() {}"));
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
print("Tests complete");
|
||||
|
@ -8,21 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
pending
|
||||
|let| and |static| are forbidden as Identifier only in strict mode code, and it's permissible to use them as Identifier (with or without containing escapes) in non-strict code
|
||||
esid: pending
|
||||
---*/
|
||||
//-----------------------------------------------------------------------------
|
||||
var BUGNUMBER = 1288460;
|
||||
var summary =
|
||||
"|let| and |static| are forbidden as Identifier only in strict mode code, " +
|
||||
"and it's permissible to use them as Identifier (with or without " +
|
||||
"containing escapes) in non-strict code";
|
||||
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
/**************
|
||||
* BEGIN TEST *
|
||||
**************/
|
||||
|
||||
function t(code)
|
||||
{
|
||||
@ -44,7 +32,3 @@ t("st\\u0061tic: 42;");
|
||||
t("if (1) st\\u0061tic: 42;");
|
||||
t("st\\u0061tic = 42;");
|
||||
t("if (1) st\\u0061tic = 42;");
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
print("Tests complete");
|
||||
|
@ -8,20 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
pending
|
||||
Escape sequences aren't allowed in bolded grammar tokens (that is, in keywords, possibly contextual keywords)
|
||||
esid: pending
|
||||
---*/
|
||||
//-----------------------------------------------------------------------------
|
||||
var BUGNUMBER = 1204027;
|
||||
var summary =
|
||||
"Escape sequences aren't allowed in bolded grammar tokens (that is, in " +
|
||||
"keywords, possibly contextual keywords)";
|
||||
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
/**************
|
||||
* BEGIN TEST *
|
||||
**************/
|
||||
|
||||
function memberVariants(code)
|
||||
{
|
||||
@ -67,7 +56,3 @@ var badScripts =
|
||||
|
||||
for (var script of badScripts)
|
||||
assert.throws(SyntaxError, () => Function(script));
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
print("Tests complete");
|
||||
|
@ -8,18 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
pending
|
||||
let can't be used as a label in strict mode code
|
||||
esid: pending
|
||||
---*/
|
||||
//-----------------------------------------------------------------------------
|
||||
var BUGNUMBER = 1288459;
|
||||
var summary = "let can't be used as a label in strict mode code";
|
||||
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
/**************
|
||||
* BEGIN TEST *
|
||||
**************/
|
||||
|
||||
Function("let: 42");
|
||||
Function("l\\u0065t: 42");
|
||||
@ -34,7 +25,3 @@ assert.throws(SyntaxError, () => eval(" 'use strict'; let: 42"));
|
||||
assert.throws(SyntaxError, () => eval(" 'use strict' \n let: 42;"));
|
||||
assert.throws(SyntaxError, () => eval(" 'use strict'; l\\u0065t: 42"));
|
||||
assert.throws(SyntaxError, () => eval(" 'use strict' \n l\\u0065t: 42;"));
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
print("Tests complete");
|
||||
|
@ -8,22 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
pending
|
||||
Properly handle the case of U+005C REVERSE SOLIDUS U+000D CARRIAGE RETURN at the end of source text being tokenized, in the middle of a string or template literal, where the next code point in memory (outside the bounds of the source text) is U+000A LINE FEED
|
||||
esid: pending
|
||||
---*/
|
||||
//-----------------------------------------------------------------------------
|
||||
var BUGNUMBER = 1476409;
|
||||
var summary =
|
||||
"Properly handle the case of U+005C REVERSE SOLIDUS U+000D CARRIAGE RETURN " +
|
||||
"at the end of source text being tokenized, in the middle of a string or " +
|
||||
"template literal, where the next code point in memory (outside the bounds " +
|
||||
"of the source text) is U+000A LINE FEED";
|
||||
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
/**************
|
||||
* BEGIN TEST *
|
||||
**************/
|
||||
|
||||
function expectSyntaxError(code)
|
||||
{
|
||||
@ -87,7 +74,3 @@ function template()
|
||||
expectSyntaxError(containsBadTemplateLiteral.substr(2, 53));
|
||||
}
|
||||
template();
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
print("Tests complete");
|
||||
|
@ -8,21 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
pending
|
||||
Properly evaluate a bigint literal that's initially tokenized by a syntax parser (because the bigint literal appears immediately after an arrow function with expression body)
|
||||
esid: pending
|
||||
---*/
|
||||
//-----------------------------------------------------------------------------
|
||||
var BUGNUMBER = 1596706;
|
||||
var summary =
|
||||
"Properly evaluate a bigint literal that's initially tokenized by a syntax " +
|
||||
"parser (because the bigint literal appears immediately after an arrow " +
|
||||
"function with expression body)";
|
||||
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
/**************
|
||||
* BEGIN TEST *
|
||||
**************/
|
||||
|
||||
// block followed by semicolon
|
||||
assert.sameValue(eval(`x=>{};
|
||||
@ -39,7 +27,3 @@ assert.sameValue(eval(`x=>y;
|
||||
// expr not followed by semicolon
|
||||
assert.sameValue(eval(`x=>y
|
||||
78051120n`), 78051120n);
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
print("Tests complete");
|
||||
|
@ -8,21 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
pending
|
||||
Properly apply a directive comment that's only tokenized by a syntax parser (because the directive comment appears immediately after an arrow function with expression body)
|
||||
esid: pending
|
||||
---*/
|
||||
//-----------------------------------------------------------------------------
|
||||
var BUGNUMBER = 1596706;
|
||||
var summary =
|
||||
"Properly apply a directive comment that's only tokenized by a syntax " +
|
||||
"parser (because the directive comment appears immediately after an arrow " +
|
||||
"function with expression body)";
|
||||
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
/**************
|
||||
* BEGIN TEST *
|
||||
**************/
|
||||
|
||||
var stack;
|
||||
|
||||
@ -71,7 +59,3 @@ assert.sameValue(eval(`x=>y
|
||||
//# sourceURL=http://example.com/quux.js
|
||||
detectSourceURL`), 17);
|
||||
assertStackContains("http://example.com/quux.js", "expr, not semi");
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
print("Tests complete");
|
||||
|
@ -8,18 +8,9 @@ includes: [sm/non262.js, sm/non262-shell.js]
|
||||
flags:
|
||||
- noStrict
|
||||
description: |
|
||||
pending
|
||||
|yield| is sometimes a valid identifier
|
||||
esid: pending
|
||||
---*/
|
||||
//-----------------------------------------------------------------------------
|
||||
var BUGNUMBER = 1288459;
|
||||
var summary = "|yield| is sometimes a valid identifier";
|
||||
|
||||
print(BUGNUMBER + ": " + summary);
|
||||
|
||||
/**************
|
||||
* BEGIN TEST *
|
||||
**************/
|
||||
|
||||
var g = $262.createRealm().global;
|
||||
|
||||
@ -40,7 +31,3 @@ t("const yield = 3;");
|
||||
t("for (var yield = 3; ; ) break;");
|
||||
t("for (let yield = 3; ; ) break;");
|
||||
t("for (const yield = 3; ; ) break;");
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
print("Tests complete");
|
||||
|
Loading…
x
Reference in New Issue
Block a user