aboutsummaryrefslogtreecommitdiffstats
path: root/website/resources/scripts/testcases2/15.4.5.1.json
diff options
context:
space:
mode:
Diffstat (limited to 'website/resources/scripts/testcases2/15.4.5.1.json')
-rw-r--r--website/resources/scripts/testcases2/15.4.5.1.json38
1 files changed, 38 insertions, 0 deletions
diff --git a/website/resources/scripts/testcases2/15.4.5.1.json b/website/resources/scripts/testcases2/15.4.5.1.json
new file mode 100644
index 000000000..55d490a34
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.5.1.json
@@ -0,0 +1,38 @@
+{
+ "testCollection": {
+ "name": "15.4.5.1",
+ "numTests": 5,
+ "tests": [
+ {
+ "id": "15.4.5.1-3.d-1",
+ "path": "TestCases/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-1.js",
+ "description": "Throw RangeError if attempt to set array length property to 4294967296 (2**32)",
+ "test": "assertTrue((function testcase() {\n try {\n [].length = 4294967296 ;\n } catch (e) {\n\tif (e instanceof RangeError) return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.4.5.1-3.d-2",
+ "path": "TestCases/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-2.js",
+ "description": "Throw RangeError if attempt to set array length property to 4294967297 (1+2**32)",
+ "test": "assertTrue((function testcase() {\n try {\n [].length = 4294967297 ;\n } catch (e) {\n\tif (e instanceof RangeError) return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.4.5.1-3.d-3",
+ "path": "TestCases/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-3.js",
+ "description": "Set array length property to max value 4294967295 (2**32-1,)",
+ "test": "assertTrue((function testcase() { \n var a =[];\n a.length = 4294967295 ;\n return a.length===4294967295 ;\n }).call(this));\n"
+ },
+ {
+ "id": "15.4.5.1-5-1",
+ "path": "TestCases/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-5-1.js",
+ "description": "Defining a property named 4294967295 (2**32-1)(not an array element)",
+ "test": "assertTrue((function testcase() { \n var a =[];\n a[4294967295] = \"not an array element\" ;\n return a[4294967295] === \"not an array element\";\n }).call(this));\n"
+ },
+ {
+ "id": "15.4.5.1-5-2",
+ "path": "TestCases/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-5-2.js",
+ "description": "Defining a property named 4294967295 (2**32-1) doesn't change length of the array",
+ "test": "assertTrue((function testcase() { \n var a =[0,1,2];\n a[4294967295] = \"not an array element\" ;\n return a.length===3;\n }).call(this));\n"
+ }
+ ]
+ }
+}