aboutsummaryrefslogtreecommitdiffstats
path: root/website/resources/scripts/testcases2/15.7.3.6_Number.POSITIVE_INFINITY.json
diff options
context:
space:
mode:
Diffstat (limited to 'website/resources/scripts/testcases2/15.7.3.6_Number.POSITIVE_INFINITY.json')
-rw-r--r--website/resources/scripts/testcases2/15.7.3.6_Number.POSITIVE_INFINITY.json34
1 files changed, 34 insertions, 0 deletions
diff --git a/website/resources/scripts/testcases2/15.7.3.6_Number.POSITIVE_INFINITY.json b/website/resources/scripts/testcases2/15.7.3.6_Number.POSITIVE_INFINITY.json
new file mode 100644
index 000000000..93251754b
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.7.3.6_Number.POSITIVE_INFINITY.json
@@ -0,0 +1,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"
+ }
+ ]
+ }
+}