aboutsummaryrefslogtreecommitdiffstats
path: root/website/resources/scripts/testcases2/15.7.3.5_Number.NEGATIVE_INFINITY.json
blob: 22b1f85f20c117c16e1e3a418fad776600390b58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
 "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"
   }
  ]
 }
}