Fix invalid tests

This commit is contained in:
Mike Pennisi 2015-06-17 11:39:54 -04:00
parent cb617493d7
commit ef1fddd533
3 changed files with 8 additions and 10 deletions

View File

@ -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;');
});

View File

@ -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;
});

View File

@ -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);