mirror of
https://github.com/tc39/test262.git
synced 2025-07-28 08:24:23 +02:00
Replace runTestCase with assert.throws [test/language/statements]
This commit is contained in:
parent
3de484fe83
commit
7f55f60b5f
@ -4,15 +4,9 @@
|
|||||||
/*---
|
/*---
|
||||||
es5id: 12.1-1
|
es5id: 12.1-1
|
||||||
description: "12.1 - block '{ StatementListopt };' is not allowed: try-catch"
|
description: "12.1 - block '{ StatementListopt };' is not allowed: try-catch"
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("try{};catch(){}");
|
eval("try{};catch(){}");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -6,15 +6,9 @@ es5id: 12.1-2
|
|||||||
description: >
|
description: >
|
||||||
12.1 - block '{ StatementListopt };' is not allowed:
|
12.1 - block '{ StatementListopt };' is not allowed:
|
||||||
try-catch-finally
|
try-catch-finally
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("try{};catch{};finally{}");
|
eval("try{};catch{};finally{}");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -4,15 +4,9 @@
|
|||||||
/*---
|
/*---
|
||||||
es5id: 12.1-3
|
es5id: 12.1-3
|
||||||
description: "12.1 - block '{ StatementListopt };' is not allowed: try-finally"
|
description: "12.1 - block '{ StatementListopt };' is not allowed: try-finally"
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("try{};finally{}");
|
eval("try{};finally{}");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -4,15 +4,9 @@
|
|||||||
/*---
|
/*---
|
||||||
es5id: 12.1-4
|
es5id: 12.1-4
|
||||||
description: "12.1 - block '{ StatementListopt };' is not allowed: if-else"
|
description: "12.1 - block '{ StatementListopt };' is not allowed: if-else"
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("if{};else{}");
|
eval("if{};else{}");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -4,15 +4,9 @@
|
|||||||
/*---
|
/*---
|
||||||
es5id: 12.1-5
|
es5id: 12.1-5
|
||||||
description: "12.1 - block '{ StatementListopt };' is not allowed: if-else-if"
|
description: "12.1 - block '{ StatementListopt };' is not allowed: if-else-if"
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("if{};else if{}");
|
eval("if{};else if{}");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -6,15 +6,9 @@ es5id: 12.1-6
|
|||||||
description: >
|
description: >
|
||||||
12.1 - block '{ StatementListopt };' is not allowed:
|
12.1 - block '{ StatementListopt };' is not allowed:
|
||||||
if-else-if-else
|
if-else-if-else
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("if{};else if{};else{}");
|
eval("if{};else if{};else{}");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -4,15 +4,9 @@
|
|||||||
/*---
|
/*---
|
||||||
es5id: 12.1-7
|
es5id: 12.1-7
|
||||||
description: "12.1 - block '{ StatementListopt };' is not allowed: do-while"
|
description: "12.1 - block '{ StatementListopt };' is not allowed: do-while"
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("do{};while()");
|
eval("do{};while()");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -6,15 +6,9 @@ es5id: 13.0-1
|
|||||||
description: >
|
description: >
|
||||||
13.0 - multiple names in one function declaration is not allowed,
|
13.0 - multiple names in one function declaration is not allowed,
|
||||||
two function names
|
two function names
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("function x, y() {}");
|
eval("function x, y() {}");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -11,11 +11,8 @@ description: >
|
|||||||
the code of this FunctionBody with an inner function contains a
|
the code of this FunctionBody with an inner function contains a
|
||||||
Use Strict Directive
|
Use Strict Directive
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
function _13_0_10_fun() {
|
function _13_0_10_fun() {
|
||||||
function _13_0_10_inner() {
|
function _13_0_10_inner() {
|
||||||
"use strict";
|
"use strict";
|
||||||
@ -23,11 +20,6 @@ function testcase() {
|
|||||||
}
|
}
|
||||||
_13_0_10_inner();
|
_13_0_10_inner();
|
||||||
};
|
};
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
_13_0_10_fun();
|
_13_0_10_fun();
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -11,11 +11,8 @@ description: >
|
|||||||
the code of this FunctionBody with an inner function which is in
|
the code of this FunctionBody with an inner function which is in
|
||||||
strict mode
|
strict mode
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
function _13_0_11_fun() {
|
function _13_0_11_fun() {
|
||||||
"use strict";
|
"use strict";
|
||||||
function _13_0_11_inner() {
|
function _13_0_11_inner() {
|
||||||
@ -23,11 +20,6 @@ function testcase() {
|
|||||||
}
|
}
|
||||||
_13_0_11_inner();
|
_13_0_11_inner();
|
||||||
};
|
};
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
_13_0_11_fun();
|
_13_0_11_fun();
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -11,16 +11,9 @@ description: >
|
|||||||
the function body of a Function constructor begins with a Strict
|
the function body of a Function constructor begins with a Strict
|
||||||
Directive
|
Directive
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var _13_0_13_fun = new Function(\" \", \"'use strict'; eval = 42;\"); _13_0_13_fun();");
|
eval("var _13_0_13_fun = new Function(\" \", \"'use strict'; eval = 42;\"); _13_0_13_fun();");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -11,17 +11,10 @@ description: >
|
|||||||
the function body of a Function constructor contains a Strict
|
the function body of a Function constructor contains a Strict
|
||||||
Directive
|
Directive
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
var _13_0_14_fun = new Function(" ", "'use strict'; eval = 42; ");
|
var _13_0_14_fun = new Function(" ", "'use strict'; eval = 42; ");
|
||||||
_13_0_14_fun();
|
_13_0_14_fun();
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -11,17 +11,10 @@ description: >
|
|||||||
a FunctionDeclaration is contained in strict mode code within eval
|
a FunctionDeclaration is contained in strict mode code within eval
|
||||||
code
|
code
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("'use strict'; function _13_0_15_fun() {eval = 42;};");
|
eval("'use strict'; function _13_0_15_fun() {eval = 42;};");
|
||||||
_13_0_15_fun();
|
_13_0_15_fun();
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -11,17 +11,10 @@ description: >
|
|||||||
a FunctionExpression is contained in strict mode code within eval
|
a FunctionExpression is contained in strict mode code within eval
|
||||||
code
|
code
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("'use strict'; var _13_0_16_fun = function () {eval = 42;};");
|
eval("'use strict'; var _13_0_16_fun = function () {eval = 42;};");
|
||||||
_13_0_16_fun();
|
_13_0_16_fun();
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -6,15 +6,9 @@ es5id: 13.0-2
|
|||||||
description: >
|
description: >
|
||||||
13.0 - multiple names in one function declaration is not allowed,
|
13.0 - multiple names in one function declaration is not allowed,
|
||||||
three function names
|
three function names
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("function x,y,z(){}");
|
eval("function x,y,z(){}");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -6,16 +6,9 @@ es5id: 13.0-3
|
|||||||
description: >
|
description: >
|
||||||
13.0 - property names in function definition is not allowed, add a
|
13.0 - property names in function definition is not allowed, add a
|
||||||
new property into object
|
new property into object
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
var obj = {};
|
var obj = {};
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("function obj.tt() {};");
|
eval("function obj.tt() {};");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -6,17 +6,10 @@ es5id: 13.0-4
|
|||||||
description: >
|
description: >
|
||||||
13.0 - multiple names in one function declaration is not allowed,
|
13.0 - multiple names in one function declaration is not allowed,
|
||||||
add a new property into a property which is a object
|
add a new property into a property which is a object
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
var obj = {};
|
var obj = {};
|
||||||
obj.tt = { len: 10 };
|
obj.tt = { len: 10 };
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("function obj.tt.ss() {};");
|
eval("function obj.tt.ss() {};");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -11,17 +11,10 @@ description: >
|
|||||||
the code of this FunctionDeclaration is contained in non-strict
|
the code of this FunctionDeclaration is contained in non-strict
|
||||||
mode but the call to eval is a direct call in strict mode code
|
mode but the call to eval is a direct call in strict mode code
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("'use strict'; function _13_0_7_fun() {eval = 42;};");
|
eval("'use strict'; function _13_0_7_fun() {eval = 42;};");
|
||||||
_13_0_7_fun();
|
_13_0_7_fun();
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -11,19 +11,12 @@ description: >
|
|||||||
a FunctionDeclaration that is contained in strict mode code has an
|
a FunctionDeclaration that is contained in strict mode code has an
|
||||||
inner function
|
inner function
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
var _13_0_9_fun = function () {
|
var _13_0_9_fun = function () {
|
||||||
function _13_0_9_inner() { eval("eval = 42;"); }
|
function _13_0_9_inner() { eval("eval = 42;"); }
|
||||||
_13_0_9_inner();
|
_13_0_9_inner();
|
||||||
};
|
};
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
_13_0_9_fun();
|
_13_0_9_fun();
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -12,15 +12,9 @@ description: >
|
|||||||
appears within a FormalParameterList of a strict mode
|
appears within a FormalParameterList of a strict mode
|
||||||
FunctionDeclaration
|
FunctionDeclaration
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("function _13_1_1_fun(eval) { }");
|
eval("function _13_1_1_fun(eval) { }");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -12,15 +12,9 @@ description: >
|
|||||||
'strict mode' using a FunctionExpression and the function has
|
'strict mode' using a FunctionExpression and the function has
|
||||||
three identical parameters
|
three identical parameters
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var _13_1_10_fun = function (param, param, param) { };")
|
eval("var _13_1_10_fun = function (param, param, param) { };")
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,15 +7,9 @@ description: >
|
|||||||
StrictMode - SyntaxError is thrown if 'eval' occurs as the
|
StrictMode - SyntaxError is thrown if 'eval' occurs as the
|
||||||
function name of a FunctionDeclaration in strict mode
|
function name of a FunctionDeclaration in strict mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("function eval() { };")
|
eval("function eval() { };")
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,17 +7,9 @@ description: >
|
|||||||
StrictMode - SyntaxError is thrown if 'eval' occurs as the
|
StrictMode - SyntaxError is thrown if 'eval' occurs as the
|
||||||
Identifier of a FunctionExpression in strict mode
|
Identifier of a FunctionExpression in strict mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
var _13_1_12_s = {};
|
var _13_1_12_s = {};
|
||||||
|
assert.throws(SyntaxError, function() {
|
||||||
try {
|
|
||||||
eval("_13_1_12_s.x = function eval() {};");
|
eval("_13_1_12_s.x = function eval() {};");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,15 +7,9 @@ description: >
|
|||||||
StrictMode - SyntaxError is thrown if 'arguments' occurs as the
|
StrictMode - SyntaxError is thrown if 'arguments' occurs as the
|
||||||
function name of a FunctionDeclaration in strict mode
|
function name of a FunctionDeclaration in strict mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("function arguments() { };")
|
eval("function arguments() { };")
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,17 +7,9 @@ description: >
|
|||||||
StrictMode - SyntaxError is thrown if 'arguments' occurs as the
|
StrictMode - SyntaxError is thrown if 'arguments' occurs as the
|
||||||
Identifier of a FunctionExpression in strict mode
|
Identifier of a FunctionExpression in strict mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
var _13_1_14_s = {};
|
var _13_1_14_s = {};
|
||||||
|
assert.throws(SyntaxError, function() {
|
||||||
try {
|
|
||||||
eval("_13_1_14_s.x = function arguments() {};");
|
eval("_13_1_14_s.x = function arguments() {};");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -12,16 +12,9 @@ description: >
|
|||||||
appears within a FormalParameterList of a strict mode
|
appears within a FormalParameterList of a strict mode
|
||||||
FunctionDeclaration in strict eval code
|
FunctionDeclaration in strict eval code
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("'use strict';function _13_1_15_fun(eval) { }");
|
eval("'use strict';function _13_1_15_fun(eval) { }");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -12,16 +12,9 @@ description: >
|
|||||||
appears within a FormalParameterList of a strict mode
|
appears within a FormalParameterList of a strict mode
|
||||||
FunctionDeclaration when FuctionBody is strict code
|
FunctionDeclaration when FuctionBody is strict code
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("function _13_1_16_fun(eval) { 'use strict'; }");
|
eval("function _13_1_16_fun(eval) { 'use strict'; }");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -12,16 +12,9 @@ description: >
|
|||||||
appears within a FormalParameterList of a strict mode
|
appears within a FormalParameterList of a strict mode
|
||||||
FunctionExpression in strict eval code
|
FunctionExpression in strict eval code
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("'use strict'; var _13_1_17_fun = function (eval) { }");
|
eval("'use strict'; var _13_1_17_fun = function (eval) { }");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -12,16 +12,9 @@ description: >
|
|||||||
appears within a FormalParameterList of a strict mode
|
appears within a FormalParameterList of a strict mode
|
||||||
FunctionExpression when FuctionBody is strict code
|
FunctionExpression when FuctionBody is strict code
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var _13_1_18_fun = function (eval) { 'use strict'; }");
|
eval("var _13_1_18_fun = function (eval) { 'use strict'; }");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -12,16 +12,9 @@ description: >
|
|||||||
appears within a FormalParameterList of a strict mode
|
appears within a FormalParameterList of a strict mode
|
||||||
FunctionDeclaration in strict eval code
|
FunctionDeclaration in strict eval code
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("'use strict';function _13_1_19_fun(arguments) { }");
|
eval("'use strict';function _13_1_19_fun(arguments) { }");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -12,15 +12,9 @@ description: >
|
|||||||
appears within a FormalParameterList of a strict mode
|
appears within a FormalParameterList of a strict mode
|
||||||
FunctionExpression
|
FunctionExpression
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var _13_1_2_fun = function (eval) { }");
|
eval("var _13_1_2_fun = function (eval) { }");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -12,16 +12,9 @@ description: >
|
|||||||
appears within a FormalParameterList of a strict mode
|
appears within a FormalParameterList of a strict mode
|
||||||
FunctionDeclaration when FuctionBody is strict code
|
FunctionDeclaration when FuctionBody is strict code
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("function _13_1_20_fun(arguments) { 'use strict'; }");
|
eval("function _13_1_20_fun(arguments) { 'use strict'; }");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -12,16 +12,9 @@ description: >
|
|||||||
appears within a FormalParameterList of a strict mode
|
appears within a FormalParameterList of a strict mode
|
||||||
FunctionExpression in strict eval code
|
FunctionExpression in strict eval code
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("'use strict'; var _13_1_21_fun = function (arguments) { }");
|
eval("'use strict'; var _13_1_21_fun = function (arguments) { }");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -12,16 +12,9 @@ description: >
|
|||||||
appears within a FormalParameterList of a strict mode
|
appears within a FormalParameterList of a strict mode
|
||||||
FunctionExpression when FuctionBody is strict code
|
FunctionExpression when FuctionBody is strict code
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var _13_1_22_fun = function (arguments) { 'use strict'; }");
|
eval("var _13_1_22_fun = function (arguments) { 'use strict'; }");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -12,16 +12,9 @@ description: >
|
|||||||
a FunctionDeclaration that is contained in eval strict code and
|
a FunctionDeclaration that is contained in eval strict code and
|
||||||
the function has two identical parameters
|
the function has two identical parameters
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("'use strict'; function _13_1_23_fun(param, param) { }");
|
eval("'use strict'; function _13_1_23_fun(param, param) { }");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -12,16 +12,9 @@ description: >
|
|||||||
a FunctionDeclaration whose FunctionBody is contained in strict
|
a FunctionDeclaration whose FunctionBody is contained in strict
|
||||||
code and the function has two identical parameters
|
code and the function has two identical parameters
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("function _13_1_24_fun(param, param) { 'use strict'; }");
|
eval("function _13_1_24_fun(param, param) { 'use strict'; }");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -13,16 +13,9 @@ description: >
|
|||||||
the function has two identical parameters which are separated by a
|
the function has two identical parameters which are separated by a
|
||||||
unique parameter name
|
unique parameter name
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("'use strict'; function _13_1_25_fun(param1, param2, param1) { }");
|
eval("'use strict'; function _13_1_25_fun(param1, param2, param1) { }");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -13,16 +13,9 @@ description: >
|
|||||||
code and the function has two identical parameters which are
|
code and the function has two identical parameters which are
|
||||||
separated by a unique parameter name
|
separated by a unique parameter name
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("function _13_1_26_fun(param1, param2, param1) { 'use strict'; }");
|
eval("function _13_1_26_fun(param1, param2, param1) { 'use strict'; }");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -12,16 +12,9 @@ description: >
|
|||||||
a FunctionDeclaration that is contained in eval strict code and
|
a FunctionDeclaration that is contained in eval strict code and
|
||||||
the function has three identical parameters
|
the function has three identical parameters
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("'use strict'; function _13_1_27_fun(param, param, param) { }");
|
eval("'use strict'; function _13_1_27_fun(param, param, param) { }");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -12,17 +12,9 @@ description: >
|
|||||||
a FunctionDeclaration whose FunctionBody is contained in strict
|
a FunctionDeclaration whose FunctionBody is contained in strict
|
||||||
code and the function has three identical parameters
|
code and the function has three identical parameters
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("function _13_1_28_fun(param, param, param) { 'use strict'; }");
|
eval("function _13_1_28_fun(param, param, param) { 'use strict'; }");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -12,16 +12,9 @@ description: >
|
|||||||
a FunctionExpression that is contained in eval strict code and the
|
a FunctionExpression that is contained in eval strict code and the
|
||||||
function has two identical parameters
|
function has two identical parameters
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("'use strict'; var _13_1_29_fun = function (param, param) { };");
|
eval("'use strict'; var _13_1_29_fun = function (param, param) { };");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -12,15 +12,9 @@ description: >
|
|||||||
appears within a FormalParameterList of a strict mode
|
appears within a FormalParameterList of a strict mode
|
||||||
FunctionDeclaration
|
FunctionDeclaration
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("function _13_1_3_fun(arguments) { }");
|
eval("function _13_1_3_fun(arguments) { }");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -12,16 +12,9 @@ description: >
|
|||||||
a FunctionExpression whose FunctionBody is contained in strict
|
a FunctionExpression whose FunctionBody is contained in strict
|
||||||
code and the function has two identical parameters
|
code and the function has two identical parameters
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var _13_1_30_fun = function (param, param) { 'use strict'; };");
|
eval("var _13_1_30_fun = function (param, param) { 'use strict'; };");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -13,16 +13,9 @@ description: >
|
|||||||
function has two identical parameters, which are separated by a
|
function has two identical parameters, which are separated by a
|
||||||
unique parameter name
|
unique parameter name
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("'use strict'; var _13_1_31_fun = function (param1, param2, param1) { };");
|
eval("'use strict'; var _13_1_31_fun = function (param1, param2, param1) { };");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -13,16 +13,9 @@ description: >
|
|||||||
has two identical parameters, which are separated by a unique
|
has two identical parameters, which are separated by a unique
|
||||||
parameter name
|
parameter name
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var _13_1_32_fun = function (param1, param2, param1) { 'use strict'; };");
|
eval("var _13_1_32_fun = function (param1, param2, param1) { 'use strict'; };");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -12,16 +12,9 @@ description: >
|
|||||||
FunctionExpression that is contained in eval strict code and the
|
FunctionExpression that is contained in eval strict code and the
|
||||||
function has three identical parameters
|
function has three identical parameters
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("'use strict'; var _13_1_33_fun = function (param, param, param) { };")
|
eval("'use strict'; var _13_1_33_fun = function (param, param, param) { };")
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -11,16 +11,9 @@ description: >
|
|||||||
Strict Mode - SyntaxError is thrown if a function declaration has
|
Strict Mode - SyntaxError is thrown if a function declaration has
|
||||||
three identical parameters with a strict mode body
|
three identical parameters with a strict mode body
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var _13_1_34_fun = function (param, param, param) { 'use strict'; };")
|
eval("var _13_1_34_fun = function (param, param, param) { 'use strict'; };")
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,16 +7,9 @@ description: >
|
|||||||
StrictMode - SyntaxError is thrown if 'eval' occurs as the
|
StrictMode - SyntaxError is thrown if 'eval' occurs as the
|
||||||
function name of a FunctionDeclaration in strict eval code
|
function name of a FunctionDeclaration in strict eval code
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("'use strict'; function eval() { };")
|
eval("'use strict'; function eval() { };")
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -8,16 +8,9 @@ description: >
|
|||||||
function name of a FunctionDeclaration whose FunctionBody is in
|
function name of a FunctionDeclaration whose FunctionBody is in
|
||||||
strict mode
|
strict mode
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("function eval() { 'use strict'; };")
|
eval("function eval() { 'use strict'; };")
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,16 +7,9 @@ description: >
|
|||||||
StrictMode - SyntaxError is thrown if 'eval' occurs as the
|
StrictMode - SyntaxError is thrown if 'eval' occurs as the
|
||||||
Identifier of a FunctionExpression in strict eval code
|
Identifier of a FunctionExpression in strict eval code
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
var _13_1_37_s = {};
|
var _13_1_37_s = {};
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("'use strict'; _13_1_37_s.x = function eval() {};");
|
eval("'use strict'; _13_1_37_s.x = function eval() {};");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -8,16 +8,9 @@ description: >
|
|||||||
Identifier of a FunctionExpression whose FunctionBody is contained
|
Identifier of a FunctionExpression whose FunctionBody is contained
|
||||||
in strict code
|
in strict code
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
var _13_1_38_s = {};
|
var _13_1_38_s = {};
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("_13_1_38_s.x = function eval() {'use strict'; };");
|
eval("_13_1_38_s.x = function eval() {'use strict'; };");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,16 +7,9 @@ description: >
|
|||||||
StrictMode - SyntaxError is thrown if 'arguments' occurs as the
|
StrictMode - SyntaxError is thrown if 'arguments' occurs as the
|
||||||
function name of a FunctionDeclaration in strict eval code
|
function name of a FunctionDeclaration in strict eval code
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("'use strict'; function arguments() { };")
|
eval("'use strict'; function arguments() { };")
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -12,15 +12,9 @@ description: >
|
|||||||
appears within a FormalParameterList of a strict mode
|
appears within a FormalParameterList of a strict mode
|
||||||
FunctionExpression
|
FunctionExpression
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var _13_1_4_fun = function (arguments) { };");
|
eval("var _13_1_4_fun = function (arguments) { };");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -8,16 +8,9 @@ description: >
|
|||||||
Identifier of a FunctionDeclaration whose FunctionBody is
|
Identifier of a FunctionDeclaration whose FunctionBody is
|
||||||
contained in strict code
|
contained in strict code
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("function arguments() { 'use strict'; };")
|
eval("function arguments() { 'use strict'; };")
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,16 +7,9 @@ description: >
|
|||||||
StrictMode - SyntaxError is thrown if 'arguments' occurs as the
|
StrictMode - SyntaxError is thrown if 'arguments' occurs as the
|
||||||
Identifier of a FunctionExpression in strict eval code
|
Identifier of a FunctionExpression in strict eval code
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
var _13_1_41_s = {};
|
var _13_1_41_s = {};
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("'use strict'; _13_1_41_s.x = function arguments() {};");
|
eval("'use strict'; _13_1_41_s.x = function arguments() {};");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -8,16 +8,9 @@ description: >
|
|||||||
Identifier of a FunctionExpression whose FunctionBody is contained
|
Identifier of a FunctionExpression whose FunctionBody is contained
|
||||||
in strict code
|
in strict code
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
var _13_1_42_s = {};
|
var _13_1_42_s = {};
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("_13_1_42_s.x = function arguments() {'use strict';};");
|
eval("_13_1_42_s.x = function arguments() {'use strict';};");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -12,15 +12,9 @@ description: >
|
|||||||
'strict mode' using a FunctionDeclaration and the function has two
|
'strict mode' using a FunctionDeclaration and the function has two
|
||||||
identical parameters
|
identical parameters
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("function _13_1_5_fun(param, param) { }");
|
eval("function _13_1_5_fun(param, param) { }");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -13,15 +13,9 @@ description: >
|
|||||||
identical parameters, which are separated by a unique parameter
|
identical parameters, which are separated by a unique parameter
|
||||||
name
|
name
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("function _13_1_6_fun(param1, param2, param1) { }");
|
eval("function _13_1_6_fun(param1, param2, param1) { }");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -12,15 +12,9 @@ description: >
|
|||||||
'strict mode' using a FunctionDeclaration and the function has
|
'strict mode' using a FunctionDeclaration and the function has
|
||||||
three identical parameters
|
three identical parameters
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("function _13_1_7_fun(param, param, param) { }");
|
eval("function _13_1_7_fun(param, param, param) { }");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -12,15 +12,9 @@ description: >
|
|||||||
'strict mode' using a FunctionExpression and the function has two
|
'strict mode' using a FunctionExpression and the function has two
|
||||||
identical parameters
|
identical parameters
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var _13_1_8_fun = function (param, param) { };");
|
eval("var _13_1_8_fun = function (param, param) { };");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -13,15 +13,9 @@ description: >
|
|||||||
identical parameters, which are separated by a unique parameter
|
identical parameters, which are separated by a unique parameter
|
||||||
name
|
name
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval("var _13_1_9_fun = function (param1, param2, param1) { };");
|
eval("var _13_1_9_fun = function (param1, param2, param1) { };");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -6,17 +6,9 @@ es5id: 13.2-10-s
|
|||||||
description: >
|
description: >
|
||||||
StrictMode - writing a property named 'caller' of function objects
|
StrictMode - writing a property named 'caller' of function objects
|
||||||
is not allowed outside the function
|
is not allowed outside the function
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
var foo = Function("'use strict';");
|
var foo = Function("'use strict';");
|
||||||
try {
|
assert.throws(TypeError, function() {
|
||||||
foo.caller = 41;
|
foo.caller = 41;
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return e instanceof TypeError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -6,17 +6,9 @@ es5id: 13.2-13-s
|
|||||||
description: >
|
description: >
|
||||||
StrictMode - reading a property named 'arguments' of function
|
StrictMode - reading a property named 'arguments' of function
|
||||||
objects is not allowed outside the function
|
objects is not allowed outside the function
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
var foo = new Function("'use strict';");
|
var foo = new Function("'use strict';");
|
||||||
try {
|
assert.throws(TypeError, function() {
|
||||||
var temp = foo.arguments;
|
var temp = foo.arguments;
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return e instanceof TypeError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -6,17 +6,9 @@ es5id: 13.2-14-s
|
|||||||
description: >
|
description: >
|
||||||
StrictMode - writing a property named 'arguments' of function
|
StrictMode - writing a property named 'arguments' of function
|
||||||
objects is not allowed outside the function
|
objects is not allowed outside the function
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
var foo = new Function("'use strict';");
|
var foo = new Function("'use strict';");
|
||||||
try {
|
assert.throws(TypeError, function() {
|
||||||
foo.arguments = 41;
|
foo.arguments = 41;
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return e instanceof TypeError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -6,17 +6,9 @@ es5id: 13.2-17-s
|
|||||||
description: >
|
description: >
|
||||||
StrictMode - reading a property named 'arguments' of function
|
StrictMode - reading a property named 'arguments' of function
|
||||||
objects is not allowed outside the function
|
objects is not allowed outside the function
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
var foo = Function("'use strict';");
|
var foo = Function("'use strict';");
|
||||||
try {
|
assert.throws(TypeError, function() {
|
||||||
var temp = foo.arguments;
|
var temp = foo.arguments;
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return e instanceof TypeError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -6,17 +6,9 @@ es5id: 13.2-18-s
|
|||||||
description: >
|
description: >
|
||||||
StrictMode - writing a property named 'arguments' of function
|
StrictMode - writing a property named 'arguments' of function
|
||||||
objects is not allowed outside the function
|
objects is not allowed outside the function
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
var foo = Function("'use strict';");
|
var foo = Function("'use strict';");
|
||||||
try {
|
assert.throws(TypeError, function() {
|
||||||
foo.arguments = 41;
|
foo.arguments = 41;
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return e instanceof TypeError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,17 +7,11 @@ description: >
|
|||||||
StrictMode - A TypeError is thrown when a strict mode code writes
|
StrictMode - A TypeError is thrown when a strict mode code writes
|
||||||
to properties named 'caller' of function instances.
|
to properties named 'caller' of function instances.
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(TypeError, function() {
|
||||||
var foo = function () {
|
var foo = function () {
|
||||||
}
|
}
|
||||||
foo.caller = 20;
|
foo.caller = 20;
|
||||||
return false;
|
});
|
||||||
} catch (ex) {
|
|
||||||
return ex instanceof TypeError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,17 +7,9 @@ description: >
|
|||||||
StrictMode - reading a property named 'caller' of function objects
|
StrictMode - reading a property named 'caller' of function objects
|
||||||
is not allowed outside the function
|
is not allowed outside the function
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
function foo () {"use strict";}
|
function foo () {"use strict";}
|
||||||
try {
|
assert.throws(TypeError, function() {
|
||||||
var temp = foo.caller;
|
var temp = foo.caller;
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return e instanceof TypeError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,17 +7,9 @@ description: >
|
|||||||
StrictMode - writing a property named 'caller' of function objects
|
StrictMode - writing a property named 'caller' of function objects
|
||||||
is not allowed outside the function
|
is not allowed outside the function
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
function foo () {"use strict";}
|
function foo () {"use strict";}
|
||||||
try {
|
assert.throws(TypeError, function() {
|
||||||
foo.caller = 41;
|
foo.caller = 41;
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return e instanceof TypeError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,17 +7,9 @@ description: >
|
|||||||
StrictMode - reading a property named 'arguments' of function
|
StrictMode - reading a property named 'arguments' of function
|
||||||
objects is not allowed outside the function
|
objects is not allowed outside the function
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
function foo () {"use strict";}
|
function foo () {"use strict";}
|
||||||
try {
|
assert.throws(TypeError, function() {
|
||||||
var temp = foo.arguments;
|
var temp = foo.arguments;
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return e instanceof TypeError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,17 +7,9 @@ description: >
|
|||||||
StrictMode - writing a property named 'arguments' of function
|
StrictMode - writing a property named 'arguments' of function
|
||||||
objects is not allowed outside the function
|
objects is not allowed outside the function
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
function foo () {"use strict";}
|
function foo () {"use strict";}
|
||||||
try {
|
assert.throws(TypeError, function() {
|
||||||
foo.arguments = 41;
|
foo.arguments = 41;
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return e instanceof TypeError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,17 +7,11 @@ description: >
|
|||||||
StrictMode - A TypeError is thrown when a code in strict mode
|
StrictMode - A TypeError is thrown when a code in strict mode
|
||||||
tries to write to 'arguments' of function instances.
|
tries to write to 'arguments' of function instances.
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(TypeError, function() {
|
||||||
var foo = function () {
|
var foo = function () {
|
||||||
}
|
}
|
||||||
foo.arguments = 20;
|
foo.arguments = 20;
|
||||||
return false;
|
});
|
||||||
} catch (ex) {
|
|
||||||
return ex instanceof TypeError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,17 +7,9 @@ description: >
|
|||||||
StrictMode - reading a property named 'caller' of function objects
|
StrictMode - reading a property named 'caller' of function objects
|
||||||
is not allowed outside the function
|
is not allowed outside the function
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
var foo = new Function("'use strict';");
|
var foo = new Function("'use strict';");
|
||||||
try {
|
assert.throws(TypeError, function() {
|
||||||
var temp = foo.caller;
|
var temp = foo.caller;
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return e instanceof TypeError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,17 +7,9 @@ description: >
|
|||||||
StrictMode - writing a property named 'caller' of function objects
|
StrictMode - writing a property named 'caller' of function objects
|
||||||
is not allowed outside the function
|
is not allowed outside the function
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
var foo = new Function("'use strict';");
|
var foo = new Function("'use strict';");
|
||||||
try {
|
assert.throws(TypeError, function() {
|
||||||
foo.caller = 41;
|
foo.caller = 41;
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return e instanceof TypeError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,17 +7,9 @@ description: >
|
|||||||
StrictMode - reading a property named 'caller' of function objects
|
StrictMode - reading a property named 'caller' of function objects
|
||||||
is not allowed outside the function
|
is not allowed outside the function
|
||||||
flags: [noStrict]
|
flags: [noStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
var foo = Function("'use strict';");
|
var foo = Function("'use strict';");
|
||||||
try {
|
assert.throws(TypeError, function() {
|
||||||
var temp = foo.caller;
|
var temp = foo.caller;
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return e instanceof TypeError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -8,17 +8,10 @@ description: >
|
|||||||
occurs within strict code and the Identifier of the Catch
|
occurs within strict code and the Identifier of the Catch
|
||||||
production is eval
|
production is eval
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
assert.throws(SyntaxError, function() {
|
||||||
try {
|
|
||||||
eval("\
|
eval("\
|
||||||
try {} catch (eval) { }\
|
try {} catch (eval) { }\
|
||||||
");
|
");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -8,17 +8,10 @@ description: >
|
|||||||
occurs within strict code and the Identifier of the Catch
|
occurs within strict code and the Identifier of the Catch
|
||||||
production is arguments
|
production is arguments
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
assert.throws(SyntaxError, function() {
|
||||||
try {
|
|
||||||
eval("\
|
eval("\
|
||||||
try {} catch (arguments) { }\
|
try {} catch (arguments) { }\
|
||||||
");
|
");
|
||||||
return false;
|
});
|
||||||
} catch (e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -8,11 +8,10 @@ description: >
|
|||||||
Catch occurs within strict code and the Identifier of the Catch
|
Catch occurs within strict code and the Identifier of the Catch
|
||||||
production is EVAL but throws SyntaxError if it is eval
|
production is EVAL but throws SyntaxError if it is eval
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
assert.throws(SyntaxError, function() {
|
||||||
try{ eval(" try { \
|
eval(" try { \
|
||||||
throw new Error(\"...\");\
|
throw new Error(\"...\");\
|
||||||
return false;\
|
return false;\
|
||||||
} catch (EVAL) {\
|
} catch (EVAL) {\
|
||||||
@ -24,9 +23,4 @@ function testcase() {
|
|||||||
return EVAL instanceof Error;\
|
return EVAL instanceof Error;\
|
||||||
}\
|
}\
|
||||||
}");
|
}");
|
||||||
return false;
|
});
|
||||||
} catch(e) {
|
|
||||||
return e instanceof SyntaxError;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,16 +7,9 @@ description: >
|
|||||||
eval - a function declaring a var named 'eval' throws SyntaxError
|
eval - a function declaring a var named 'eval' throws SyntaxError
|
||||||
in strict mode
|
in strict mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval('function foo() { var eval; }');
|
eval('function foo() { var eval; }');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,16 +5,9 @@
|
|||||||
es5id: 12.2.1-12-s
|
es5id: 12.2.1-12-s
|
||||||
description: arguments as local var identifier throws SyntaxError in strict mode
|
description: arguments as local var identifier throws SyntaxError in strict mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval('function foo() { var arguments;}');
|
eval('function foo() { var arguments;}');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,16 +5,9 @@
|
|||||||
es5id: 12.2.1-13-s
|
es5id: 12.2.1-13-s
|
||||||
description: arguments assignment throws SyntaxError in strict mode
|
description: arguments assignment throws SyntaxError in strict mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval('function foo() { arguments = 42; }; foo()');
|
eval('function foo() { arguments = 42; }; foo()');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,16 +7,9 @@ description: >
|
|||||||
arguments - a function expr declaring a var named 'arguments'
|
arguments - a function expr declaring a var named 'arguments'
|
||||||
throws SyntaxError in strict mode
|
throws SyntaxError in strict mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval('(function (){var arguments;});');
|
eval('(function (){var arguments;});');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,16 +7,9 @@ description: >
|
|||||||
arguments - a function expr assigning into 'arguments' throws a
|
arguments - a function expr assigning into 'arguments' throws a
|
||||||
SyntaxError in strict mode
|
SyntaxError in strict mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval('(function () {arguments = 42;})()');
|
eval('(function () {arguments = 42;})()');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,16 +7,9 @@ description: >
|
|||||||
A direct eval declaring a var named 'arguments' throws SyntaxError
|
A direct eval declaring a var named 'arguments' throws SyntaxError
|
||||||
in strict mode
|
in strict mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval('var arguments;');
|
eval('var arguments;');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,16 +7,9 @@ description: >
|
|||||||
A direct eval assigning into 'arguments' throws SyntaxError in
|
A direct eval assigning into 'arguments' throws SyntaxError in
|
||||||
strict mode
|
strict mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval('arguments = 42;');
|
eval('arguments = 42;');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError) ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,16 +7,9 @@ description: >
|
|||||||
eval - a function assigning into 'eval' throws SyntaxError in
|
eval - a function assigning into 'eval' throws SyntaxError in
|
||||||
strict mode
|
strict mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval('function foo() { eval = 42; }; foo()');
|
eval('function foo() { eval = 42; }; foo()');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -6,19 +6,9 @@ es5id: 12.2.1-22-s
|
|||||||
description: >
|
description: >
|
||||||
arguments as global var identifier throws SyntaxError in strict
|
arguments as global var identifier throws SyntaxError in strict
|
||||||
mode
|
mode
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
|
|
||||||
var indirectEval = eval;
|
var indirectEval = eval;
|
||||||
|
assert.throws(SyntaxError, function() {
|
||||||
try {
|
|
||||||
indirectEval("'use strict'; var arguments;");
|
indirectEval("'use strict'; var arguments;");
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,16 +7,9 @@ description: >
|
|||||||
arguments as local var identifier assigned to throws SyntaxError
|
arguments as local var identifier assigned to throws SyntaxError
|
||||||
in strict mode
|
in strict mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval('function foo() { var arguments = 42;}');
|
eval('function foo() { var arguments = 42;}');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,16 +7,9 @@ description: >
|
|||||||
eval as local var identifier assigned to throws SyntaxError in
|
eval as local var identifier assigned to throws SyntaxError in
|
||||||
strict mode
|
strict mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval('function foo() { var eval = 42;}');
|
eval('function foo() { var eval = 42;}');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,16 +5,9 @@
|
|||||||
es5id: 12.2.1-25-s
|
es5id: 12.2.1-25-s
|
||||||
description: arguments as local var identifier throws SyntaxError in strict mode
|
description: arguments as local var identifier throws SyntaxError in strict mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval('function foo() { var arguments, a;}');
|
eval('function foo() { var arguments, a;}');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,16 +5,9 @@
|
|||||||
es5id: 12.2.1-26-s
|
es5id: 12.2.1-26-s
|
||||||
description: eval as local var identifier throws SyntaxError in strict mode
|
description: eval as local var identifier throws SyntaxError in strict mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval('function foo() { var a, eval;}');
|
eval('function foo() { var a, eval;}');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,16 +7,9 @@ description: >
|
|||||||
eval as local var identifier assigned to throws SyntaxError in
|
eval as local var identifier assigned to throws SyntaxError in
|
||||||
strict mode
|
strict mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval('function foo() { var eval = 42, a;}');
|
eval('function foo() { var eval = 42, a;}');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,16 +7,9 @@ description: >
|
|||||||
arguments as local var identifier assigned to throws SyntaxError
|
arguments as local var identifier assigned to throws SyntaxError
|
||||||
in strict mode
|
in strict mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval('function foo() { var a, arguments = 42;}');
|
eval('function foo() { var a, arguments = 42;}');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,16 +5,9 @@
|
|||||||
es5id: 12.2.1-29-s
|
es5id: 12.2.1-29-s
|
||||||
description: eval as local var identifier throws SyntaxError in strict mode
|
description: eval as local var identifier throws SyntaxError in strict mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval('function foo() { var eval, a = 42;}');
|
eval('function foo() { var eval, a = 42;}');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,16 +7,9 @@ description: >
|
|||||||
eval - a function expr declaring a var named 'eval' throws
|
eval - a function expr declaring a var named 'eval' throws
|
||||||
SyntaxError in strict mode
|
SyntaxError in strict mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval('(function () { var eval; })');
|
eval('(function () { var eval; })');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,16 +5,9 @@
|
|||||||
es5id: 12.2.1-30-s
|
es5id: 12.2.1-30-s
|
||||||
description: arguments as local var identifier throws SyntaxError in strict mode
|
description: arguments as local var identifier throws SyntaxError in strict mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval('function foo() { var a = 42, arguments;}');
|
eval('function foo() { var a = 42, arguments;}');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,16 +7,9 @@ description: >
|
|||||||
eval as local var identifier defined twice throws SyntaxError in
|
eval as local var identifier defined twice throws SyntaxError in
|
||||||
strict mode
|
strict mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval('function foo() { var eval, eval;}');
|
eval('function foo() { var eval, eval;}');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,16 +7,9 @@ description: >
|
|||||||
arguments as local var identifier defined twice and assigned once
|
arguments as local var identifier defined twice and assigned once
|
||||||
throws SyntaxError in strict mode
|
throws SyntaxError in strict mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval('function foo() { var arguments, arguments = 42;}');
|
eval('function foo() { var arguments, arguments = 42;}');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,16 +5,9 @@
|
|||||||
es5id: 12.2.1-33-s
|
es5id: 12.2.1-33-s
|
||||||
description: arguments as local var identifier throws SyntaxError in strict mode
|
description: arguments as local var identifier throws SyntaxError in strict mode
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval('function foo() { var a, arguments, b;}');
|
eval('function foo() { var a, arguments, b;}');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -5,16 +5,9 @@
|
|||||||
es5id: 12.2.1-34-s
|
es5id: 12.2.1-34-s
|
||||||
description: "'for(var eval in ...) {...}' throws SyntaxError in strict mode"
|
description: "'for(var eval in ...) {...}' throws SyntaxError in strict mode"
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
try {
|
assert.throws(SyntaxError, function() {
|
||||||
eval('for (var eval in null) {};');
|
eval('for (var eval in null) {};');
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
return (e instanceof SyntaxError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user