Generate tests

This commit is contained in:
Leo Balter 2018-08-20 17:12:33 -04:00
parent 345b93377f
commit 9a7fa8cb91
25 changed files with 682 additions and 10 deletions

View File

@ -0,0 +1,36 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/eval-err-contains-supercall-1.case
// - src/class-fields/initializer-eval-super-call/cls-expr-private-fields-eval.template
/*---
description: error if `super()['x']` in StatementList of eval (direct 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
...
The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
Additional Early Error Rules for Eval Outside Constructor Methods
These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
ScriptBody : StatementList
It is a Syntax Error if StatementList Contains SuperCall.
---*/
var executed = false;
var A = class {}
var C = class extends A {
#x = eval('executed = true; super()["x"];');
}
assert.throws(SyntaxError, function() {
new C();
});
assert.sameValue(executed, false);

View File

@ -0,0 +1,29 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/eval-err-contains-supercall-2.case
// - src/class-fields/initializer-eval-super-call/cls-expr-private-fields-eval.template
/*---
description: error if `super().x` in StatementList of eval (direct eval)
esid: sec-performeval-rules-in-initializer
features: [class, class-fields-public]
flags: [generated]
info: |
Additional Early Error Rules for Eval Outside Constructor Methods
These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
ScriptBody : StatementList
It is a Syntax Error if StatementList Contains SuperCall.
---*/
var executed = false;
var A = class {}
var C = class extends A {
#x = eval('executed = true; super().x;');
}
assert.throws(SyntaxError, function() {
new C();
});
assert.sameValue(executed, false);

View File

@ -0,0 +1,36 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/eval-err-contains-supercall.case
// - src/class-fields/initializer-eval-super-call/cls-expr-private-fields-eval.template
/*---
description: error if `super()` in StatementList of eval (direct 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
...
The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
Additional Early Error Rules for Eval Outside Constructor Methods
These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
ScriptBody : StatementList
It is a Syntax Error if StatementList Contains SuperCall.
---*/
var executed = false;
var A = class {}
var C = class extends A {
#x = eval('executed = true; super();');
}
assert.throws(SyntaxError, function() {
new C();
});
assert.sameValue(executed, false);

View File

@ -0,0 +1,34 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/eval-err-contains-superproperty-1.case
// - src/class-fields/initializer-eval-super-property/cls-expr-private-fields-eval.template
/*---
description: error if `super.x` in StatementList of eval (direct 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
...
The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
Additional Early Error Rules for Eval Outside Methods
These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
ScriptBody : StatementList
It is a Syntax Error if StatementList Contains SuperProperty.
---*/
var executed = false;
var A = class {}
var C = class extends A {
#x = eval('executed = true; super.x;');
};
new C();
assert.sameValue(executed, true);

View File

@ -0,0 +1,31 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/eval-err-contains-superproperty-2.case
// - src/class-fields/initializer-eval-super-property/cls-expr-private-fields-eval.template
/*---
description: error if super['x'] in StatementList of eval (direct eval)
esid: sec-performeval-rules-in-initializer
features: [class, class-fields-public]
flags: [generated]
info: |
The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
Additional Early Error Rules for Eval Outside Methods
These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
ScriptBody : StatementList
It is a Syntax Error if StatementList Contains SuperProperty.
---*/
var executed = false;
var A = class {}
var C = class extends A {
#x = eval('executed = true; super["x"];');
};
new C();
assert.sameValue(executed, true);

View File

@ -0,0 +1,36 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/eval-err-contains-supercall-1.case
// - src/class-fields/initializer-eval-super-call/cls-expr-private-fields-indirect-eval.template
/*---
description: error if `super()['x']` 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
...
The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
Additional Early Error Rules for Eval Outside Constructor Methods
These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
ScriptBody : StatementList
It is a Syntax Error if StatementList Contains SuperCall.
---*/
var executed = false;
var A = class {}
var C = class extends A {
#x = (0, eval)('executed = true; super()["x"];');
}
assert.throws(SyntaxError, function() {
new C();
});
assert.sameValue(executed, false);

View File

@ -0,0 +1,29 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/eval-err-contains-supercall-2.case
// - src/class-fields/initializer-eval-super-call/cls-expr-private-fields-indirect-eval.template
/*---
description: error if `super().x` 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 Outside Constructor Methods
These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
ScriptBody : StatementList
It is a Syntax Error if StatementList Contains SuperCall.
---*/
var executed = false;
var A = class {}
var C = class extends A {
#x = (0, eval)('executed = true; super().x;');
}
assert.throws(SyntaxError, function() {
new C();
});
assert.sameValue(executed, false);

View File

@ -0,0 +1,36 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/eval-err-contains-supercall.case
// - src/class-fields/initializer-eval-super-call/cls-expr-private-fields-indirect-eval.template
/*---
description: error if `super()` 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
...
The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
Additional Early Error Rules for Eval Outside Constructor Methods
These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
ScriptBody : StatementList
It is a Syntax Error if StatementList Contains SuperCall.
---*/
var executed = false;
var A = class {}
var C = class extends A {
#x = (0, eval)('executed = true; super();');
}
assert.throws(SyntaxError, function() {
new C();
});
assert.sameValue(executed, false);

View File

@ -0,0 +1,36 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/eval-err-contains-superproperty-1.case
// - src/class-fields/initializer-eval-super-property/cls-expr-private-fields-indirect-eval.template
/*---
description: error if `super.x` 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
...
The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
Additional Early Error Rules for Eval Outside Methods
These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
ScriptBody : StatementList
It is a Syntax Error if StatementList Contains SuperProperty.
---*/
var executed = false;
var A = class {}
var C = class extends A {
#x = (0, eval)('executed = true; super.x;');
};
assert.throws(SyntaxError, function() {
new C();
});
assert.sameValue(executed, false);

View File

@ -0,0 +1,33 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/eval-err-contains-superproperty-2.case
// - src/class-fields/initializer-eval-super-property/cls-expr-private-fields-indirect-eval.template
/*---
description: error if super['x'] in StatementList of eval (indirect eval)
esid: sec-performeval-rules-in-initializer
features: [class, class-fields-public]
flags: [generated]
info: |
The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
Additional Early Error Rules for Eval Outside Methods
These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
ScriptBody : StatementList
It is a Syntax Error if StatementList Contains SuperProperty.
---*/
var executed = false;
var A = class {}
var C = class extends A {
#x = (0, eval)('executed = true; super["x"];');
};
assert.throws(SyntaxError, function() {
new C();
});
assert.sameValue(executed, false);

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/eval-err-contains-supercall-1.case
// - src/class-fields/initializer-eval-super-call/cls-decl-private-fields-indirect-eval.template
// - src/class-fields/initializer-eval-super-call/cls-decl-fields-indirect-eval.template
/*---
description: error if `super()['x']` in StatementList of eval (indirect eval)
esid: sec-performeval-rules-in-initializer
@ -26,7 +26,7 @@ info: |
var executed = false;
class A {}
class C extends A {
#x = (0, eval)('executed = true; super()["x"];');
x = (0, eval)('executed = true; super()["x"];');
}
assert.throws(SyntaxError, function() {

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/eval-err-contains-supercall-2.case
// - src/class-fields/initializer-eval-super-call/cls-decl-private-fields-indirect-eval.template
// - src/class-fields/initializer-eval-super-call/cls-decl-fields-indirect-eval.template
/*---
description: error if `super().x` in StatementList of eval (indirect eval)
esid: sec-performeval-rules-in-initializer
@ -19,7 +19,7 @@ info: |
var executed = false;
class A {}
class C extends A {
#x = (0, eval)('executed = true; super().x;');
x = (0, eval)('executed = true; super().x;');
}
assert.throws(SyntaxError, function() {

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/eval-err-contains-supercall.case
// - src/class-fields/initializer-eval-super-call/cls-decl-private-fields-indirect-eval.template
// - src/class-fields/initializer-eval-super-call/cls-decl-fields-indirect-eval.template
/*---
description: error if `super()` in StatementList of eval (indirect eval)
esid: sec-performeval-rules-in-initializer
@ -26,7 +26,7 @@ info: |
var executed = false;
class A {}
class C extends A {
#x = (0, eval)('executed = true; super();');
x = (0, eval)('executed = true; super();');
}
assert.throws(SyntaxError, function() {

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/eval-err-contains-superproperty-1.case
// - src/class-fields/initializer-eval-super-property/cls-decl-private-fields-indirect-eval.template
// - src/class-fields/initializer-eval-super-property/cls-decl-fields-indirect-eval.template
/*---
description: error if `super.x` in StatementList of eval (indirect eval)
esid: sec-performeval-rules-in-initializer
@ -26,7 +26,7 @@ info: |
var executed = false;
class A {}
class C extends A {
#x = (0, eval)('executed = true; super.x;');
x = (0, eval)('executed = true; super.x;');
}
assert.throws(SyntaxError, function() {

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/eval-err-contains-superproperty-2.case
// - src/class-fields/initializer-eval-super-property/cls-decl-private-fields-indirect-eval.template
// - src/class-fields/initializer-eval-super-property/cls-decl-fields-indirect-eval.template
/*---
description: error if super['x'] in StatementList of eval (indirect eval)
esid: sec-performeval-rules-in-initializer
@ -23,7 +23,7 @@ info: |
var executed = false;
class A {}
class C extends A {
#x = (0, eval)('executed = true; super["x"];');
x = (0, eval)('executed = true; super["x"];');
}
assert.throws(SyntaxError, function() {

View File

@ -0,0 +1,36 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/eval-err-contains-supercall-1.case
// - src/class-fields/initializer-eval-super-call/cls-decl-private-fields-eval.template
/*---
description: error if `super()['x']` in StatementList of eval (direct 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
...
The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
Additional Early Error Rules for Eval Outside Constructor Methods
These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
ScriptBody : StatementList
It is a Syntax Error if StatementList Contains SuperCall.
---*/
var executed = false;
class A {}
class C extends A {
#x = eval('executed = true; super()["x"];');
}
assert.throws(SyntaxError, function() {
new C();
});
assert.sameValue(executed, false);

View File

@ -0,0 +1,29 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/eval-err-contains-supercall-2.case
// - src/class-fields/initializer-eval-super-call/cls-decl-private-fields-eval.template
/*---
description: error if `super().x` in StatementList of eval (direct eval)
esid: sec-performeval-rules-in-initializer
features: [class, class-fields-public]
flags: [generated]
info: |
Additional Early Error Rules for Eval Outside Constructor Methods
These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
ScriptBody : StatementList
It is a Syntax Error if StatementList Contains SuperCall.
---*/
var executed = false;
class A {}
class C extends A {
#x = eval('executed = true; super().x;');
}
assert.throws(SyntaxError, function() {
new C();
});
assert.sameValue(executed, false);

View File

@ -0,0 +1,36 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/eval-err-contains-supercall.case
// - src/class-fields/initializer-eval-super-call/cls-decl-private-fields-eval.template
/*---
description: error if `super()` in StatementList of eval (direct 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
...
The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
Additional Early Error Rules for Eval Outside Constructor Methods
These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
ScriptBody : StatementList
It is a Syntax Error if StatementList Contains SuperCall.
---*/
var executed = false;
class A {}
class C extends A {
#x = eval('executed = true; super();');
}
assert.throws(SyntaxError, function() {
new C();
});
assert.sameValue(executed, false);

View File

@ -0,0 +1,34 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/eval-err-contains-superproperty-1.case
// - src/class-fields/initializer-eval-super-property/cls-decl-private-fields-eval.template
/*---
description: error if `super.x` in StatementList of eval (direct 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
...
The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
Additional Early Error Rules for Eval Outside Methods
These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
ScriptBody : StatementList
It is a Syntax Error if StatementList Contains SuperProperty.
---*/
var executed = false;
class A {}
class C extends A {
#x = eval('executed = true; super.x;');
}
new C();
assert.sameValue(executed, true);

View File

@ -0,0 +1,31 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/eval-err-contains-superproperty-2.case
// - src/class-fields/initializer-eval-super-property/cls-decl-private-fields-eval.template
/*---
description: error if super['x'] in StatementList of eval (direct eval)
esid: sec-performeval-rules-in-initializer
features: [class, class-fields-public]
flags: [generated]
info: |
The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
Additional Early Error Rules for Eval Outside Methods
These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
ScriptBody : StatementList
It is a Syntax Error if StatementList Contains SuperProperty.
---*/
var executed = false;
class A {}
class C extends A {
#x = eval('executed = true; super["x"];');
}
new C();
assert.sameValue(executed, true);

View File

@ -0,0 +1,36 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/eval-err-contains-supercall-1.case
// - src/class-fields/initializer-eval-super-call/cls-decl-private-fields-indirect-eval.template
/*---
description: error if `super()['x']` 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
...
The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
Additional Early Error Rules for Eval Outside Constructor Methods
These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
ScriptBody : StatementList
It is a Syntax Error if StatementList Contains SuperCall.
---*/
var executed = false;
class A {}
class C extends A {
#x = (0, eval)('executed = true; super()["x"];');
}
assert.throws(SyntaxError, function() {
new C();
});
assert.sameValue(executed, false);

View File

@ -0,0 +1,29 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/eval-err-contains-supercall-2.case
// - src/class-fields/initializer-eval-super-call/cls-decl-private-fields-indirect-eval.template
/*---
description: error if `super().x` 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 Outside Constructor Methods
These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
ScriptBody : StatementList
It is a Syntax Error if StatementList Contains SuperCall.
---*/
var executed = false;
class A {}
class C extends A {
#x = (0, eval)('executed = true; super().x;');
}
assert.throws(SyntaxError, function() {
new C();
});
assert.sameValue(executed, false);

View File

@ -0,0 +1,36 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/eval-err-contains-supercall.case
// - src/class-fields/initializer-eval-super-call/cls-decl-private-fields-indirect-eval.template
/*---
description: error if `super()` 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
...
The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
Additional Early Error Rules for Eval Outside Constructor Methods
These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression.
ScriptBody : StatementList
It is a Syntax Error if StatementList Contains SuperCall.
---*/
var executed = false;
class A {}
class C extends A {
#x = (0, eval)('executed = true; super();');
}
assert.throws(SyntaxError, function() {
new C();
});
assert.sameValue(executed, false);

View File

@ -0,0 +1,36 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/eval-err-contains-superproperty-1.case
// - src/class-fields/initializer-eval-super-property/cls-decl-private-fields-indirect-eval.template
/*---
description: error if `super.x` 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
...
The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
Additional Early Error Rules for Eval Outside Methods
These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
ScriptBody : StatementList
It is a Syntax Error if StatementList Contains SuperProperty.
---*/
var executed = false;
class A {}
class C extends A {
#x = (0, eval)('executed = true; super.x;');
}
assert.throws(SyntaxError, function() {
new C();
});
assert.sameValue(executed, false);

View File

@ -0,0 +1,33 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/eval-err-contains-superproperty-2.case
// - src/class-fields/initializer-eval-super-property/cls-decl-private-fields-indirect-eval.template
/*---
description: error if super['x'] in StatementList of eval (indirect eval)
esid: sec-performeval-rules-in-initializer
features: [class, class-fields-public]
flags: [generated]
info: |
The remaining eval rules apply as outside a constructor, inside a method, and inside a function.
Additional Early Error Rules for Eval Outside Methods
These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition.
ScriptBody : StatementList
It is a Syntax Error if StatementList Contains SuperProperty.
---*/
var executed = false;
class A {}
class C extends A {
#x = (0, eval)('executed = true; super["x"];');
}
assert.throws(SyntaxError, function() {
new C();
});
assert.sameValue(executed, false);