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
|
||||
Function constructor has two identical parameters in (local)
|
||||
strict mode
|
||||
negative: Test262Error
|
||||
flags: [onlyStrict]
|
||||
includes: [Test262Error.js]
|
||||
---*/
|
||||
|
||||
throw new Test262Error();
|
||||
var _15_3_2_1_10_6_fun = new Function('param_1', 'param_2', 'param_1', '"use strict";return 0;');
|
||||
assert.throws(SyntaxError, function() {
|
||||
new Function('param_1', 'param_2', 'param_1', '"use strict";return 0;');
|
||||
});
|
||||
|
|
|
@ -9,12 +9,11 @@ es5id: 15.3.5-1gs
|
|||
description: >
|
||||
StrictMode - error is thrown when reading the 'caller' property of
|
||||
a function object
|
||||
negative: Test262Error
|
||||
flags: [onlyStrict]
|
||||
includes: [Test262Error.js]
|
||||
---*/
|
||||
|
||||
"use strict";
|
||||
function _15_3_5_1_gs() {}
|
||||
throw new Test262Error();
|
||||
_15_3_5_1_gs.caller;
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
_15_3_5_1_gs.caller;
|
||||
});
|
||||
|
|
|
@ -15,7 +15,7 @@ includes: [runTestCase.js]
|
|||
|
||||
function testcase() {
|
||||
"use strict";
|
||||
eval("(function fun(x){ return x })(10)");
|
||||
eval("function fun(x){ return x }");
|
||||
return typeof (fun) === "undefined";
|
||||
}
|
||||
runTestCase(testcase);
|
||||
|
|
Loading…
Reference in New Issue