aboutsummaryrefslogtreecommitdiffstats
path: root/website/resources/scripts/testcases2/15.7.3.6_Number.POSITIVE_INFINITY.json
blob: 93251754b24699e4c63e0ab7fe1ced2a2cdc116f (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.6_Number.POSITIVE_INFINITY",
  "numTests": 4,
  "tests": [
   {
    "section": "15.7.3.6",
    "description": "Checking sign and finiteness of Number.POSITIVE_INFINITY",
    "test": "// CHECK#1\nif (isFinite(Number.POSITIVE_INFINITY) !== false) {\n  $ERROR('#1: Number.POSITIVE_INFINITY === Not-a-Finite');\n} else {\n  if ((Number.POSITIVE_INFINITY > 0) !== true) {\n    $ERROR('#1: Number.POSITIVE_INFINITY === +Infinity');\n  }\n}\n",
    "id": "S15.7.3.6_A1"
   },
   {
    "section": "15.7.3.6",
    "description": "Checking if varying Number.POSITIVE_INFINITY fails",
    "test": "// CHECK#1\nNumber.POSITIVE_INFINITY = 1;\nif (isFinite(Number.POSITIVE_INFINITY)) {\n  $ERROR('#1: Number.POSITIVE_INFINITY = 1; Number.POSITIVE_INFINITY === +Infinity');\n} else { \n  if (Number.POSITIVE_INFINITY <= 0) {\n    $ERROR('#1: Number.POSITIVE_INFINITY = 1; Number.POSITIVE_INFINITY === +Infinity');\n  }\n}\n",
    "id": "S15.7.3.6_A2"
   },
   {
    "section": "15.7.3.6",
    "description": "Checking if deleting Number.POSITIVE_INFINITY fails",
    "strict_mode_negative": "",
    "test": "// CHECK#1\nif (delete Number.POSITIVE_INFINITY !== false) {\n  $ERROR('#1: delete Number.POSITIVE_INFINITY === false');\n}\n",
    "id": "S15.7.3.6_A3",
    "strict_only": ""
   },
   {
    "section": "15.7.3.6",
    "description": "Checking if enumerating Number.POSITIVE_INFINITY fails",
    "test": "//CHECK#1\nfor(var x in Number) {\n  if(x === \"POSITIVE_INFINITY\") {\n    $ERROR('#1: Number.POSITIVE_INFINITY has the attribute DontEnum');\n  }\n}\n\nif (Number.propertyIsEnumerable('POSITIVE_INFINITY')) {\n  $ERROR('#2: Number.POSITIVE_INFINITY has the attribute DontEnum');\n}\n",
    "id": "S15.7.3.6_A4"
   }
  ]
 }
}