mirror of https://github.com/tc39/test262.git
21 lines
1.0 KiB
JSON
21 lines
1.0 KiB
JSON
{
|
|
"testCollection": {
|
|
"name": "11.1.2_Identifier_Reference",
|
|
"numTests": 2,
|
|
"tests": [
|
|
{
|
|
"section": "11.1.2",
|
|
"description": "Creating variables without defining it",
|
|
"test": "//CHECK#1\nif (this.x !== undefined) {\n $ERROR('#1: this.x === undefined. Actual: ' + (this.x));\n}\n\n//CHECK#2\nvar object = new Object();\nif (object.prop !== undefined) {\n $ERROR('#2: var object = new Object(); object.prop === undefined. Actual: ' + (object.prop));\n}\n\n//CHECK#3\nthis.y++;\nif (isNaN(y) !== true) {\n $ERROR('#3: this.y++; y === Not-a-Number. Actual: ' + (y));\n}\n",
|
|
"id": "S11.1.2_A1_T1"
|
|
},
|
|
{
|
|
"section": "11.1.2",
|
|
"description": "Trying to generate ReferenceError",
|
|
"test": "//CHECK#1\ntry {\n this.z;\n z;\n $ERROR('#1.1: this.z; z === undefined throw ReferenceError. Actual: ' + (z));\n} catch(e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: this.z; z === undefined throw ReferenceError. Actual: ' + (e));\n }\n}\n",
|
|
"id": "S11.1.2_A1_T2"
|
|
}
|
|
]
|
|
}
|
|
}
|