mirror of
https://github.com/tc39/test262.git
synced 2025-07-27 07:54:41 +02:00
parent
c062d93012
commit
2c1aed0db6
@ -27,13 +27,7 @@ if (delete MyFunction !== false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#4
|
//CHECK#4
|
||||||
function MyFunction(){};
|
|
||||||
var MyObject = new MyFunction();
|
var MyObject = new MyFunction();
|
||||||
if (delete MyObject !== false) {
|
if (delete MyObject !== false) {
|
||||||
$ERROR('#4: function MyFunction(){}; var MyObject = new MyFunction(); delete MyObject === false');
|
$ERROR('#4: function MyFunction(){}; var MyObject = new MyFunction(); delete MyObject === false');
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#5
|
|
||||||
if (delete MyObject !== false) {
|
|
||||||
$ERROR('#5: function MyFunction(){}; var MyObject = new MyFunction(); delete MyObject === false');
|
|
||||||
}
|
|
||||||
|
@ -11,13 +11,13 @@ flags: [noStrict]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
function MyFunction() {return this}
|
function ReturnThis() {return this}
|
||||||
if (MyFunction() !== this) {
|
if (ReturnThis() !== this) {
|
||||||
$ERROR('#1: function MyFunction() {return this} MyFunction() === this. Actual: ' + (MyFunction()));
|
$ERROR('#1: function ReturnThis() {return this} ReturnThis() === this. Actual: ' + (ReturnThis()));
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
function MyFunction() {return eval("this")}
|
function ReturnEvalThis() {return eval("this")}
|
||||||
if (MyFunction() !== this) {
|
if (ReturnEvalThis() !== this) {
|
||||||
$ERROR('#2: function MyFunction() {return eval("this")} MyFunction() === this. Actual: ' + (MyFunction()));
|
$ERROR('#2: function ReturnEvalThis() {return eval("this")} ReturnEvalThis() === this. Actual: ' + (ReturnEvalThis()));
|
||||||
}
|
}
|
||||||
|
@ -11,13 +11,13 @@ flags: [noStrict]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
function MyFunction() {this.THIS = this}
|
function SetThis() {this.THIS = this}
|
||||||
if ((new MyFunction()).THIS.toString() !== "[object Object]") {
|
if ((new SetThis()).THIS.toString() !== "[object Object]") {
|
||||||
$ERROR('#1: function MyFunction() {this.THIS = this} (new MyFunction()).THIS.toString() !== "[object Object]". Actual: ' + ((new MyFunction()).THIS.toString()));
|
$ERROR('#1: function SetThis() {this.THIS = this} (new SetThis()).THIS.toString() !== "[object Object]". Actual: ' + ((new SetThis()).THIS.toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
//CHECK#2
|
//CHECK#2
|
||||||
function MyFunction() {this.THIS = eval("this")}
|
function SetEvalThis() {this.THIS = eval("this")}
|
||||||
if ((new MyFunction()).THIS.toString() !== "[object Object]") {
|
if ((new SetEvalThis()).THIS.toString() !== "[object Object]") {
|
||||||
$ERROR('#2: function MyFunction() {this.THIS = eval("this")} (new MyFunction()).THIS.toString() !== "[object Object]". Actual: ' + ((new MyFunction()).THIS.toString()));
|
$ERROR('#2: function SetEvalThis() {this.THIS = eval("this")} (new SetEvalThis()).THIS.toString() !== "[object Object]". Actual: ' + ((new SetEvalThis()).THIS.toString()));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user