Generate tests

This commit is contained in:
Rick Waldron 2020-10-14 14:02:44 -04:00
parent 0e77b43c9b
commit d8efa93bec
28 changed files with 194 additions and 306 deletions

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/eval-err-contains-arguments.case
// - src/class-elements/initializer-eval-arguments/cls-expr-fields-eval-arrow-body.template
// - src/class-elements/initializer-direct-eval-arguments/cls-expr-fields-eval-arrow-body.template
/*---
description: error if `arguments` in StatementList of eval (direct eval)
esid: sec-performeval-rules-in-initializer

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/eval-err-contains-arguments.case
// - src/class-elements/initializer-eval-arguments/cls-expr-private-fields-eval-arrow-body.template
// - src/class-elements/initializer-direct-eval-arguments/cls-expr-private-fields-eval-arrow-body.template
/*---
description: error if `arguments` in StatementList of eval (direct eval)
esid: sec-performeval-rules-in-initializer

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/eval-err-contains-arguments.case
// - src/class-elements/initializer-eval-arguments/cls-expr-fields-eval.template
// - src/class-elements/initializer-direct-eval-arguments/cls-expr-fields-eval.template
/*---
description: error if `arguments` in StatementList of eval (direct eval)
esid: sec-performeval-rules-in-initializer

View File

@ -0,0 +1,22 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/eval-contains-arguments.case
// - src/class-elements/initializer-indirect-eval-arguments/cls-expr-fields-indirect-eval.template
/*---
description: No error if `arguments` in StatementList of eval (indirect eval)
esid: sec-performeval-rules-in-initializer
features: [class, class-fields-public]
flags: [generated, noStrict]
info: |
For indirect eval, the "Additional Early Error Rules for Eval Inside Initializer"
(in #sec-performeval-rules-in-initializer) are NOT applicable.
---*/
var arguments = 1;
var executed = false;
var C = class {
x = (0, eval)('arguments;');
}
assert.sameValue(new C().x, arguments);

View File

@ -1,36 +0,0 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/eval-err-contains-arguments.case
// - src/class-elements/initializer-eval-arguments/cls-expr-fields-indirect-eval.template
/*---
description: error if `arguments` in StatementList of eval (indirect eval)
esid: sec-performeval-rules-in-initializer
features: [class, class-fields-public]
flags: [generated]
info: |
Additional Early Error Rules for Eval Inside Initializer
These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
ScriptBody : StatementList
It is a Syntax Error if ContainsArguments of StatementList is true.
...
Static Semantics: ContainsArguments
IdentifierReference : Identifier
1. If the StringValue of Identifier is "arguments", return true.
...
For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
---*/
var executed = false;
var C = class {
x = (0, eval)('executed = true; arguments;');
}
assert.throws(ReferenceError, function() {
new C();
});
assert.sameValue(executed, true);

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/eval-err-contains-arguments.case
// - src/class-elements/initializer-eval-arguments/cls-expr-fields-eval-nested.template
// - src/class-elements/initializer-direct-eval-arguments/cls-expr-fields-eval-nested.template
/*---
description: error if `arguments` in StatementList of eval (direct eval)
esid: sec-performeval-rules-in-initializer

View File

@ -0,0 +1,21 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/eval-contains-arguments.case
// - src/class-elements/initializer-indirect-eval-arguments/cls-expr-fields-indirect-eval-nested.template
/*---
description: No error if `arguments` in StatementList of eval (indirect eval)
esid: sec-performeval-rules-in-initializer
features: [class, class-fields-public]
flags: [generated, noStrict]
info: |
For indirect eval, the "Additional Early Error Rules for Eval Inside Initializer"
(in #sec-performeval-rules-in-initializer) are NOT applicable.
---*/
var arguments = 1;
var C = class {
x = () => (0, eval)('arguments;');
}
assert.sameValue(new C().x(), arguments);

View File

@ -1,36 +0,0 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/eval-err-contains-arguments.case
// - src/class-elements/initializer-eval-arguments/cls-expr-fields-indirect-eval-nested.template
/*---
description: error if `arguments` in StatementList of eval (indirect eval)
esid: sec-performeval-rules-in-initializer
features: [class, class-fields-public]
flags: [generated]
info: |
Additional Early Error Rules for Eval Inside Initializer
These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
ScriptBody : StatementList
It is a Syntax Error if ContainsArguments of StatementList is true.
...
Static Semantics: ContainsArguments
IdentifierReference : Identifier
1. If the StringValue of Identifier is "arguments", return true.
...
For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
---*/
var executed = false;
var C = class {
x = () => (0, eval)('executed = true; arguments;');
}
assert.throws(ReferenceError, function() {
new C().x();
});
assert.sameValue(executed, true);

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/eval-err-contains-arguments.case
// - src/class-elements/initializer-eval-arguments/cls-expr-private-fields-eval-nested.template
// - src/class-elements/initializer-direct-eval-arguments/cls-expr-private-fields-eval-nested.template
/*---
description: error if `arguments` in StatementList of eval (direct eval)
esid: sec-performeval-rules-in-initializer

View File

@ -0,0 +1,24 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/eval-contains-arguments.case
// - src/class-elements/initializer-indirect-eval-arguments/cls-expr-private-fields-indirect-eval-nested.template
/*---
description: No error if `arguments` in StatementList of eval (indirect eval)
esid: sec-performeval-rules-in-initializer
features: [class, class-fields-public, class-fields-private]
flags: [generated, noStrict]
info: |
For indirect eval, the "Additional Early Error Rules for Eval Inside Initializer"
(in #sec-performeval-rules-in-initializer) are NOT applicable.
---*/
var arguments = 1;
var C = class {
#x = () => (0, eval)('arguments;');
x() {
return this.#x();
}
}
assert.sameValue(new C().x(), arguments);

View File

@ -1,39 +0,0 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/eval-err-contains-arguments.case
// - src/class-elements/initializer-eval-arguments/cls-expr-private-fields-indirect-eval-nested.template
/*---
description: error if `arguments` in StatementList of eval (indirect eval)
esid: sec-performeval-rules-in-initializer
features: [class, class-fields-public, class-fields-private]
flags: [generated]
info: |
Additional Early Error Rules for Eval Inside Initializer
These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
ScriptBody : StatementList
It is a Syntax Error if ContainsArguments of StatementList is true.
...
Static Semantics: ContainsArguments
IdentifierReference : Identifier
1. If the StringValue of Identifier is "arguments", return true.
...
For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
---*/
var executed = false;
var C = class {
#x = () => (0, eval)('executed = true; arguments;');
x() {
this.#x();
}
}
assert.throws(ReferenceError, function() {
new C().x();
});
assert.sameValue(executed, true);

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/eval-err-contains-arguments.case
// - src/class-elements/initializer-eval-arguments/cls-expr-private-fields-eval.template
// - src/class-elements/initializer-direct-eval-arguments/cls-expr-private-fields-eval.template
/*---
description: error if `arguments` in StatementList of eval (direct eval)
esid: sec-performeval-rules-in-initializer

View File

@ -0,0 +1,24 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/eval-contains-arguments.case
// - src/class-elements/initializer-indirect-eval-arguments/cls-expr-private-fields-indirect-eval.template
/*---
description: No error if `arguments` in StatementList of eval (indirect eval)
esid: sec-performeval-rules-in-initializer
features: [class, class-fields-public, class-fields-private]
flags: [generated, noStrict]
info: |
For indirect eval, the "Additional Early Error Rules for Eval Inside Initializer"
(in #sec-performeval-rules-in-initializer) are NOT applicable.
---*/
var arguments = 1;
var C = class {
#x = (0, eval)('arguments;');
x() {
return this.#x;
}
}
assert.sameValue(new C().x(), arguments);

View File

@ -1,36 +0,0 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/eval-err-contains-arguments.case
// - src/class-elements/initializer-eval-arguments/cls-expr-private-fields-indirect-eval.template
/*---
description: error if `arguments` in StatementList of eval (indirect eval)
esid: sec-performeval-rules-in-initializer
features: [class, class-fields-public, class-fields-private]
flags: [generated]
info: |
Additional Early Error Rules for Eval Inside Initializer
These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
ScriptBody : StatementList
It is a Syntax Error if ContainsArguments of StatementList is true.
...
Static Semantics: ContainsArguments
IdentifierReference : Identifier
1. If the StringValue of Identifier is "arguments", return true.
...
For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
---*/
var executed = false;
var C = class {
#x = (0, eval)('executed = true; arguments;');
}
assert.throws(ReferenceError, function() {
new C();
});
assert.sameValue(executed, true);

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/eval-err-contains-arguments.case
// - src/class-elements/initializer-eval-arguments/cls-decl-fields-eval-arrow-body.template
// - src/class-elements/initializer-direct-eval-arguments/cls-decl-fields-eval-arrow-body.template
/*---
description: error if `arguments` in StatementList of eval (direct eval)
esid: sec-performeval-rules-in-initializer

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/eval-err-contains-arguments.case
// - src/class-elements/initializer-eval-arguments/cls-decl-private-fields-eval-arrow-body.template
// - src/class-elements/initializer-direct-eval-arguments/cls-decl-private-fields-eval-arrow-body.template
/*---
description: error if `arguments` in StatementList of eval (direct eval)
esid: sec-performeval-rules-in-initializer

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/eval-err-contains-arguments.case
// - src/class-elements/initializer-eval-arguments/cls-decl-fields-eval.template
// - src/class-elements/initializer-direct-eval-arguments/cls-decl-fields-eval.template
/*---
description: error if `arguments` in StatementList of eval (direct eval)
esid: sec-performeval-rules-in-initializer

View File

@ -0,0 +1,21 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/eval-contains-arguments.case
// - src/class-elements/initializer-indirect-eval-arguments/cls-decl-fields-indirect-eval.template
/*---
description: No error if `arguments` in StatementList of eval (indirect eval)
esid: sec-performeval-rules-in-initializer
features: [class, class-fields-public]
flags: [generated, noStrict]
info: |
For indirect eval, the "Additional Early Error Rules for Eval Inside Initializer"
(in #sec-performeval-rules-in-initializer) are NOT applicable.
---*/
var arguments = 1;
class C {
x = (0, eval)('arguments;');
}
assert.sameValue(new C().x, arguments);

View File

@ -1,36 +0,0 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/eval-err-contains-arguments.case
// - src/class-elements/initializer-eval-arguments/cls-decl-fields-indirect-eval.template
/*---
description: error if `arguments` in StatementList of eval (indirect eval)
esid: sec-performeval-rules-in-initializer
features: [class, class-fields-public]
flags: [generated]
info: |
Additional Early Error Rules for Eval Inside Initializer
These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
ScriptBody : StatementList
It is a Syntax Error if ContainsArguments of StatementList is true.
...
Static Semantics: ContainsArguments
IdentifierReference : Identifier
1. If the StringValue of Identifier is "arguments", return true.
...
For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
---*/
var executed = false;
class C {
x = (0, eval)('executed = true; arguments;');
}
assert.throws(ReferenceError, function() {
new C();
});
assert.sameValue(executed, true);

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/eval-err-contains-arguments.case
// - src/class-elements/initializer-eval-arguments/cls-decl-fields-eval-nested.template
// - src/class-elements/initializer-direct-eval-arguments/cls-decl-fields-eval-nested.template
/*---
description: error if `arguments` in StatementList of eval (direct eval)
esid: sec-performeval-rules-in-initializer

View File

@ -0,0 +1,23 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/eval-contains-arguments.case
// - src/class-elements/initializer-indirect-eval-arguments/cls-decl-fields-indirect-eval-nested.template
/*---
description: No error if `arguments` in StatementList of eval (indirect eval)
esid: sec-performeval-rules-in-initializer
features: [class, class-fields-public]
flags: [generated, noStrict]
info: |
For indirect eval, the "Additional Early Error Rules for Eval Inside Initializer"
(in #sec-performeval-rules-in-initializer) are NOT applicable.
---*/
var arguments = 1;
class C {
x = () => {
var t = () => (0, eval)('arguments;');
return t();
}
}
assert.sameValue(new C().x(), arguments);

View File

@ -1,39 +0,0 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/eval-err-contains-arguments.case
// - src/class-elements/initializer-eval-arguments/cls-decl-fields-indirect-eval-nested.template
/*---
description: error if `arguments` in StatementList of eval (indirect eval)
esid: sec-performeval-rules-in-initializer
features: [class, class-fields-public]
flags: [generated]
info: |
Additional Early Error Rules for Eval Inside Initializer
These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
ScriptBody : StatementList
It is a Syntax Error if ContainsArguments of StatementList is true.
...
Static Semantics: ContainsArguments
IdentifierReference : Identifier
1. If the StringValue of Identifier is "arguments", return true.
...
For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
---*/
var executed = false;
class C {
x = () => {
var t = () => { (0, eval)('executed = true; arguments;'); };
t();
}
}
assert.throws(ReferenceError, function() {
new C().x();
});
assert.sameValue(executed, false);

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/eval-err-contains-arguments.case
// - src/class-elements/initializer-eval-arguments/cls-decl-private-fields-eval-nested.template
// - src/class-elements/initializer-direct-eval-arguments/cls-decl-private-fields-eval-nested.template
/*---
description: error if `arguments` in StatementList of eval (direct eval)
esid: sec-performeval-rules-in-initializer

View File

@ -0,0 +1,24 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/eval-contains-arguments.case
// - src/class-elements/initializer-indirect-eval-arguments/cls-decl-private-fields-indirect-eval-nested.template
/*---
description: No error if `arguments` in StatementList of eval (indirect eval)
esid: sec-performeval-rules-in-initializer
features: [class, class-fields-public, class-fields-private]
flags: [generated, noStrict]
info: |
For indirect eval, the "Additional Early Error Rules for Eval Inside Initializer"
(in #sec-performeval-rules-in-initializer) are NOT applicable.
---*/
var arguments = 1;
class C {
#x = (0, eval)('arguments;');
x() {
return this.#x;
}
}
assert.sameValue(new C().x(), arguments);

View File

@ -1,36 +0,0 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/eval-err-contains-arguments.case
// - src/class-elements/initializer-eval-arguments/cls-decl-private-fields-indirect-eval-nested.template
/*---
description: error if `arguments` in StatementList of eval (indirect eval)
esid: sec-performeval-rules-in-initializer
features: [class, class-fields-public, class-fields-private]
flags: [generated]
info: |
Additional Early Error Rules for Eval Inside Initializer
These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
ScriptBody : StatementList
It is a Syntax Error if ContainsArguments of StatementList is true.
...
Static Semantics: ContainsArguments
IdentifierReference : Identifier
1. If the StringValue of Identifier is "arguments", return true.
...
For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
---*/
var executed = false;
class C {
#x = (0, eval)('executed = true; arguments;');
}
assert.throws(ReferenceError, function() {
new C();
});
assert.sameValue(executed, true);

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/eval-err-contains-arguments.case
// - src/class-elements/initializer-eval-arguments/cls-decl-private-fields-eval.template
// - src/class-elements/initializer-direct-eval-arguments/cls-decl-private-fields-eval.template
/*---
description: error if `arguments` in StatementList of eval (direct eval)
esid: sec-performeval-rules-in-initializer

View File

@ -0,0 +1,23 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/eval-contains-arguments.case
// - src/class-elements/initializer-indirect-eval-arguments/cls-decl-private-fields-indirect-eval.template
/*---
description: No error if `arguments` in StatementList of eval (indirect eval)
esid: sec-performeval-rules-in-initializer
features: [class, class-fields-public, class-fields-private]
flags: [generated, noStrict]
info: |
For indirect eval, the "Additional Early Error Rules for Eval Inside Initializer"
(in #sec-performeval-rules-in-initializer) are NOT applicable.
---*/
var arguments = 1;
class C {
#x = (0, eval)('arguments;');
x() {
return this.#x;
}
}
assert.sameValue(new C().x(), arguments);

View File

@ -1,36 +0,0 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/eval-err-contains-arguments.case
// - src/class-elements/initializer-eval-arguments/cls-decl-private-fields-indirect-eval.template
/*---
description: error if `arguments` in StatementList of eval (indirect eval)
esid: sec-performeval-rules-in-initializer
features: [class, class-fields-public, class-fields-private]
flags: [generated]
info: |
Additional Early Error Rules for Eval Inside Initializer
These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer.
ScriptBody : StatementList
It is a Syntax Error if ContainsArguments of StatementList is true.
...
Static Semantics: ContainsArguments
IdentifierReference : Identifier
1. If the StringValue of Identifier is "arguments", return true.
...
For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
---*/
var executed = false;
class C {
#x = (0, eval)('executed = true; arguments;');
}
assert.throws(ReferenceError, function() {
new C();
});
assert.sameValue(executed, true);