mirror of https://github.com/tc39/test262.git
Fix invalid tests
This commit is contained in:
parent
cb617493d7
commit
ef1fddd533
|
@ -10,10 +10,9 @@ description: >
|
||||||
Strict Mode - SyntaxError is thrown if a function using the
|
Strict Mode - SyntaxError is thrown if a function using the
|
||||||
Function constructor has two identical parameters in (local)
|
Function constructor has two identical parameters in (local)
|
||||||
strict mode
|
strict mode
|
||||||
negative: Test262Error
|
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [Test262Error.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
throw new Test262Error();
|
assert.throws(SyntaxError, function() {
|
||||||
var _15_3_2_1_10_6_fun = new Function('param_1', 'param_2', 'param_1', '"use strict";return 0;');
|
new Function('param_1', 'param_2', 'param_1', '"use strict";return 0;');
|
||||||
|
});
|
||||||
|
|
|
@ -9,12 +9,11 @@ es5id: 15.3.5-1gs
|
||||||
description: >
|
description: >
|
||||||
StrictMode - error is thrown when reading the 'caller' property of
|
StrictMode - error is thrown when reading the 'caller' property of
|
||||||
a function object
|
a function object
|
||||||
negative: Test262Error
|
|
||||||
flags: [onlyStrict]
|
flags: [onlyStrict]
|
||||||
includes: [Test262Error.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
"use strict";
|
|
||||||
function _15_3_5_1_gs() {}
|
function _15_3_5_1_gs() {}
|
||||||
throw new Test262Error();
|
|
||||||
|
assert.throws(TypeError, function() {
|
||||||
_15_3_5_1_gs.caller;
|
_15_3_5_1_gs.caller;
|
||||||
|
});
|
||||||
|
|
|
@ -15,7 +15,7 @@ includes: [runTestCase.js]
|
||||||
|
|
||||||
function testcase() {
|
function testcase() {
|
||||||
"use strict";
|
"use strict";
|
||||||
eval("(function fun(x){ return x })(10)");
|
eval("function fun(x){ return x }");
|
||||||
return typeof (fun) === "undefined";
|
return typeof (fun) === "undefined";
|
||||||
}
|
}
|
||||||
runTestCase(testcase);
|
runTestCase(testcase);
|
||||||
|
|
Loading…
Reference in New Issue