mirror of
https://github.com/tc39/test262.git
synced 2025-07-30 17:34:51 +02:00
21 lines
892 B
JSON
21 lines
892 B
JSON
{
|
|
"testCollection": {
|
|
"name": "10.2_Entering_An_Execution_Context",
|
|
"numTests": 2,
|
|
"tests": [
|
|
{
|
|
"section": "10.2",
|
|
"description": "Sequence of function calls",
|
|
"test": "var y;\n\nfunction f(){\n var x;\n \n if(x === undefined) {\n x = 0;\n } else {\n x = 1;\n }\n \n return x;\n}\n\ny = f();\ny = f();\n\nif(!(y === 0)){\n $ERROR(\"#1: Sequenced function calls shares execution context\");\n}\n",
|
|
"id": "S10.2_A1.1_T1"
|
|
},
|
|
{
|
|
"section": "10.2",
|
|
"description": "Recursive function call",
|
|
"test": "var y;\n\nfunction f(a){\n var x;\n \n if (a === 1) \n return x;\n else {\n if(x === undefined) {\n x = 0;\n } else {\n x = 1;\n }\n return f(1);\n }\n}\n\ny = f(0);\n\nif(!(y === undefined)){\n $ERROR(\"#1: Recursive function calls shares execution context\");\n}\n",
|
|
"id": "S10.2_A1.1_T2"
|
|
}
|
|
]
|
|
}
|
|
}
|