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