diff options
Diffstat (limited to 'website/resources/scripts/testcases2/15.7.5_Properties_of_Number_Instances.json')
-rw-r--r-- | website/resources/scripts/testcases2/15.7.5_Properties_of_Number_Instances.json | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/website/resources/scripts/testcases2/15.7.5_Properties_of_Number_Instances.json b/website/resources/scripts/testcases2/15.7.5_Properties_of_Number_Instances.json new file mode 100644 index 000000000..c037f3ef3 --- /dev/null +++ b/website/resources/scripts/testcases2/15.7.5_Properties_of_Number_Instances.json @@ -0,0 +1,50 @@ +{ + "testCollection": { + "name": "15.7.5_Properties_of_Number_Instances", + "numTests": 7, + "tests": [ + { + "section": "15.7.5", + "description": "Checking property constructor", + "test": "//CHECK#1\nif((new Number()).hasOwnProperty(\"constructor\") !== false){\n $ERROR('#1: Number instance must have no special property \"constructor\"');\n}\n\n//CHECK#2\nif((new Number()).constructor !== Number.prototype.constructor){\n $ERROR('#2: Number instance property \"constructor\" must be inherited from Number prototype object');\n}\n\n", + "id": "S15.7.5_A1_T01" + }, + { + "section": "15.7.5", + "description": "Checking property toString", + "test": "//CHECK#1\nif((new Number()).hasOwnProperty(\"toString\") !== false){\n $ERROR('#1: Number instance must have no special property \"toString\"');\n}\n\n//CHECK#2\nif((new Number()).toString !== Number.prototype.toString){\n $ERROR('#2: Number instance property \"toString\" must be inherited from Number prototype object');\n}\n\n", + "id": "S15.7.5_A1_T02" + }, + { + "section": "15.7.5", + "description": "Checking property toLocaleString", + "test": "//CHECK#1\nif((new Number()).hasOwnProperty(\"toLocaleString\") !== false){\n $ERROR('#1: Number instance must have no special property \"toLocaleString\"');\n}\n\n//CHECK#2\nif((new Number()).toLocaleString !== Number.prototype.toLocaleString){\n $ERROR('#2: Number instance property \"toLocaleString\" must be inherited from Number prototype object');\n}\n\n", + "id": "S15.7.5_A1_T03" + }, + { + "section": "15.7.5", + "description": "Checking property valueOf", + "test": "//CHECK#1\nif((new Number()).hasOwnProperty(\"valueOf\") !== false){\n $ERROR('#1: Number instance must have no special property \"valueOf\"');\n}\n\n//CHECK#2\nif((new Number()).valueOf !== Number.prototype.valueOf){\n $ERROR('#2: Number instance property \"valueOf\" must be inherited from Number prototype object');\n}\n\n", + "id": "S15.7.5_A1_T04" + }, + { + "section": "15.7.5", + "description": "Checking property toFixed", + "test": "//CHECK#1\nif((new Number()).hasOwnProperty(\"toFixed\") !== false){\n $ERROR('#1: Number instance must have no special property \"toFixed\"');\n}\n\n//CHECK#2\nif((new Number()).toFixed !== Number.prototype.toFixed){\n $ERROR('#2: Number instance property \"toFixed\" must be inherited from Number prototype object');\n}\n\n", + "id": "S15.7.5_A1_T05" + }, + { + "section": "15.7.5", + "description": "Checking property toExponential", + "test": "//CHECK#1\nif((new Number()).hasOwnProperty(\"toExponential\") !== false){\n $ERROR('#1: Number instance must have no special property \"toExponential\"');\n}\n\n//CHECK#2\nif((new Number()).toExponential !== Number.prototype.toExponential){\n $ERROR('#2: Number instance property \"toExponential\" must be inherited from Number prototype object');\n}\n\n", + "id": "S15.7.5_A1_T06" + }, + { + "section": "15.7.5", + "description": "Checking property toPrecision", + "test": "//CHECK#1\nif((new Number()).hasOwnProperty(\"toPrecision\") !== false){\n $ERROR('#1: Number instance must have no special property \"toPrecision\"');\n}\n\n//CHECK#2\nif((new Number()).toPrecision !== Number.prototype.toPrecision){\n $ERROR('#2: Number instance property \"toPrecision\" must be inherited from Number prototype object');\n}\n\n", + "id": "S15.7.5_A1_T07" + } + ] + } +} |