Generate tests

This commit is contained in:
Rick Waldron 2020-09-25 11:23:33 -04:00
parent 1a1b1770e8
commit 5090f7adfe
100 changed files with 186 additions and 96 deletions

View File

@ -16,7 +16,7 @@ var callCount = 0;
var f;
f = () => {
f.arguments;
callCount = callCount + 1;
callCount++;
};
assert.throws(TypeError, function() {

View File

@ -16,7 +16,7 @@ var callCount = 0;
var f;
f = () => {
f.caller;
callCount = callCount + 1;
callCount++;
};
assert.throws(TypeError, function() {

View File

@ -21,7 +21,7 @@ var f;
f = () => {
"use strict";
inner().toString();
callCount = callCount + 1;
callCount++;
};
assert.throws(TypeError, function() {

View File

@ -19,7 +19,7 @@ info: |
var callCount = 0;
var f = async function f() {
f.caller;
callCount = callCount + 1;
callCount++;
}
f()

View File

@ -24,7 +24,7 @@ var callCount = 0;
var f = async function f() {
"use strict";
inner().toString();
callCount = callCount + 1;
callCount++;
}
f()

View File

@ -24,7 +24,7 @@ var callCount = 0;
var f = async function() {
"use strict";
inner().toString();
callCount = callCount + 1;
callCount++;
}
f()

View File

@ -20,7 +20,7 @@ var callCount = 0;
var f;
f = async function*() {
f.arguments;
callCount = callCount + 1;
callCount++;
};
f().next()

View File

@ -20,7 +20,7 @@ var callCount = 0;
var f;
f = async function*() {
f.caller;
callCount = callCount + 1;
callCount++;
};
f().next()

View File

@ -20,7 +20,7 @@ var callCount = 0;
var f;
f = async function* g() {
f.caller;
callCount = callCount + 1;
callCount++;
};
f().next()

View File

@ -25,7 +25,7 @@ var f;
f = async function*() {
"use strict";
inner().toString();
callCount = callCount + 1;
callCount++;
};
f().next()

View File

@ -25,7 +25,7 @@ var f;
f = async function* g() {
"use strict";
inner().toString();
callCount = callCount + 1;
callCount++;
};
f().next()

View File

@ -19,7 +19,7 @@ var callCount = 0;
var C = class {
async method() {
this.method.arguments;
callCount = callCount + 1;
callCount++;
}
};

View File

@ -19,7 +19,7 @@ var callCount = 0;
var C = class {
async method() {
this.method.caller;
callCount = callCount + 1;
callCount++;
}
};

View File

@ -24,7 +24,7 @@ var C = class {
async method() {
/* implicit strict */
inner().toString();
callCount = callCount + 1;
callCount++;
}
};

View File

@ -18,7 +18,7 @@ var callCount = 0;
var C = class {
*method() {
this.method.arguments;
callCount = callCount + 1;
callCount++;
}
};

View File

@ -18,7 +18,7 @@ var callCount = 0;
var C = class {
*method() {
this.method.caller;
callCount = callCount + 1;
callCount++;
}
};

View File

@ -23,7 +23,7 @@ var C = class {
*method() {
/* implicit strict */
inner().toString();
callCount = callCount + 1;
callCount++;
}
};

View File

@ -16,7 +16,7 @@ var callCount = 0;
var C = class {
static method() {
this.method.arguments;
callCount = callCount + 1;
callCount++;
}
};

View File

@ -16,7 +16,7 @@ var callCount = 0;
var C = class {
static method() {
this.method.caller;
callCount = callCount + 1;
callCount++;
}
};

View File

@ -21,7 +21,7 @@ var C = class {
static method() {
/* implicit strict */
inner().toString();
callCount = callCount + 1;
callCount++;
}
};

View File

@ -16,7 +16,7 @@ var callCount = 0;
var C = class {
method() {
this.method.arguments;
callCount = callCount + 1;
callCount++;
}
};

View File

@ -16,7 +16,7 @@ var callCount = 0;
var C = class {
method() {
this.method.caller;
callCount = callCount + 1;
callCount++;
}
};

View File

@ -21,7 +21,7 @@ var C = class {
method() {
/* implicit strict */
inner().toString();
callCount = callCount + 1;
callCount++;
}
};

View File

@ -0,0 +1,23 @@
// This file was procedurally generated from the following sources:
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
// - src/function-forms/forbidden-extensions/bullet-one/func-expr.template
/*---
description: Forbidden extension, o.arguments (function expression)
esid: sec-function-definitions-runtime-semantics-evaluation
flags: [generated, noStrict]
info: |
FunctionExpression : function ( FormalParameters ) { FunctionBody }
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
---*/
var callCount = 0;
var f;
f = function() {
f.arguments;
callCount++;
};
f();
assert.sameValue(callCount, 1, 'function was evaluated');

View File

@ -0,0 +1,23 @@
// This file was procedurally generated from the following sources:
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
// - src/function-forms/forbidden-extensions/bullet-one/func-expr.template
/*---
description: Forbidden extension, o.caller (function expression)
esid: sec-function-definitions-runtime-semantics-evaluation
flags: [generated, noStrict]
info: |
FunctionExpression : function ( FormalParameters ) { FunctionBody }
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
---*/
var callCount = 0;
var f;
f = function() {
f.caller;
callCount++;
};
f();
assert.sameValue(callCount, 1, 'function was evaluated');

View File

@ -17,7 +17,7 @@ var f;
f = function() {
"use strict";
f.arguments;
callCount = callCount + 1;
callCount++;
};
assert.throws(TypeError, function() {
f();

View File

@ -17,7 +17,7 @@ var f;
f = function() {
"use strict";
f.caller;
callCount = callCount + 1;
callCount++;
};
assert.throws(TypeError, function() {
f();

View File

@ -21,7 +21,7 @@ var f;
f = function() {
"use strict";
inner().toString();
callCount = callCount + 1;
callCount++;
};
assert.throws(TypeError, function() {
f();

View File

@ -18,7 +18,7 @@ var callCount = 0;
var f;
f = function*() {
f.arguments;
callCount = callCount + 1;
callCount++;
};
assert.throws(TypeError, function() {

View File

@ -18,7 +18,7 @@ var callCount = 0;
var f;
f = function*() {
f.caller;
callCount = callCount + 1;
callCount++;
};
assert.throws(TypeError, function() {

View File

@ -23,7 +23,7 @@ var f;
f = function*() {
"use strict";
inner().toString();
callCount = callCount + 1;
callCount++;
};
assert.throws(TypeError, function() {

View File

@ -19,7 +19,7 @@ info: |
var callCount = 0;
async function f() {
f.arguments;
callCount = callCount + 1;
callCount++;
}
f()

View File

@ -19,7 +19,7 @@ info: |
var callCount = 0;
async function f() {
f.caller;
callCount = callCount + 1;
callCount++;
}
f()

View File

@ -24,7 +24,7 @@ var callCount = 0;
async function f() {
"use strict";
inner().toString();
callCount = callCount + 1;
callCount++;
}
f()

View File

@ -19,7 +19,7 @@ info: |
var callCount = 0;
async function* f() {
f.arguments;
callCount = callCount + 1;
callCount++;
}
f().next()

View File

@ -19,7 +19,7 @@ info: |
var callCount = 0;
async function* f() {
f.caller;
callCount = callCount + 1;
callCount++;
}
f().next()

View File

@ -24,7 +24,7 @@ var callCount = 0;
async function* f() {
"use strict";
inner().toString();
callCount = callCount + 1;
callCount++;
}
f().next()

View File

@ -16,7 +16,7 @@ var callCount = 0;
class C {
method() {
this.method.arguments;
callCount = callCount + 1;
callCount++;
}
}

View File

@ -16,7 +16,7 @@ var callCount = 0;
class C {
method() {
this.method.caller;
callCount = callCount + 1;
callCount++;
}
}

View File

@ -21,7 +21,7 @@ class C {
method() {
/* implicit strict */
inner().toString();
callCount = callCount + 1;
callCount++;
}
}

View File

@ -17,7 +17,7 @@ var callCount = 0;
function f() {
"use strict";
f.arguments;
callCount = callCount + 1;
callCount++;
}
assert.throws(TypeError, function() {
f();

View File

@ -17,7 +17,7 @@ var callCount = 0;
function f() {
"use strict";
f.caller;
callCount = callCount + 1;
callCount++;
}
assert.throws(TypeError, function() {
f();

View File

@ -0,0 +1,22 @@
// This file was procedurally generated from the following sources:
// - src/function-forms/forbidden-ext-direct-access-prop-arguments.case
// - src/function-forms/forbidden-extensions/bullet-one/func-decl.template
/*---
description: Forbidden extension, o.arguments (function declaration)
esid: sec-function-definitions-runtime-semantics-instantiatefunctionobject
flags: [generated, noStrict]
info: |
FunctionDeclaration :
function BindingIdentifier ( FormalParameters ) { FunctionBody }
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
---*/
var callCount = 0;
function f() {
f.arguments;
callCount++;
}
f();
assert.sameValue(callCount, 1, 'function was evaluated');

View File

@ -0,0 +1,22 @@
// This file was procedurally generated from the following sources:
// - src/function-forms/forbidden-ext-direct-access-prop-caller.case
// - src/function-forms/forbidden-extensions/bullet-one/func-decl.template
/*---
description: Forbidden extension, o.caller (function declaration)
esid: sec-function-definitions-runtime-semantics-instantiatefunctionobject
flags: [generated, noStrict]
info: |
FunctionDeclaration :
function BindingIdentifier ( FormalParameters ) { FunctionBody }
ECMAScript function objects defined using syntactic constructors in strict mode code must not be created with own properties named "caller" or "arguments". Such own properties also must not be created for function objects defined using an ArrowFunction, MethodDefinition, GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression, ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or AsyncArrowFunction regardless of whether the definition is contained in strict mode code. Built-in functions, strict functions created using the Function constructor, generator functions created using the Generator constructor, async functions created using the AsyncFunction constructor, and functions created using the bind method also must not be created with such own properties.
---*/
var callCount = 0;
function f() {
f.caller;
callCount++;
}
f();
assert.sameValue(callCount, 1, 'function was evaluated');

View File

@ -21,7 +21,7 @@ var callCount = 0;
function f() {
"use strict";
inner().toString();
callCount = callCount + 1;
callCount++;
}
assert.throws(TypeError, function() {
f();

View File

@ -17,7 +17,7 @@ info: |
var callCount = 0;
function* f() {
f.arguments;
callCount = callCount + 1;
callCount++;
}
assert.throws(TypeError, function() {

View File

@ -17,7 +17,7 @@ info: |
var callCount = 0;
function* f() {
f.caller;
callCount = callCount + 1;
callCount++;
}
assert.throws(TypeError, function() {

View File

@ -22,7 +22,7 @@ var callCount = 0;
function* f() {
"use strict";
inner().toString();
callCount = callCount + 1;
callCount++;
}
assert.throws(TypeError, function() {