mirror of https://github.com/tc39/test262.git
Last two invalid test cases have been fixed.
This commit is contained in:
parent
4d241e4bec
commit
e6f9015301
|
@ -1,5 +1,4 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<excludeList>
|
<excludeList>
|
||||||
<test id="S15.3_A3_T1">Uses this.</test>
|
<test id="example">Some description</test>
|
||||||
<test id="S15.3_A3_T3">Uses this.</test>
|
|
||||||
</excludeList>
|
</excludeList>
|
|
@ -9,16 +9,8 @@
|
||||||
* @description First argument is object
|
* @description First argument is object
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1 - does not throw
|
||||||
try{
|
var f = Function.call(mars, "return name;");
|
||||||
var f = Function.call(mars, "return name;");
|
|
||||||
$ERROR('#1: When applied to the Function object itself, thisArg should be ignored');
|
|
||||||
} catch(e){
|
|
||||||
if (!(e instanceof ReferenceError)) {
|
|
||||||
$ERROR('#1.1: When applied to the Function object itself, thisArg should be ignored');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var mars={name:"mars", color:"red", number:4};
|
var mars={name:"mars", color:"red", number:4};
|
||||||
|
|
||||||
var f = Function.call(mars, "this.godname=\"ares\"; return this.color;");
|
var f = Function.call(mars, "this.godname=\"ares\"; return this.color;");
|
||||||
|
@ -31,7 +23,7 @@ if (about_mars !== undefined) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#3
|
//CHECK#3
|
||||||
if (this.godname !== "ares") {
|
if (this.godname !== "ares" && mars.godname===undefined) {
|
||||||
$ERROR('#3: When applied to the Function object itself, thisArg should be ignored');
|
$ERROR('#3: When applied to the Function object itself, thisArg should be ignored');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,13 +13,9 @@ var f=Function.call(this, "return planet;");
|
||||||
var g=Function.call(this, "return color;");
|
var g=Function.call(this, "return color;");
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
try{
|
if (f()!==undefined) {
|
||||||
f();
|
|
||||||
$ERROR('#1: ');
|
$ERROR('#1: ');
|
||||||
} catch(e){
|
}
|
||||||
if (!(e instanceof ReferenceError))
|
|
||||||
$ERROR('#1.1: ');
|
|
||||||
}
|
|
||||||
|
|
||||||
var planet="mars";
|
var planet="mars";
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
||||||
{"date":"2012-01-16","numTests":11179,"testSuite":["json/ch07.json","json/ch08.json","json/ch09.json","json/ch10.json","json/ch11.json","json/ch12.json","json/ch13.json","json/ch14.json","json/ch15.json"],"version":"ES5.1"}
|
{"date":"2012-01-16","numTests":11181,"testSuite":["json/ch07.json","json/ch08.json","json/ch09.json","json/ch10.json","json/ch11.json","json/ch12.json","json/ch13.json","json/ch14.json","json/ch15.json"],"version":"ES5.1"}
|
Loading…
Reference in New Issue