diff options
Diffstat (limited to 'website/resources/scripts/testcases2/15.4.4.10.json')
-rw-r--r-- | website/resources/scripts/testcases2/15.4.4.10.json | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/website/resources/scripts/testcases2/15.4.4.10.json b/website/resources/scripts/testcases2/15.4.4.10.json new file mode 100644 index 000000000..0f1a68419 --- /dev/null +++ b/website/resources/scripts/testcases2/15.4.4.10.json @@ -0,0 +1,15 @@ +{ + "testCollection": { + "name": "15.4.4.10", + "numTests": 1, + "tests": [ + { + "id": "15.4.4.10-10-c-ii-1", + "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.10/15.4.4.10-10-c-ii-1.js", + "description": "Array.prototype.slice will slice a string from start to end when index property (read-only) exists in Array.prototype (Step 10.c.ii)", + "test": "assertTrue((function testcase() {\n var arrObj = [1, 2, 3];\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n value: \"test\",\n writable: false,\n configurable: true\n });\n\n var newArr = arrObj.slice(0, 1);\n return newArr.hasOwnProperty(\"0\") && newArr[0] === 1 && typeof newArr[1] === \"undefined\";\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n", + "precondition": "(fnExists(Object.defineProperty))" + } + ] + } +} |