mirror of https://github.com/tc39/test262.git
Generate tests
This commit is contained in:
parent
1a1b1770e8
commit
5090f7adfe
|
@ -16,7 +16,7 @@ var callCount = 0;
|
|||
var f;
|
||||
f = () => {
|
||||
f.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
};
|
||||
|
||||
assert.throws(TypeError, function() {
|
|
@ -16,7 +16,7 @@ var callCount = 0;
|
|||
var f;
|
||||
f = () => {
|
||||
f.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
};
|
||||
|
||||
assert.throws(TypeError, function() {
|
|
@ -21,7 +21,7 @@ var f;
|
|||
f = () => {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
};
|
||||
|
||||
assert.throws(TypeError, function() {
|
|
@ -24,7 +24,7 @@ var callCount = 0;
|
|||
var f;
|
||||
f = async () => {
|
||||
f.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
};
|
||||
|
||||
f()
|
|
@ -24,7 +24,7 @@ var callCount = 0;
|
|||
var f;
|
||||
f = async () => {
|
||||
f.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
};
|
||||
|
||||
f()
|
|
@ -29,7 +29,7 @@ var f;
|
|||
f = async () => {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
};
|
||||
|
||||
f()
|
|
@ -19,7 +19,7 @@ info: |
|
|||
var callCount = 0;
|
||||
var f = async function f() {
|
||||
f.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
|
||||
f()
|
|
@ -19,7 +19,7 @@ info: |
|
|||
var callCount = 0;
|
||||
var f = async function f() {
|
||||
f.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
|
||||
f()
|
|
@ -19,7 +19,7 @@ info: |
|
|||
var callCount = 0;
|
||||
var f = async function() {
|
||||
f.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
|
||||
f()
|
|
@ -19,7 +19,7 @@ info: |
|
|||
var callCount = 0;
|
||||
var f = async function() {
|
||||
f.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
|
||||
f()
|
|
@ -24,7 +24,7 @@ var callCount = 0;
|
|||
var f = async function f() {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
|
||||
f()
|
|
@ -24,7 +24,7 @@ var callCount = 0;
|
|||
var f = async function() {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
|
||||
f()
|
|
@ -20,7 +20,7 @@ var callCount = 0;
|
|||
var f;
|
||||
f = async function*() {
|
||||
f.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
};
|
||||
|
||||
f().next()
|
|
@ -20,7 +20,7 @@ var callCount = 0;
|
|||
var f;
|
||||
f = async function*() {
|
||||
f.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
};
|
||||
|
||||
f().next()
|
|
@ -20,7 +20,7 @@ var callCount = 0;
|
|||
var f;
|
||||
f = async function* g() {
|
||||
f.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
};
|
||||
|
||||
f().next()
|
|
@ -20,7 +20,7 @@ var callCount = 0;
|
|||
var f;
|
||||
f = async function* g() {
|
||||
f.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
};
|
||||
|
||||
f().next()
|
|
@ -25,7 +25,7 @@ var f;
|
|||
f = async function*() {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
};
|
||||
|
||||
f().next()
|
|
@ -25,7 +25,7 @@ var f;
|
|||
f = async function* g() {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
};
|
||||
|
||||
f().next()
|
|
@ -18,7 +18,7 @@ var callCount = 0;
|
|||
var C = class {
|
||||
static async *method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -18,7 +18,7 @@ var callCount = 0;
|
|||
var C = class {
|
||||
static async *method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -23,7 +23,7 @@ var C = class {
|
|||
static async *method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -18,7 +18,7 @@ var callCount = 0;
|
|||
var C = class {
|
||||
async *method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -18,7 +18,7 @@ var callCount = 0;
|
|||
var C = class {
|
||||
async *method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -23,7 +23,7 @@ var C = class {
|
|||
async *method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -20,7 +20,7 @@ var callCount = 0;
|
|||
var C = class {
|
||||
static async method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -20,7 +20,7 @@ var callCount = 0;
|
|||
var C = class {
|
||||
static async method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -25,7 +25,7 @@ var C = class {
|
|||
static async method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -19,7 +19,7 @@ var callCount = 0;
|
|||
var C = class {
|
||||
async method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -19,7 +19,7 @@ var callCount = 0;
|
|||
var C = class {
|
||||
async method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -24,7 +24,7 @@ var C = class {
|
|||
async method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -18,7 +18,7 @@ var callCount = 0;
|
|||
var C = class {
|
||||
static *method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -18,7 +18,7 @@ var callCount = 0;
|
|||
var C = class {
|
||||
static *method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -23,7 +23,7 @@ var C = class {
|
|||
static *method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -18,7 +18,7 @@ var callCount = 0;
|
|||
var C = class {
|
||||
*method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -18,7 +18,7 @@ var callCount = 0;
|
|||
var C = class {
|
||||
*method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -23,7 +23,7 @@ var C = class {
|
|||
*method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -16,7 +16,7 @@ var callCount = 0;
|
|||
var C = class {
|
||||
static method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -16,7 +16,7 @@ var callCount = 0;
|
|||
var C = class {
|
||||
static method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -21,7 +21,7 @@ var C = class {
|
|||
static method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -16,7 +16,7 @@ var callCount = 0;
|
|||
var C = class {
|
||||
method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -16,7 +16,7 @@ var callCount = 0;
|
|||
var C = class {
|
||||
method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -21,7 +21,7 @@ var C = class {
|
|||
method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -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');
|
|
@ -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');
|
|
@ -17,7 +17,7 @@ var f;
|
|||
f = function() {
|
||||
"use strict";
|
||||
f.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
};
|
||||
assert.throws(TypeError, function() {
|
||||
f();
|
|
@ -17,7 +17,7 @@ var f;
|
|||
f = function() {
|
||||
"use strict";
|
||||
f.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
};
|
||||
assert.throws(TypeError, function() {
|
||||
f();
|
|
@ -21,7 +21,7 @@ var f;
|
|||
f = function() {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
};
|
||||
assert.throws(TypeError, function() {
|
||||
f();
|
|
@ -18,7 +18,7 @@ var callCount = 0;
|
|||
var f;
|
||||
f = function*() {
|
||||
f.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
};
|
||||
|
||||
assert.throws(TypeError, function() {
|
|
@ -18,7 +18,7 @@ var callCount = 0;
|
|||
var f;
|
||||
f = function*() {
|
||||
f.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
};
|
||||
|
||||
assert.throws(TypeError, function() {
|
|
@ -23,7 +23,7 @@ var f;
|
|||
f = function*() {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
};
|
||||
|
||||
assert.throws(TypeError, function() {
|
|
@ -20,7 +20,7 @@ var callCount = 0;
|
|||
var obj = {
|
||||
async *method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -20,7 +20,7 @@ var callCount = 0;
|
|||
var obj = {
|
||||
async *method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -21,7 +21,7 @@ var callCount = 0;
|
|||
var obj = {
|
||||
async method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -21,7 +21,7 @@ var callCount = 0;
|
|||
var obj = {
|
||||
async method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -19,7 +19,7 @@ var callCount = 0;
|
|||
var obj = {
|
||||
*method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -19,7 +19,7 @@ var callCount = 0;
|
|||
var obj = {
|
||||
*method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -16,7 +16,7 @@ var callCount = 0;
|
|||
var obj = {
|
||||
method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -16,7 +16,7 @@ var callCount = 0;
|
|||
var obj = {
|
||||
method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -25,7 +25,7 @@ var obj = {
|
|||
async *method() {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -26,7 +26,7 @@ var obj = {
|
|||
async method() {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -24,7 +24,7 @@ var obj = {
|
|||
*method() {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -21,7 +21,7 @@ var obj = {
|
|||
method() {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
};
|
||||
|
|
@ -19,7 +19,7 @@ info: |
|
|||
var callCount = 0;
|
||||
async function f() {
|
||||
f.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
|
||||
f()
|
|
@ -19,7 +19,7 @@ info: |
|
|||
var callCount = 0;
|
||||
async function f() {
|
||||
f.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
|
||||
f()
|
|
@ -24,7 +24,7 @@ var callCount = 0;
|
|||
async function f() {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
|
||||
f()
|
|
@ -19,7 +19,7 @@ info: |
|
|||
var callCount = 0;
|
||||
async function* f() {
|
||||
f.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
|
||||
f().next()
|
|
@ -19,7 +19,7 @@ info: |
|
|||
var callCount = 0;
|
||||
async function* f() {
|
||||
f.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
|
||||
f().next()
|
|
@ -24,7 +24,7 @@ var callCount = 0;
|
|||
async function* f() {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
|
||||
f().next()
|
|
@ -19,7 +19,7 @@ var callCount = 0;
|
|||
class C {
|
||||
static async *method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
}
|
||||
|
|
@ -19,7 +19,7 @@ var callCount = 0;
|
|||
class C {
|
||||
static async *method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
}
|
||||
|
|
@ -24,7 +24,7 @@ class C {
|
|||
static async *method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
}
|
||||
|
|
@ -18,7 +18,7 @@ var callCount = 0;
|
|||
class C {
|
||||
async *method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
}
|
||||
|
|
@ -18,7 +18,7 @@ var callCount = 0;
|
|||
class C {
|
||||
async *method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
}
|
||||
|
|
@ -23,7 +23,7 @@ class C {
|
|||
async *method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
}
|
||||
|
|
@ -19,7 +19,7 @@ var callCount = 0;
|
|||
class C {
|
||||
static async method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
}
|
||||
|
|
@ -19,7 +19,7 @@ var callCount = 0;
|
|||
class C {
|
||||
static async method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
}
|
||||
|
|
@ -24,7 +24,7 @@ class C {
|
|||
static async method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
}
|
||||
|
|
@ -19,7 +19,7 @@ var callCount = 0;
|
|||
class C {
|
||||
async method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
}
|
||||
|
|
@ -19,7 +19,7 @@ var callCount = 0;
|
|||
class C {
|
||||
async method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
}
|
||||
|
|
@ -24,7 +24,7 @@ class C {
|
|||
async method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
}
|
||||
|
|
@ -18,7 +18,7 @@ var callCount = 0;
|
|||
class C {
|
||||
static *method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
}
|
||||
|
|
@ -18,7 +18,7 @@ var callCount = 0;
|
|||
class C {
|
||||
static *method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
}
|
||||
|
|
@ -23,7 +23,7 @@ class C {
|
|||
static *method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
}
|
||||
|
|
@ -18,7 +18,7 @@ var callCount = 0;
|
|||
class C {
|
||||
*method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
}
|
||||
|
|
@ -18,7 +18,7 @@ var callCount = 0;
|
|||
class C {
|
||||
*method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
}
|
||||
|
|
@ -23,7 +23,7 @@ class C {
|
|||
*method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@ var callCount = 0;
|
|||
class C {
|
||||
static method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@ var callCount = 0;
|
|||
class C {
|
||||
static method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
}
|
||||
|
|
@ -21,7 +21,7 @@ class C {
|
|||
static method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@ var callCount = 0;
|
|||
class C {
|
||||
method() {
|
||||
this.method.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@ var callCount = 0;
|
|||
class C {
|
||||
method() {
|
||||
this.method.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
}
|
||||
|
|
@ -21,7 +21,7 @@ class C {
|
|||
method() {
|
||||
/* implicit strict */
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
}
|
||||
|
|
@ -17,7 +17,7 @@ var callCount = 0;
|
|||
function f() {
|
||||
"use strict";
|
||||
f.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
assert.throws(TypeError, function() {
|
||||
f();
|
|
@ -17,7 +17,7 @@ var callCount = 0;
|
|||
function f() {
|
||||
"use strict";
|
||||
f.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
assert.throws(TypeError, function() {
|
||||
f();
|
|
@ -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');
|
|
@ -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');
|
|
@ -21,7 +21,7 @@ var callCount = 0;
|
|||
function f() {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
assert.throws(TypeError, function() {
|
||||
f();
|
|
@ -17,7 +17,7 @@ info: |
|
|||
var callCount = 0;
|
||||
function* f() {
|
||||
f.arguments;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
|
||||
assert.throws(TypeError, function() {
|
|
@ -17,7 +17,7 @@ info: |
|
|||
var callCount = 0;
|
||||
function* f() {
|
||||
f.caller;
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
|
||||
assert.throws(TypeError, function() {
|
|
@ -22,7 +22,7 @@ var callCount = 0;
|
|||
function* f() {
|
||||
"use strict";
|
||||
inner().toString();
|
||||
callCount = callCount + 1;
|
||||
callCount++;
|
||||
}
|
||||
|
||||
assert.throws(TypeError, function() {
|
Loading…
Reference in New Issue