diff options
Diffstat (limited to 'website/resources/scripts/testcases2/15.9.5.15_Date.prototype.getUTCDate.json')
-rw-r--r-- | website/resources/scripts/testcases2/15.9.5.15_Date.prototype.getUTCDate.json | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/website/resources/scripts/testcases2/15.9.5.15_Date.prototype.getUTCDate.json b/website/resources/scripts/testcases2/15.9.5.15_Date.prototype.getUTCDate.json new file mode 100644 index 000000000..426ad5cf7 --- /dev/null +++ b/website/resources/scripts/testcases2/15.9.5.15_Date.prototype.getUTCDate.json @@ -0,0 +1,50 @@ +{ + "testCollection": { + "name": "15.9.5.15_Date.prototype.getUTCDate", + "numTests": 7, + "tests": [ + { + "section": "15.9.5.15", + "description": "Checking absence of ReadOnly attribute", + "test": "x = Date.prototype.getUTCDate;\nif(x === 1)\n Date.prototype.getUTCDate = 2;\nelse\n Date.prototype.getUTCDate = 1;\nif (Date.prototype.getUTCDate === x) {\n $ERROR('#1: The Date.prototype.getUTCDate has not the attribute ReadOnly');\n}\n\n", + "id": "S15.9.5.15_A1_T1" + }, + { + "section": "15.9.5.15", + "description": "Checking absence of DontDelete attribute", + "test": "if (delete Date.prototype.getUTCDate === false) {\n $ERROR('#1: The Date.prototype.getUTCDate property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('getUTCDate')) {\n $FAIL('#2: The Date.prototype.getUTCDate property has not the attributes DontDelete');\n}\n\n", + "id": "S15.9.5.15_A1_T2" + }, + { + "section": "15.9.5.15", + "description": "Checking DontEnum attribute", + "test": "if (Date.prototype.propertyIsEnumerable('getUTCDate')) {\n $ERROR('#1: The Date.prototype.getUTCDate property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"getUTCDate\") {\n $ERROR('#2: The Date.prototype.getUTCDate has the attribute DontEnum');\n }\n}\n\n", + "id": "S15.9.5.15_A1_T3" + }, + { + "section": "15.9.5.15", + "description": "The \"length\" property of the \"getUTCDate\" is 0", + "test": "if(Date.prototype.getUTCDate.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The getUTCDate has a \"length\" property');\n}\n\nif(Date.prototype.getUTCDate.length !== 0){\n $ERROR('#2: The \"length\" property of the getUTCDate is 0');\n}\n\n", + "id": "S15.9.5.15_A2_T1" + }, + { + "section": "15.9.5.15", + "description": "Checking ReadOnly attribute", + "test": "x = Date.prototype.getUTCDate.length;\nDate.prototype.getUTCDate.length = 1;\nif (Date.prototype.getUTCDate.length !== x) {\n $ERROR('#1: The Date.prototype.getUTCDate.length has the attribute ReadOnly');\n}\n\n", + "id": "S15.9.5.15_A3_T1" + }, + { + "section": "15.9.5.15", + "description": "Checking DontDelete attribute", + "test": "if (delete Date.prototype.getUTCDate.length !== false) {\n $ERROR('#1: The Date.prototype.getUTCDate.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.getUTCDate.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.getUTCDate.length property has the attributes DontDelete');\n}\n\n", + "id": "S15.9.5.15_A3_T2" + }, + { + "section": "15.9.5.15", + "description": "Checking DontEnum attribute", + "test": "if (Date.prototype.getUTCDate.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.getUTCDate.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.getUTCDate) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.getUTCDate.length has the attribute DontEnum');\n }\n}\n\n", + "id": "S15.9.5.15_A3_T3" + } + ] + } +} |