mirror of https://github.com/tc39/test262.git
35 lines
1.7 KiB
JSON
35 lines
1.7 KiB
JSON
{
|
|
"testCollection": {
|
|
"name": "15.7.3.5_Number.NEGATIVE_INFINITY",
|
|
"numTests": 4,
|
|
"tests": [
|
|
{
|
|
"section": "15.7.3.5",
|
|
"description": "Checking sign and finiteness of Number.NEGATIVE_INFINITY",
|
|
"test": "// CHECK#1\nif (isFinite(Number.NEGATIVE_INFINITY) !== false) {\n $ERROR('#1: Number.NEGATIVE_INFINITY === Not-a-Finite');\n} else {\n if ((Number.NEGATIVE_INFINITY < 0) !== true) {\n $ERROR('#1: Number.NEGATIVE_INFINITY === -Infinity');\n }\n}\n",
|
|
"id": "S15.7.3.5_A1"
|
|
},
|
|
{
|
|
"section": "15.7.3.5",
|
|
"description": "Checking if varying Number.NEGATIVE_INFINITY fails",
|
|
"test": "// CHECK#1\nNumber.NEGATIVE_INFINITY = 1;\nif (isFinite(Number.NEGATIVE_INFINITY)) {\n $ERROR('#1: Number.NEGATIVE_INFINITY = 1; Number.NEGATIVE_INFINITY === -Infinity');\n} else { \n if (Number.NEGATIVE_INFINITY >= 0) {\n $ERROR('#1: Number.NEGATIVE_INFINITY = 1; Number.NEGATIVE_INFINITY === -Infinity');\n }\n}\n",
|
|
"id": "S15.7.3.5_A2"
|
|
},
|
|
{
|
|
"section": "15.7.3.5",
|
|
"description": "Checking if deleting Number.NEGATIVE_INFINITY fails",
|
|
"strict_mode_negative": "",
|
|
"test": "// CHECK#1\nif (delete Number.NEGATIVE_INFINITY !== false) {\n $ERROR('#1: delete Number.NEGATIVE_INFINITY === false');\n}\n",
|
|
"id": "S15.7.3.5_A3",
|
|
"strict_only": ""
|
|
},
|
|
{
|
|
"section": "15.7.3.5",
|
|
"description": "Checking if enumerating Number.NEGATIVE_INFINITY fails",
|
|
"test": "//CHECK#1\nfor(var x in Number) {\n if(x === \"NEGATIVE_INFINITY\") {\n $ERROR('#1: Number.NEGATIVE_INFINITY has the attribute DontEnum');\n }\n}\n\nif (Number.propertyIsEnumerable('NEGATIVE_INFINITY')) {\n $ERROR('#2: Number.NEGATIVE_INFINITY has the attribute DontEnum');\n}\n",
|
|
"id": "S15.7.3.5_A4"
|
|
}
|
|
]
|
|
}
|
|
}
|