aboutsummaryrefslogtreecommitdiffstats
path: root/website/resources/scripts/testcases2/15.4.4.19.json
diff options
context:
space:
mode:
Diffstat (limited to 'website/resources/scripts/testcases2/15.4.4.19.json')
-rw-r--r--website/resources/scripts/testcases2/15.4.4.19.json1359
1 files changed, 1359 insertions, 0 deletions
diff --git a/website/resources/scripts/testcases2/15.4.4.19.json b/website/resources/scripts/testcases2/15.4.4.19.json
new file mode 100644
index 000000000..cea3726a5
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.4.19.json
@@ -0,0 +1,1359 @@
+{
+ "testCollection": {
+ "name": "15.4.4.19",
+ "numTests": 193,
+ "tests": [
+ {
+ "id": "15.4.4.19-0-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-0-1.js",
+ "description": "Array.prototype.map must exist as a function",
+ "test": "assertTrue((function testcase() {\n var f = Array.prototype.map;\n if (typeof(f) === \"function\") {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.4.4.19-0-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-0-2.js",
+ "description": "Array.prototype.map.length must be 1",
+ "test": "assertTrue((Array.prototype.map.length === 1));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-1-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-1.js",
+ "description": "Array.prototype.map - applied to undefined",
+ "test": "assertTrue((function testcase() {\n try {\n Array.prototype.map.call(undefined); // TypeError is thrown if value is undefined\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-1-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-10.js",
+ "description": "Array.prototype.map - applied to the Math object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return ('[object Math]' === Object.prototype.toString.call(obj));\n }\n \n try {\n Math.length = 1;\n Math[0] = 1;\n var testResult = Array.prototype.map.call(Math, callbackfn);\n return testResult[0] === true;\n } finally {\n delete Math[0];\n delete Math.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-1-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-11.js",
+ "description": "Array.prototype.map - applied to Date object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return obj instanceof Date;\n }\n\n var obj = new Date();\n obj.length = 1;\n obj[0] = 1;\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-1-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-12.js",
+ "description": "Array.prototype.map - applied to RegExp object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return obj instanceof RegExp;\n }\n\n var obj = new RegExp();\n obj.length = 1;\n obj[0] = 1;\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-1-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-13.js",
+ "description": "Array.prototype.map - applied to the JSON object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return ('[object JSON]' === Object.prototype.toString.call(obj));\n }\n\n try {\n JSON.length = 1;\n JSON[0] = 1;\n var testResult = Array.prototype.map.call(JSON, callbackfn);\n return testResult[0] === true;\n } finally {\n delete JSON.length;\n delete JSON[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-1-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-14.js",
+ "description": "Array.prototype.map - applied to Error object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return obj instanceof Error;\n }\n\n var obj = new Error();\n obj.length = 1;\n obj[0] = 1;\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-1-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-15.js",
+ "description": "Array.prototype.map - applied to the Arguments object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return ('[object Arguments]' === Object.prototype.toString.call(obj));\n }\n\n var obj = (function () {\n return arguments;\n }(\"a\", \"b\"));\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult[1] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-1-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-2.js",
+ "description": "Array.prototype.map - applied to null",
+ "test": "assertTrue((function testcase() {\n try {\n Array.prototype.map.call(null); // TypeError is thrown if value is null\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-1-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-3.js",
+ "description": "Array.prototype.map - applied to boolean primitive",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return obj instanceof Boolean;\n }\n\n try {\n Boolean.prototype[0] = true;\n Boolean.prototype.length = 1;\n\n var testResult = Array.prototype.map.call(false, callbackfn);\n return testResult[0] === true;\n } finally {\n delete Boolean.prototype[0];\n delete Boolean.prototype.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-1-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-4.js",
+ "description": "Array.prototype.map - applied to Boolean object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return obj instanceof Boolean;\n }\n\n var obj = new Boolean(true);\n obj.length = 2;\n obj[0] = 11;\n obj[1] = 12;\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult[0] === true && testResult[1] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-1-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-5.js",
+ "description": "Array.prototype.map - applied to number primitive",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return obj instanceof Number;\n }\n\n try {\n Number.prototype[0] = 1;\n Number.prototype.length = 1;\n\n var testResult = Array.prototype.map.call(2.5, callbackfn);\n return testResult[0] === true;\n } finally {\n delete Number.prototype[0];\n delete Number.prototype.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-1-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-6.js",
+ "description": "Array.prototype.map - applied to Number object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return obj instanceof Number;\n }\n\n var obj = new Number(-128);\n obj.length = 2;\n obj[0] = 11;\n obj[1] = 12;\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult[0] === true && testResult[1] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-1-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-7.js",
+ "description": "Array.prototype.map - applied to string primitive",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return obj instanceof String;\n }\n\n var testResult = Array.prototype.map.call(\"abc\", callbackfn);\n\n return testResult[0] === true && testResult[1] === true && testResult[2] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-1-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-8.js",
+ "description": "Array.prototype.map - applied to String object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return obj instanceof String;\n }\n\n var obj = new String(\"abc\");\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult[0] === true && testResult[1] === true && testResult[2] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-1-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-9.js",
+ "description": "Array.prototype.map - applied to Function object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return obj instanceof Function;\n }\n\n var obj = function (a, b) {\n return a + b;\n };\n obj[0] = 11;\n obj[1] = 9;\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult[0] === true && testResult[1] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-2-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-1.js",
+ "description": "Array.prototype.map - applied to Array-like object when 'length' is an own data property",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = {\n 0: 12,\n 1: 11,\n 2: 9,\n length: 2\n };\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-2-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-10.js",
+ "description": "Array.prototype.map - applied to Array-like object, 'length' is an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n var testResult = Array.prototype.map.call(child, callbackfn);\n\n return testResult.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.19-2-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-11.js",
+ "description": "Array.prototype.map - applied to Array-like object when 'length' is an own accessor property without a get function",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = {\n 0: 11,\n 1: 12\n };\n Object.defineProperty(obj, \"length\", {\n set: function () { },\n configurable: true\n });\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return 0 === testResult.length;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.19-2-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-12.js",
+ "description": "Array.prototype.map - applied to the Array-like object when 'length' is own accessor property without a get function that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n try {\n Object.defineProperty(Object.prototype, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n var obj = { 0: 12, 1: 11 };\n Object.defineProperty(obj, \"length\", {\n set: function () { },\n configurable: true\n });\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n return testResult.length === 0;\n } finally {\n delete Object.prototype.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.19-2-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-13.js",
+ "description": "Array.prototype.map - applied to the Array-like object when 'length' is inherited accessor property without a get function",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var proto = {};\n Object.defineProperty(proto, \"length\", {\n set: function () { },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[0] = 11;\n child[1] = 12;\n\n var testResult = Array.prototype.map.call(child, callbackfn);\n\n return 0 === testResult.length;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.19-2-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-14.js",
+ "description": "Array.prototype.map - applied to the Array-like object that 'length' property doesn't exist",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = { 0: 11, 1: 12 };\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return 0 === testResult.length;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-2-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-15.js",
+ "description": "Array.prototype.map - when 'length' is property of the global object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n try {\n var oldLen = fnGlobalObject().length;\n fnGlobalObject()[0] = 12;\n fnGlobalObject()[1] = 11;\n fnGlobalObject()[2] = 9;\n fnGlobalObject().length = 2;\n var testResult = Array.prototype.map.call(fnGlobalObject(), callbackfn);\n return testResult.length === 2;\n } finally {\n delete fnGlobalObject()[0];\n delete fnGlobalObject()[1];\n delete fnGlobalObject()[2];\n fnGlobalObject().length = oldLen;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-2-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-17.js",
+ "description": "Array.prototype.map - applied to Arguments object, which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var func = function (a, b) {\n return Array.prototype.map.call(arguments, callbackfn);\n };\n\n var testResult = func(12, 11);\n\n return testResult.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-2-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-18.js",
+ "description": "Array.prototype.map - applied to String object, which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return parseInt(val, 10) > 1;\n }\n\n var str = new String(\"432\");\n try {\n String.prototype[3] = \"1\";\n var testResult = Array.prototype.map.call(str, callbackfn);\n\n return 3 === testResult.length;\n } finally {\n delete String.prototype[3];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-2-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-19.js",
+ "description": "Array.prototype.map - applied to Function object, which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var fun = function (a, b) {\n return a + b;\n };\n fun[0] = 12;\n fun[1] = 11;\n fun[2] = 9;\n\n var testResult = Array.prototype.map.call(fun, callbackfn);\n\n return 2 === testResult.length;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-2-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-2.js",
+ "description": "Array.prototype.map - when 'length' is own data property on an Array",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var testResult = [12, 11].map(callbackfn);\n return testResult.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-2-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-3.js",
+ "description": "Array.prototype.map - applied to Array-like object, 'length' is an own data property that overrides an inherited data property",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var proto = { length: 3 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 2;\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n var testResult = Array.prototype.map.call(child, callbackfn);\n\n return testResult.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-2-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-4.js",
+ "description": "Array.prototype.map - when 'length' is own data property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n var arrProtoLen;\n try {\n arrProtoLen = Array.prototype.length;\n Array.prototype.length = 0;\n var testResult = [12, 11].map(callbackfn);\n return testResult.length === 2;\n } finally {\n Array.prototype.length = arrProtoLen;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-2-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-5.js",
+ "description": "Array.prototype.map - applied to Array-like object, 'length' is an own data property that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"length\", {\n get: function () {\n return 3;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 2;\n Object.defineProperty(child, \"length\", {\n value: 2,\n configurable: true\n });\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n var testResult = Array.prototype.map.call(child, callbackfn);\n\n return testResult.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.19-2-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-6.js",
+ "description": "Array.prototype.map - applied to Array-like object, 'length' is an inherited data property",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var proto = { length: 2 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n var testResult = Array.prototype.map.call(child, callbackfn);\n\n return testResult.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-2-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-7.js",
+ "description": "Array.prototype.map - applied to Array-like object, 'length' is an own accessor property",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = {};\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n obj[0] = 12;\n obj[1] = 11;\n obj[2] = 9;\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.19-2-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-8.js",
+ "description": "Array.prototype.map - applied to Array-like object, 'length' is an own accessor property that overrides an inherited data property",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var proto = { length: 3 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n Object.defineProperty(child, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n var testResult = Array.prototype.map.call(child, callbackfn);\n\n return testResult.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.19-2-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-9.js",
+ "description": "Array.prototype.map - applied to Array-like object when 'length' is an own accessor property that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"length\", {\n get: function () {\n return 3;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n Object.defineProperty(child, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n var testResult = Array.prototype.map.call(child, callbackfn);\n\n return testResult.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.19-3-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-1.js",
+ "description": "Array.prototype.map - value of 'length' is undefined",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = { length: undefined };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-10.js",
+ "description": "Array.prototype.map - value of 'length' is a number (value is NaN)",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var obj = { 0: 9, length: NaN };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-11.js",
+ "description": "Array.prototype.map - 'length' is a string containing a positive number",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var obj = { 0: 11, 1: 9, 2: 12, length: \"2\" };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-12.js",
+ "description": "Array.prototype.map - 'length' is a string containing a negative number",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var obj = { 0: 11, 1: 9, 2: 12, length: \"-4294967294\" };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-13.js",
+ "description": "Array.prototype.map - value of 'length' is string that is able to convert to number primitive (value is a decimal number)",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var obj = { 0: 11, 1: 9, 2: 12, length: \"2.5\" };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-14.js",
+ "description": "Array.prototype.map - 'length' is a string containing Infinity",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var obj = { 0: 9, length: \"Infinity\" };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-15.js",
+ "description": "Array.prototype.map - 'length' is a string containing an exponential number",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var obj = { 0: 11, 1: 9, 2: 12, length: \"2E0\" };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-16.js",
+ "description": "Array.prototype.map - 'length' is a string containing a hex number",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var obj = { 0: 11, 1: 9, 2: 12, length: \"0x0002\" };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-17.js",
+ "description": "Array.prototype.map - when 'length' is a string containing a number with leading zeros",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var obj = { 0: 11, 1: 9, 2: 12, length: \"0002.00\" };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-18.js",
+ "description": "Array.prototype.map - value of 'length' is a string that can't convert to a number",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = { length: \"asdf!_\" };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-19.js",
+ "description": "Array.prototype.map - value of 'length' is an Object which has an own toString method",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var obj = {\n 0: 11,\n 1: 9,\n\n length: {\n toString: function () {\n return '2';\n }\n }\n };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-2.js",
+ "description": "Array.prototype.map on an Array-like object if 'length' is 1 (length overridden to true(type conversion))",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = { 0: 11, length: true };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-20.js",
+ "description": "Array.prototype.map - value of 'length' is an Object which has an own valueOf method",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var obj = {\n 0: 11,\n 1: 9,\n\n length: {\n valueOf: function () {\n return 2;\n }\n }\n };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-21.js",
+ "description": "Array.prototype.map - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var firstStepOccured = false;\n var secondStepOccured = false;\n var obj = {\n 0: 11,\n 1: 9,\n\n length: {\n valueOf: function () {\n firstStepOccured = true;\n return {};\n },\n toString: function () {\n secondStepOccured = true;\n return '2';\n }\n }\n };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 2 && firstStepOccured && secondStepOccured;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-22.js",
+ "description": "Array.prototype.map throws TypeError exception when 'length' is an object with toString and valueOf methods that don�t return primitive values",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = {\n 1: 11,\n 2: 12,\n\n length: {\n valueOf: function () {\n return {};\n },\n toString: function () {\n return {};\n }\n }\n };\n\n try {\n Array.prototype.map.call(obj, callbackfn);\n return false;\n } catch (ex) {\n return ex instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-23.js",
+ "description": "Array.prototype.map uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var valueOfAccessed = false;\n var toStringAccessed = false;\n\n var proto = {\n valueOf: function () {\n valueOfAccessed = true;\n return 2;\n }\n };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n child.toString = function () {\n toStringAccessed = true;\n return '1';\n };\n\n var obj = {\n 0: 11,\n 1: 9,\n length: child\n };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 2 && valueOfAccessed && !toStringAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-24",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-24.js",
+ "description": "Array.prototype.map - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var obj = {\n 0: 11,\n 1: 9,\n length: 2.685\n };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-25.js",
+ "description": "Array.prototype.map - value of 'length' is a negative non-integer, ensure truncation occurs in the proper direction",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var obj = {\n 0: 11,\n 1: 9,\n length: -4294967294.5\n };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-28.js",
+ "description": "Array.prototype.map - value of 'length' is boundary value (2^32)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = {\n 0: 12,\n length: 4294967296\n };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-29.js",
+ "description": "Array.prototype.map - value of 'length' is boundary value (2^32 + 1)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = {\n 0: 11,\n 1: 9,\n length: 4294967297\n };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n return newArr.length === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-3.js",
+ "description": "Array.prototype.map - value of 'length' is a number (value is 0)",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = { 0: 11, length: 0 };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-4.js",
+ "description": "Array.prototype.map - value of 'length' is a number (value is +0)",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = { 0: 11, length: +0 };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-5.js",
+ "description": "Array.prototype.map - value of 'length' is a number (value is -0)",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = { 0: 11, length: -0 };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-6.js",
+ "description": "Array.prototype.map - 'length' is a string containing a positive number",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = { 0: 10, 1: 12, 2: 9, length: 2 };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-7.js",
+ "description": "Array.prototype.map - 'length' is a string containing a negative number",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = { 0: 10, 1: 12, 2: 9, length: -4294967294 };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-8.js",
+ "description": "Array.prototype.map - value of 'length' is a number (value is Infinity)",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var obj = { 0: 9, length: Infinity };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-9.js",
+ "description": "Array.prototype.map - value of 'length' is a number (value is -Infinity)",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var obj = { 0: 9, length: -Infinity };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-4-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-1.js",
+ "description": "Array.prototype.map throws TypeError if callbackfn is undefined",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.map(); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-4-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-10.js",
+ "description": "Array.prototype.map - the exception is not thrown if exception was thrown by step 2",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n throw new SyntaxError();\n },\n configurable: true\n });\n\n try {\n Array.prototype.map.call(obj, undefined);\n return false;\n } catch (ex) {\n return !(ex instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.19-4-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-11.js",
+ "description": "Array.prototype.map - the exception is not thrown if exception was thrown by step 3",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return {\n toString: function () {\n throw new SyntaxError();\n }\n };\n },\n configurable: true\n });\n\n try {\n Array.prototype.map.call(obj, undefined);\n return false;\n } catch (ex) {\n return !(ex instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.19-4-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-12.js",
+ "description": "Array.prototype.map - 'callbackfn' is a function",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var testResult = [11, 9].map(callbackfn);\n return testResult.length === 2 && testResult[0] === true && testResult[1] === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-4-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-15.js",
+ "description": "Array.prototype.map - calling with no callbackfn is the same as passing undefined for callbackfn",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 10: 10 };\n var lengthAccessed = false;\n var loopAccessed = false;\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n lengthAccessed = true;\n return 20;\n },\n configurable: true\n });\n Object.defineProperty(obj, \"0\", {\n get: function () {\n loopAccessed = true;\n return 10;\n },\n configurable: true\n });\n\n try {\n Array.prototype.map.call(obj);\n return false;\n } catch (e) {\n return e instanceof TypeError && lengthAccessed && !loopAccessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-4-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-2.js",
+ "description": "Array.prototype.map throws ReferenceError if callbackfn is unreferenced",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.map(foo); \n }\n catch(e) {\n if(e instanceof ReferenceError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-4-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-3.js",
+ "description": "Array.prototype.map throws TypeError if callbackfn is null",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.map(null); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-4-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-4.js",
+ "description": "Array.prototype.map throws TypeError if callbackfn is boolean",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.map(true); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-4-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-5.js",
+ "description": "Array.prototype.map throws TypeError if callbackfn is number",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.map(5); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-4-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-6.js",
+ "description": "Array.prototype.map throws TypeError if callbackfn is string",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.map(\"abc\"); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-4-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-7.js",
+ "description": "Array.prototype.map throws TypeError if callbackfn is Object without Call internal method",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.map(new Object()); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-4-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-8.js",
+ "description": "Array.prototype.map - Side effects produced by step 2 are visible when an exception occurs",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n var accessed = false;\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n accessed = true;\n return 2;\n },\n configurable: true\n });\n\n try {\n Array.prototype.map.call(obj, null);\n return false;\n } catch (ex) {\n return ex instanceof TypeError && accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.19-4-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-9.js",
+ "description": "Array.prototype.map - Side effects produced by step 3 are visible when an exception occurs",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n var accessed = false;\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return {\n toString: function () {\n accessed = true;\n return \"2\";\n }\n };\n },\n configurable: true\n });\n\n try {\n Array.prototype.map.call(obj, null);\n return false;\n } catch (ex) {\n return ex instanceof TypeError && accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.19-5-1-s",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19-5-1-s.js",
+ "description": "Array.prototype.map - thisArg not passed to strict callbackfn",
+ "test": "assertTrue((function testcase() {\n var innerThisCorrect = false;\n \n function callbackfn(val, idx, obj) {\n \"use strict\";\n innerThisCorrect = this===undefined;\n return true;\n }\n\n [1].map(callbackfn);\n return innerThisCorrect; \n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Array.prototype.map))",
+ "strict_only": ""
+ },
+ {
+ "id": "15.4.4.19-5-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-1.js",
+ "description": "Array.prototype.map - thisArg not passed",
+ "test": "assertTrue((function testcase() {\n try {\n fnGlobalObject()._15_4_4_19_5_1 = true;\n var _15_4_4_19_5_1 = false;\n \n function callbackfn(val, idx, obj) {\n return this._15_4_4_19_5_1;\n }\n var srcArr = [1];\n var resArr = srcArr.map(callbackfn);\n if( resArr[0] === true)\n return true; \n\t\n\treturn false;\n }\n finally {\n\tdelete fnGlobalObject()._15_4_4_19_5_1;\n } \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-10.js",
+ "description": "Array.prototype.map - Array object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var objArray = new Array(2);\n\n function callbackfn(val, idx, obj) {\n return this === objArray;\n }\n\n var testResult = [11].map(callbackfn, objArray);\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-11.js",
+ "description": "Array.prototype.map - String object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var objString = new String();\n\n function callbackfn(val, idx, obj) {\n return this === objString;\n }\n\n var testResult = [11].map(callbackfn, objString);\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-12.js",
+ "description": "Array.prototype.map - Boolean object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var objBoolean = new Boolean();\n\n function callbackfn(val, idx, obj) {\n return this === objBoolean;\n }\n\n var testResult = [11].map(callbackfn, objBoolean);\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-13.js",
+ "description": "Array.prototype.map - Number object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var objNumber = new Number();\n\n function callbackfn(val, idx, obj) {\n return this === objNumber;\n }\n\n var testResult = [11].map(callbackfn, objNumber);\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-14.js",
+ "description": "Array.prototype.map - the Math object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this === Math;\n }\n\n var testResult = [11].map(callbackfn, Math);\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-15.js",
+ "description": "Array.prototype.map - Date object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var objDate = new Date();\n\n function callbackfn(val, idx, obj) {\n return this === objDate;\n }\n\n var testResult = [11].map(callbackfn, objDate);\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-16.js",
+ "description": "Array.prototype.map - RegExp object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var objRegExp = new RegExp();\n\n function callbackfn(val, idx, obj) {\n return this === objRegExp;\n }\n\n var testResult = [11].map(callbackfn, objRegExp);\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-17.js",
+ "description": "Array.prototype.map - the JSON object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this === JSON;\n }\n\n var testResult = [11].map(callbackfn, JSON);\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-18.js",
+ "description": "Array.prototype.map - Error object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var objError = new RangeError();\n\n function callbackfn(val, idx, obj) {\n return this === objError;\n }\n\n var testResult = [11].map(callbackfn, objError);\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-19.js",
+ "description": "Array.prototype.map - the Arguments object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var arg;\n\n function callbackfn(val, idx, obj) {\n return this === arg;\n }\n\n arg = (function () {\n return arguments;\n }(1, 2, 3));\n\n var testResult = [11].map(callbackfn, arg);\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-2.js",
+ "description": "Array.prototype.map - thisArg is Object",
+ "test": "assertTrue((function testcase() {\n var res = false;\n var o = new Object();\n o.res = true;\n function callbackfn(val, idx, obj)\n {\n return this.res;\n }\n\n var srcArr = [1];\n var resArr = srcArr.map(callbackfn,o);\n if( resArr[0] === true)\n return true; \n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-21.js",
+ "description": "Array.prototype.map - the global object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this === fnGlobalObject();\n }\n\n var testResult = [11].map(callbackfn, fnGlobalObject());\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-22.js",
+ "description": "Array.prototype.map - boolean primitive can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this.valueOf() === false;\n }\n\n var testResult = [11].map(callbackfn, false);\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-23.js",
+ "description": "Array.prototype.map - number primitive can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this.valueOf() === 101;\n }\n\n var testResult = [11].map(callbackfn, 101);\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-24",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-24.js",
+ "description": "Array.prototype.map - string primitive can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this.valueOf() === \"abc\";\n }\n\n var testResult = [11].map(callbackfn, \"abc\");\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-3.js",
+ "description": "Array.prototype.map - thisArg is Array",
+ "test": "assertTrue((function testcase() {\n var res = false;\n var a = new Array();\n a.res = true;\n function callbackfn(val, idx, obj)\n {\n return this.res;\n }\n\n var srcArr = [1];\n var resArr = srcArr.map(callbackfn,a);\n if( resArr[0] === true)\n return true; \n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-4.js",
+ "description": "Array.prototype.map - thisArg is object from object template(prototype)",
+ "test": "assertTrue((function testcase() {\n var res = false;\n function callbackfn(val, idx, obj)\n {\n return this.res;\n }\n \n function foo(){}\n foo.prototype.res = true;\n var f = new foo();\n \n var srcArr = [1];\n var resArr = srcArr.map(callbackfn,f);\n if( resArr[0] === true)\n return true; \n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-5.js",
+ "description": "Array.prototype.map - thisArg is object from object template",
+ "test": "assertTrue((function testcase() {\n var res = false;\n function callbackfn(val, idx, obj)\n {\n return this.res;\n }\n\n function foo(){}\n var f = new foo();\n f.res = true;\n \n var srcArr = [1];\n var resArr = srcArr.map(callbackfn,f);\n if( resArr[0] === true)\n return true; \n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-6.js",
+ "description": "Array.prototype.map - thisArg is function",
+ "test": "assertTrue((function testcase() {\n var res = false;\n function callbackfn(val, idx, obj)\n {\n return this.res;\n }\n\n function foo(){}\n foo.res = true;\n \n var srcArr = [1];\n var resArr = srcArr.map(callbackfn,foo);\n if( resArr[0] === true)\n return true; \n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-7.js",
+ "description": "Array.prototype.map - built-in functions can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this === eval;\n }\n\n var testResult = [11].map(callbackfn, eval);\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-9.js",
+ "description": "Array.prototype.map - Function object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var objFunction = function () { };\n\n function callbackfn(val, idx, obj) {\n return this === objFunction;\n }\n\n var testResult = [11].map(callbackfn, objFunction);\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-6-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-6-1.js",
+ "description": "Array.prototype.map - Array.isArray returns true when input argument is the ourput array",
+ "test": "assertTrue((function testcase() {\n\n var newArr = [11].map(function () { });\n\n return Array.isArray(newArr);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Array.isArray))"
+ },
+ {
+ "id": "15.4.4.19-6-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-6-2.js",
+ "description": "Array.prototype.map - the returned array is instanceof Array",
+ "test": "assertTrue((function testcase() {\n\n var newArr = [11].map(function () { });\n\n return newArr instanceof Array;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-1.js",
+ "description": "Array.prototype.map doesn't consider new elements added to array after it is called",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(val, idx, obj)\n {\n srcArr[2] = 3;\n srcArr[5] = 6;\n return 1;\n }\n\n var srcArr = [1,2,,4,5];\n var resArr = srcArr.map(callbackfn);\n if(resArr.length === 5)\n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-2.js",
+ "description": "Array.prototype.map considers new value of elements in array after it is called",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(val, idx, obj)\n { \n srcArr[4] = -1;\n if(val > 0)\n return 1;\n else\n return 0;\n }\n\n var srcArr = [1,2,3,4,5];\n var resArr = srcArr.map(callbackfn);\n if(resArr.length === 5 && resArr[4] === 0)\n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-3.js",
+ "description": "Array.prototype.map doesn't visit deleted elements in array after the call",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(val, idx, obj)\n {\n delete srcArr[4];\n if(val > 0)\n return 1;\n else\n return 0;\n\n }\n\n var srcArr = [1,2,3,4,5];\n var resArr = srcArr.map(callbackfn);\n if(resArr.length === 5 && resArr[4] === undefined)\n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-4.js",
+ "description": "Array.prototype.map doesn't visit deleted elements when Array.length is decreased",
+ "test": "assertTrue((function testcase() { \n \n var callCnt = 0;\n function callbackfn(val, idx, obj)\n {\n srcArr.length = 2;\n callCnt++;\n return 1;\n }\n\n var srcArr = [1,2,3,4,5];\n var resArr = srcArr.map(callbackfn);\n if(resArr.length === 5 && callCnt === 2 && resArr[2] === undefined)\n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-5.js",
+ "description": "Array.prototype.map doesn't consider newly added elements in sparse array",
+ "test": "assertTrue((function testcase() { \n \n var callCnt = 0;\n function callbackfn(val, idx, obj)\n {\n srcArr[1000] = 3;\n callCnt++;\n return val;\n }\n\n var srcArr = new Array(10);\n srcArr[1] = 1;\n srcArr[2] = 2;\n var resArr = srcArr.map(callbackfn);\n if( resArr.length === 10 && callCnt === 2) \n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-6.js",
+ "description": "Array.prototype.map visits deleted element in array after the call when same index is also present in prototype",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(val, idx, obj)\n {\n delete srcArr[4];\n if(val > 0)\n return 1;\n else\n return 0;\n\n }\n\n Array.prototype[4] = 5;\n var srcArr = [1,2,3,4,5];\n var resArr = srcArr.map(callbackfn);\n delete Array.prototype[4];\n if(resArr.length === 5 && resArr[4] === 1)\n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-7.js",
+ "description": "Array.prototype.map successful to delete the object in callbackfn",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n obj.srcArr = [1, 2, 3, 4, 5];\n\n function callbackfn(val, idx, obj) {\n delete obj.srcArr;\n if (val > 0)\n return 1;\n else\n return 0;\n }\n\n var resArr = obj.srcArr.map(callbackfn);\n return resArr.toString() === \"1,1,1,1,1\" && !obj.hasOwnProperty(\"arr\");\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-8.js",
+ "description": "Array.prototype.map - no observable effects occur if length is 0 on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var obj = { 0: 11, 1: 12, length: 0 };\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult.length === 0 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-9.js",
+ "description": "Array.prototype.map - modifications to length don't change number of iterations on an Array",
+ "test": "assertTrue((function testcase() {\n var called = 0;\n function callbackfn(val, idx, obj) {\n called += 1;\n return val > 10;\n }\n\n var arr = [9, , 12];\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n arr.length = 2;\n return 8;\n },\n configurable: true\n });\n\n var testResult = arr.map(callbackfn);\n\n return testResult.length === 3 && called === 2 && typeof testResult[2] === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-b-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-1.js",
+ "description": "Array.prototype.map - callbackfn not called for indexes never been assigned values",
+ "test": "assertTrue((function testcase() { \n \n var callCnt = 0;\n function callbackfn(val, idx, obj)\n {\n callCnt++;\n return 1;\n }\n\n var srcArr = new Array(10);\n srcArr[1] = undefined; //explicitly assigning a value\n var resArr = srcArr.map(callbackfn);\n if( resArr.length === 10 && callCnt === 1)\n return true; \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-b-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-10.js",
+ "description": "Array.prototype.map - deleting property of prototype causes prototype index property not to be visited on an Array-like Object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return idx === 1 && typeof val === \"undefined\";\n }\n var obj = { 2: 2, length: 20 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n delete Object.prototype[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Object.prototype[1] = 1;\n var testResult = Array.prototype.map.call(obj, callbackfn);\n return testResult.length === 20 && typeof testResult[1] === \"undefined\";\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-8-b-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-11.js",
+ "description": "Array.prototype.map - deleting property of prototype causes prototype index property not to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return idx === 1 && typeof val === \"undefined\";\n }\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete Array.prototype[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Array.prototype[1] = 1;\n var testResult = arr.map(callbackfn);\n return testResult.length === 3 && typeof testResult[1] === \"undefined\";\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-b-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-12.js",
+ "description": "Array.prototype.map - deleting own property with prototype property causes prototype index property to be visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 1 && val === 3) {\n return false;\n } else {\n return true;\n }\n }\n var obj = { 0: 0, 1: 1, 2: 2, length: 10 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n delete obj[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Object.prototype[1] = 3;\n var testResult = Array.prototype.map.call(obj, callbackfn);\n return testResult[1] === false; \n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-8-b-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-13.js",
+ "description": "Array.prototype.map - deleting own property with prototype property causes prototype index property to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 1 && val === 3) {\n return false;\n } else {\n return true;\n }\n }\n var arr = [0, 1, 2];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete arr[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Array.prototype[1] = 3;\n var testResult = arr.map(callbackfn);\n return testResult[1] === false;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-b-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-14.js",
+ "description": "Array.prototype.map - decreasing length of array causes index property not to be visited",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return idx === 3 && typeof val === \"undefined\";\n }\n\n var arr = [0, 1, 2, \"last\"];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n arr.length = 3;\n return 0;\n },\n configurable: true\n });\n\n var testResult = arr.map(callbackfn);\n return typeof testResult[3] === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-b-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-15.js",
+ "description": "Array.prototype.map - decreasing length of array with prototype property causes prototype index property to be visited",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 2 && val === \"prototype\") {\n return false;\n } else {\n return true;\n }\n }\n var arr = [0, 1, 2];\n\n try {\n Object.defineProperty(Array.prototype, \"2\", {\n get: function () {\n return \"prototype\";\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n arr.length = 2;\n return 1;\n },\n configurable: true\n });\n\n var testResult = arr.map(callbackfn);\n return testResult.length === 3 && testResult[2] === false;\n } finally {\n delete Array.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-b-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-16.js",
+ "description": "Array.prototype.map - decreasing length of array does not delete non-configurable properties",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 2 && val === \"unconfigurable\") {\n return false;\n } else {\n return true;\n }\n }\n\n var arr = [0, 1, 2];\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n return \"unconfigurable\";\n },\n configurable: false\n });\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n arr.length = 2;\n return 1;\n },\n configurable: true\n });\n\n var testResult = arr.map(callbackfn);\n return testResult.length === 3 && testResult[2] === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-b-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-2.js",
+ "description": "Array.prototype.map - added properties in step 2 are visible here",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 2 && val === \"length\") {\n return false;\n } else {\n return true;\n }\n }\n\n var obj = {};\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n obj[2] = \"length\";\n return 3;\n },\n configurable: true\n });\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n return testResult[2] === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.19-8-b-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-3.js",
+ "description": "Array.prototype.map - deleted properties in step 2 are visible here",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 2) {\n return false;\n } else {\n return true;\n }\n }\n var obj = { 2: 6.99, 8: 19 };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n delete obj[2];\n return 10;\n },\n configurable: true\n });\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n return typeof testResult[2] === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.19-8-b-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-4.js",
+ "description": "Array.prototype.map - properties added into own object after current position are visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 1 && val === 1) {\n return false;\n } else {\n return true;\n }\n }\n\n var obj = { length: 2 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n Object.defineProperty(obj, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n return testResult[0] === true && testResult[1] === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-8-b-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-5.js",
+ "description": "Array.prototype.map - properties added into own object after current position are visited on an Array",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 1 && val === 1) {\n return false;\n } else {\n return true;\n }\n }\n\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n var testResult = arr.map(callbackfn);\n return testResult[0] === true && testResult[1] === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-b-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-6.js",
+ "description": "Array.prototype.map - properties can be added to prototype after current position are visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 1 && val === 6.99) {\n return false;\n } else {\n return true;\n }\n }\n var obj = { length: 2 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n Object.defineProperty(Object.prototype, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n try {\n var testResult = Array.prototype.map.call(obj, callbackfn);\n return testResult[0] === true && testResult[1] === false;\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-8-b-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-7.js",
+ "description": "Array.prototype.map - properties can be added to prototype after current position are visited on an Array",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 1 && val === 6.99) {\n return false;\n } else {\n return true;\n }\n }\n var arr = [0, , 2];\n\n try {\n Object.defineProperty(arr, \"0\", {\n get: function () {\n Object.defineProperty(Array.prototype, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n var testResult = arr.map(callbackfn);\n return testResult[0] === true && testResult[1] === false;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-b-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-8.js",
+ "description": "Array.prototype.map - deleting own property causes index property not to be visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n return false;\n } else {\n return true;\n }\n }\n var obj = { length: 2 };\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n delete obj[1];\n return 0;\n },\n configurable: true\n });\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n return testResult[0] === true && typeof testResult[1] === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-8-b-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-9.js",
+ "description": "Array.prototype.map - deleting own property causes index property not to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n return false;\n } else {\n return true;\n }\n }\n var arr = [1, 2];\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return \"6.99\";\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete arr[1];\n return 0;\n },\n configurable: true\n });\n\n var testResult = arr.map(callbackfn);\n return testResult[0] === true && typeof testResult[1] === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-1.js",
+ "description": "Array.prototype.map - element to be retrieved is own data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var kValue = {};\n\n function callbackfn(val, idx, obj) {\n if (idx === 5) {\n return val === kValue;\n }\n return false;\n }\n\n var obj = { 5: kValue, length: 100 };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr[5] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-10.js",
+ "description": "Array.prototype.map - element to be retrieved is own accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === kValue;\n }\n return false;\n }\n\n var arr = [];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n return kValue;\n },\n configurable: true\n });\n\n var testResult = arr.map(callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-11.js",
+ "description": "Array.prototype.map - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === kValue;\n }\n return false;\n }\n\n var proto = { 0: 5, length: 2 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n Object.defineProperty(child, \"0\", {\n get: function () {\n return kValue;\n },\n configurable: true\n });\n\n var testResult = Array.prototype.map.call(child, callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-12.js",
+ "description": "Array.prototype.map - element to be retrieved is own accessor property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === kValue;\n }\n return false;\n }\n\n var arr = [];\n\n try {\n Array.prototype[0] = 11;\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n return kValue;\n },\n configurable: true\n });\n\n var testResult = arr.map(callbackfn);\n\n return testResult[0] === true;\n } finally {\n delete Array.prototype[0];\n }\n\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-13.js",
+ "description": "Array.prototype.map - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === kValue;\n }\n return false;\n }\n\n var proto = { length: 2 };\n\n Object.defineProperty(proto, \"0\", {\n get: function () {\n return 5;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n Object.defineProperty(child, \"0\", {\n get: function () {\n return kValue;\n },\n configurable: true\n });\n\n var testResult = Array.prototype.map.call(child, callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-14.js",
+ "description": "Array.prototype.map - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === kValue;\n }\n return false;\n }\n\n var arr = [];\n\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return 11;\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n return kValue;\n },\n configurable: true\n });\n\n var testResult = arr.map(callbackfn);\n\n return testResult[0] === true;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-15.js",
+ "description": "Array.prototype.map - element to be retrieved is inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === kValue;\n }\n return false;\n }\n\n var proto = { length: 2 };\n\n Object.defineProperty(proto, \"0\", {\n get: function () {\n return kValue;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n var testResult = Array.prototype.map.call(child, callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-16.js",
+ "description": "Array.prototype.map - element to be retrieved is inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === kValue;\n }\n return false;\n }\n\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return kValue;\n },\n configurable: true\n });\n\n var testResult = [, ].map(callbackfn);\n\n return testResult[0] === true;\n } finally {\n delete Array.prototype[0];\n }\n\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-17.js",
+ "description": "Array.prototype.map - element to be retrieved is own accessor property without a get function on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n return typeof val === \"undefined\";\n }\n return false;\n }\n\n var obj = { length: 2 };\n\n Object.defineProperty(obj, \"1\", {\n set: function () { },\n configurable: true\n });\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult[1] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-18.js",
+ "description": "Array.prototype.map - element to be retrieved is own accessor property without a get function on an Array",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n return typeof val === \"undefined\";\n }\n return false;\n }\n\n var arr = [];\n\n Object.defineProperty(arr, \"1\", {\n set: function () { },\n configurable: true\n });\n\n var testResult = arr.map(callbackfn);\n\n return testResult[1] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-19.js",
+ "description": "Array.prototype.map - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return typeof val === \"undefined\";\n }\n return false;\n }\n\n var arr = [];\n\n try {\n Object.defineProperty(arr, \"0\", {\n set: function () { },\n configurable: true\n });\n\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return 100;\n },\n configurable: true\n });\n\n var testResult = arr.map(callbackfn);\n\n return testResult[0] === true;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-2.js",
+ "description": "Array.prototype.map - element to be retrieved is own data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var kValue = {};\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === kValue;\n }\n return false;\n }\n\n var arr = [kValue];\n\n var newArr = arr.map(callbackfn);\n\n return newArr[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-20.js",
+ "description": "Array.prototype.map - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return typeof val === \"undefined\";\n }\n return false;\n }\n\n var proto = {};\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 2;\n\n Object.defineProperty(child, \"0\", {\n set: function () { },\n configurable: true\n });\n\n Object.defineProperty(proto, \"0\", {\n get: function () {\n return 100;\n },\n configurable: true\n });\n\n var testResult = Array.prototype.map.call(child, callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-21.js",
+ "description": "Array.prototype.map - element to be retrieved is inherited accessor property without a get function on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return typeof val === \"undefined\";\n }\n return false;\n }\n\n var proto = { length: 2 };\n Object.defineProperty(proto, \"0\", {\n set: function () { },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n var testResult = Array.prototype.map.call(child, callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-22.js",
+ "description": "Array.prototype.map - element to be retrieved is inherited accessor property without a get function on an Array",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return typeof val === \"undefined\";\n }\n return false;\n }\n\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n set: function () { },\n configurable: true\n });\n\n var testResult = [,].map(callbackfn);\n\n return testResult[0] === true;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-23.js",
+ "description": "Array.prototype.map - This object is the global object which contains index property",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === kValue;\n }\n return false;\n }\n\n try {\n var oldLen = fnGlobalObject().length;\n fnGlobalObject()[0] = kValue;\n fnGlobalObject().length = 2;\n\n var testResult = Array.prototype.map.call(fnGlobalObject(), callbackfn);\n\n return testResult[0] === true;\n } finally {\n delete fnGlobalObject()[0];\n fnGlobalObject().length = oldLen;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-25.js",
+ "description": "Array.prototype.map - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === 9;\n } else {\n return false;\n }\n }\n\n var func = function (a, b) {\n return Array.prototype.map.call(arguments, callbackfn);\n };\n\n var testResult = func(9);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-26",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-26.js",
+ "description": "Array.prototype.map - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === 9;\n } else if (idx === 1) {\n return val === 11;\n } else {\n return false;\n }\n }\n\n var func = function (a, b) {\n return Array.prototype.map.call(arguments, callbackfn);\n };\n\n var testResult = func(9, 11);\n\n return testResult[0] === true && testResult[1] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-27",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-27.js",
+ "description": "Array.prototype.map - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === 9;\n } else if (idx === 1) {\n return val === 11;\n } else if (idx === 2) {\n return val === 12;\n } else {\n return false;\n }\n\n }\n\n var func = function (a, b) {\n return Array.prototype.map.call(arguments, callbackfn);\n };\n\n var testResult = func(9, 11, 12);\n\n return testResult[0] === true && testResult[1] === true && testResult[2] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-28.js",
+ "description": "Array.prototype.map - element changed by getter on previous iterations is observed on an Array",
+ "test": "assertTrue((function testcase() {\n\n var preIterVisible = false;\n var arr = [];\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === 11;\n } else if (idx === 1) {\n return val === 9;\n } else {\n return false;\n }\n }\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n preIterVisible = true;\n return 11;\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n if (preIterVisible) {\n return 9;\n } else {\n return 11;\n }\n },\n configurable: true\n });\n\n var testResult = arr.map(callbackfn);\n\n return testResult[0] === true && testResult[1] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-29.js",
+ "description": "Array.prototype.map - element changed by getter on previous iterations is observed on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var preIterVisible = false;\n var obj = { length: 2 };\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === 11;\n } else if (idx === 1) {\n return val === 9;\n } else {\n return false;\n }\n }\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n preIterVisible = true;\n return 11;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n if (preIterVisible) {\n return 9;\n } else {\n return 11;\n }\n },\n configurable: true\n });\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult[0] === true && testResult[1] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-3.js",
+ "description": "Array.prototype.map - element to be retrieved is own data property that overrides an inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 5) {\n return val === kValue;\n }\n return false;\n }\n\n var proto = { 5: 12, length: 10 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[5] = kValue;\n\n var testResult = Array.prototype.map.call(child, callbackfn);\n\n return testResult[5] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-30",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-30.js",
+ "description": "Array.prototype.map - unhandled exceptions happened in getter terminate iteration on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 5: 10, 10: 8, length: 20 };\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n if (idx > 1) {\n accessed = true;\n }\n }\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n throw new RangeError(\"unhandle exception happened in getter\");\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"2\", {\n get: function () {\n accessed = true;\n return 100;\n },\n configurable: true\n });\n\n try {\n Array.prototype.map.call(obj, callbackfn);\n return false;\n } catch (ex) {\n return (ex instanceof RangeError) && !accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-31",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-31.js",
+ "description": "Array.prototype.map - unhandled exceptions happened in getter terminate iteration on an Array",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n if (idx > 1) {\n accessed = true;\n }\n }\n\n var arr = [];\n arr[5] = 10;\n arr[10] = 100;\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n throw new RangeError(\"unhandle exception happened in getter\");\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n accessed = true;\n return 100;\n },\n configurable: true\n });\n\n try {\n arr.map(callbackfn);\n return false;\n } catch (ex) {\n return (ex instanceof RangeError) && !accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-4.js",
+ "description": "Array.prototype.map - element to be retrieved is own data property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === kValue;\n }\n return false;\n }\n\n try {\n Array.prototype[0] = 11;\n\n var testResult = [kValue].map(callbackfn);\n\n return testResult[0] === true;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-5.js",
+ "description": "Array.prototype.map - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 5) {\n return val === kValue;\n }\n return false;\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"5\", {\n get: function () {\n return 11;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 10;\n Object.defineProperty(child, \"5\", {\n value: kValue,\n configurable: true\n });\n\n var testResult = Array.prototype.map.call(child, callbackfn);\n\n return testResult[5] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-6.js",
+ "description": "Array.prototype.map - element to be retrieved is own data property that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === kValue;\n }\n return false;\n }\n\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return 9;\n },\n configurable: true\n });\n\n var testResult = [kValue].map(callbackfn);\n return testResult[0] === true;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-7.js",
+ "description": "Array.prototype.map - element to be retrieved is inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 5) {\n return val === kValue;\n }\n return false;\n }\n\n var proto = { 5: kValue, length: 10 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n var newArr = Array.prototype.map.call(child, callbackfn);\n\n return newArr[5] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-8.js",
+ "description": "Array.prototype.map - element to be retrieved is inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n return val === 13;\n }\n return false;\n }\n\n try {\n Array.prototype[1] = 13;\n\n var newArr = [, , , ].map(callbackfn);\n\n return newArr[1] === true;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && ![, 1].hasOwnProperty(0))"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-9.js",
+ "description": "Array.prototype.map - element to be retrieved is own accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === kValue;\n }\n return false;\n }\n\n var obj = { length: 2 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n return kValue;\n },\n configurable: true\n });\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-1.js",
+ "description": "Array.prototype.map - callbackfn called with correct parameters",
+ "test": "assertTrue((function testcase() { \n \n var bPar = true;\n var bCalled = false;\n function callbackfn(val, idx, obj)\n {\n bCalled = true;\n if(obj[idx] !== val)\n bPar = false;\n }\n\n var srcArr = [0,1,true,null,new Object(),\"five\"];\n srcArr[999999] = -6.6;\n resArr = srcArr.map(callbackfn);\n \n if(bCalled === true && bPar === true)\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-10.js",
+ "description": "Array.prototype.map - callbackfn is called with 1 formal parameter",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val) {\n return val > 10;\n }\n\n var testResult = [11].map(callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-11.js",
+ "description": "Array.prototype.map - callbackfn is called with 2 formal parameters",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx) {\n return (val > 10 && arguments[2][idx] === val);\n }\n\n var testResult = [11].map(callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-12.js",
+ "description": "Array.prototype.map - callbackfn is called with 3 formal parameters",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return (val > 10 && obj[idx] === val);\n }\n\n var testResult = [11].map(callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-13.js",
+ "description": "Array.prototype.map - callbackfn that uses arguments object to get parameter value",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn() {\n return arguments[2][arguments[1]] === arguments[0];\n }\n\n var testResult = [11].map(callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-16.js",
+ "description": "Array.prototype.map - 'this' object when T is not an object (T is a boolean primitive)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this.valueOf() === false;\n }\n\n var obj = { 0: 11, length: 2 };\n\n var testResult = Array.prototype.map.call(obj, callbackfn, false);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-17.js",
+ "description": "Array.prototype.map - 'this' object when T is not an object (T is a number)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this.valueOf() === 5;\n }\n\n var obj = { 0: 11, length: 2 };\n\n var testResult = Array.prototype.map.call(obj, callbackfn, 5);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-18.js",
+ "description": "Array.prototype.map - 'this' object when T is not an object (T is a string primitive)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this.valueOf() === \"hello!\";\n }\n\n var obj = { 0: 11, length: 2 };\n\n var testResult = Array.prototype.map.call(obj, callbackfn, \"hello!\");\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-19.js",
+ "description": "Array.prototype.map - non-indexed properties are not called.",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n var result = false;\n\n function callbackfn(val, idx, obj) {\n called++;\n if (val === 11) {\n result = true;\n }\n return true;\n }\n\n var obj = { 0: 9, non_index_property: 11, length: 20 };\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return !result && testResult[0] === true && called === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-2.js",
+ "description": "Array.prototype.map - callbackfn takes 3 arguments",
+ "test": "assertTrue((function testcase() { \n \n var parCnt = 3;\n var bCalled = false\n function callbackfn(val, idx, obj)\n { \n bCalled = true;\n if(arguments.length !== 3)\n parCnt = arguments.length; //verify if callbackfn was called with 3 parameters\n }\n\n var srcArr = [0,1,2,3,4,5,6,7,8,9];\n var resArr = srcArr.map(callbackfn);\n if(bCalled === true && parCnt === 3)\n return true;\n\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-20.js",
+ "description": "Array.prototype.map - callbackfn called with correct parameters (thisArg is correct)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this.threshold === 10;\n }\n\n var thisArg = { threshold: 10 };\n\n var obj = { 0: 11, 1: 9, length: 2 };\n\n var testResult = Array.prototype.map.call(obj, callbackfn, thisArg);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-21.js",
+ "description": "Array.prototype.map - callbackfn called with correct parameters (kValue is correct)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === 11;\n }\n\n if (idx === 1) {\n return val === 12;\n }\n\n return false;\n }\n\n var obj = { 0: 11, 1: 12, length: 2 };\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult[0] === true && testResult[1] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-22.js",
+ "description": "Array.prototype.map - callbackfn called with correct parameters (the index k is correct)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (val === 11) {\n return idx === 0;\n }\n\n if (val === 12) {\n return idx === 1;\n }\n\n return false;\n }\n\n var obj = { 0: 11, 1: 12, length: 2 };\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult[0] === true && testResult[1] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-23.js",
+ "description": "Array.prototype.map - callbackfn called with correct parameters (this object O is correct)",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, length: 2 };\n\n function callbackfn(val, idx, o) {\n return obj === o;\n }\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-4.js",
+ "description": "Array.prototype.map - k values are passed in acending numeric order",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1, 2, 3, 4, 5];\n var lastIdx = 0;\n var called = 0;\n var result = true;\n function callbackfn(val, idx, o) {\n called++;\n if (lastIdx !== idx) {\n result = false;\n } else {\n lastIdx++;\n }\n }\n\n arr.map(callbackfn);\n return result && arr.length === called;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-5.js",
+ "description": "Array.prototype.map - k values are accessed during each iteration and not prior to starting the loop.",
+ "test": "assertTrue((function testcase() {\n\n var kIndex = [];\n\n //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time.\n function callbackfn(val, idx, obj) {\n //Each position should be visited one time, which means k is accessed one time during iterations.\n if (typeof kIndex[idx] === \"undefined\") {\n //when current position is visited, its previous index should has been visited.\n if (idx !== 0 && typeof kIndex[idx - 1] === \"undefined\") {\n return true;\n }\n kIndex[idx] = 1;\n return false;\n } else {\n return true;\n }\n }\n\n var testResult = [11, 12, 13, 14].map(callbackfn);\n\n return testResult.length === 4 && testResult[0] === false &&\n testResult[1] === false && testResult[2] === false &&\n testResult[3] === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-6.js",
+ "description": "Array.prototype.map - arguments to callbackfn are self consistent.",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, length: 1 };\n var thisArg = {};\n\n function callbackfn() {\n return this === thisArg &&\n arguments[0] === 11 &&\n arguments[1] === 0 &&\n arguments[2] === obj;\n }\n\n var testResult = Array.prototype.map.call(obj, callbackfn, thisArg);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-7.js",
+ "description": "Array.prototype.map - unhandled exceptions happened in callbackfn terminate iteration",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n if (idx > 0) {\n accessed = true;\n }\n if (idx === 0) {\n throw new Error(\"Exception occurred in callbackfn\");\n }\n }\n\n var obj = { 0: 11, 4: 10, 10: 8, length: 20 };\n\n try {\n Array.prototype.map.call(obj, callbackfn);\n return false;\n } catch (ex) {\n return ex instanceof Error && !accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-8.js",
+ "description": "Array.prototype.map - element changed by callbackfn on previous iterations is observed",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 9, 1: 12, length: 2 };\n\n function callbackfn(val, idx, o) {\n if (idx === 0) {\n obj[idx + 1] = 8;\n }\n return val > 10;\n }\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult[1] === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-9.js",
+ "description": "Array.prototype.map - callbackfn with 0 formal parameter",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn() {\n return true;\n }\n\n var testResult = [11].map(callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-iii-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-1.js",
+ "description": "Array.prototype.map - getOwnPropertyDescriptor(all true) of returned array element",
+ "test": "assertTrue((function testcase() {\n \n function callbackfn(val, idx, obj){\n\t if(val % 2)\n\t return (2 * val + 1); \n\t else\n\t return (val / 2);\n }\n var srcArr = [0,1,2,3,4];\n var resArr = srcArr.map(callbackfn);\n if (resArr.length > 0){\n var desc = Object.getOwnPropertyDescriptor(resArr, 1) \n if(desc.value === 3 && //srcArr[1] = 2*1+1 = 3\n desc.writable === true &&\n desc.enumerable === true &&\n desc.configurable === true){\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-iii-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-2.js",
+ "description": "Array.prototype.map - value of returned array element equals to 'mappedValue'",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val;\n }\n\n var obj = { 0: 11, 1: 9, length: 2 };\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr[0] === obj[0] && newArr[1] === obj[1];\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-iii-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-3.js",
+ "description": "Array.prototype.map - value of returned array element can be overwritten",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return 11;\n }\n\n var obj = { 0: 11, 1: 9, length: 2 };\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n try {\n var tempVal = newArr[1];\n newArr[1] += 1;\n return newArr[1] !== tempVal;\n } catch (ex) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-iii-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-4.js",
+ "description": "Array.prototype.map - value of returned array element can be enumerated",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n\n var obj = { 0: 11, length: 2 };\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n var prop;\n var enumerable = false;\n for (prop in newArr) {\n if (newArr.hasOwnProperty(prop)) {\n if (prop === \"0\") {\n enumerable = true;\n }\n }\n }\n\n return enumerable;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-iii-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-5.js",
+ "description": "Array.prototype.map - value of returned array element can be changed or deleted",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n\n var obj = { 0: 11, 1: 9, length: 2 };\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n try {\n var tempVal = newArr[1];\n delete newArr[1];\n return tempVal !== undefined && newArr[1] === undefined;\n } catch (ex) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-9-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-1.js",
+ "description": "Array.prototype.map doesn't mutate the Array on which it is called on",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj)\n {\n return true;\n }\n var srcArr = [1,2,3,4,5];\n srcArr.map(callbackfn);\n if(srcArr[0] === 1 &&\n srcArr[1] === 2 &&\n srcArr[2] === 3 &&\n srcArr[3] === 4 &&\n srcArr[4] === 5)\n {\n return true;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-9-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-10.js",
+ "description": "Array.prototype.map - empty array to be returned if 'length' is 0 (subclassed Array, length overridden with obj with valueOf)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var Foo = function () { };\n Foo.prototype = [1, 2, 3];\n var obj = new Foo();\n obj.length = {\n valueOf: function () {\n return 0;\n }\n };\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n return testResult.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-9-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-11.js",
+ "description": "Array.prototype.map - returns an empty array if 'length' is 0 (subclassed Array, length overridden with obj w/o valueOf (toString))",
+ "test": "assertTrue((function testcase() {\n function Foo() { }\n Foo.prototype = [1, 2, 3];\n\n var f = new Foo();\n\n var o = {\n toString: function () {\n return '0';\n }\n };\n f.length = o;\n\n // objects inherit the default valueOf method of the Object object;\n // that simply returns the itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n\n function cb() { }\n var a = Array.prototype.map.call(f, cb);\n\n if (Array.isArray(a) && a.length === 0) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Array.isArray))"
+ },
+ {
+ "id": "15.4.4.19-9-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-12.js",
+ "description": "Array.prototype.map - returns an empty array if 'length' is 0 (subclassed Array, length overridden with [])",
+ "test": "assertTrue((function testcase() {\n function Foo() { }\n Foo.prototype = [1, 2, 3];\n var f = new Foo();\n\n f.length = [];\n\n // objects inherit the default valueOf method of the Object object;\n // that simply returns the itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n //\n // The toString( ) method on Array converts the array elements to strings,\n // then returns the result of concatenating these strings, with commas in\n // between. An array with no elements converts to the empty string, which\n // converts to the number 0. If an array has a single element that is a\n // number n, the array converts to a string representation of n, which is\n // then converted back to n itself. If an array contains more than one element,\n // or if its one element is not a number, the array converts to NaN.\n\n function cb() { }\n var a = Array.prototype.map.call(f, cb);\n\n if (Array.isArray(a) && a.length === 0) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Array.isArray))"
+ },
+ {
+ "id": "15.4.4.19-9-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-13.js",
+ "description": "Array.prototype.map - if there are no side effects of the functions, O is unmodified",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n\n function callbackfn(val, idx, obj) {\n called++;\n return val > 2;\n }\n\n var arr = [1, 2, 3, 4];\n\n arr.map(callbackfn);\n\n return 1 === arr[0] && 2 === arr[1] && 3 === arr[2] && 4 === arr[3] && 4 === called;\n\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-9-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-2.js",
+ "description": "Array.prototype.map returns new Array with same number of elements and values the result of callbackfn",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj)\n {\n return val + 10;\n }\n var srcArr = [1,2,3,4,5];\n var resArr = srcArr.map(callbackfn);\n if(resArr[0] === 11 &&\n resArr[1] === 12 &&\n resArr[2] === 13 &&\n resArr[3] === 14 &&\n resArr[4] === 15)\n {\n return true;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-9-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-3.js",
+ "description": "Array.prototype.map - subclassed array when length is reduced",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = 1;\n \n function cb(){}\n var a = f.map(cb);\n \n if (Array.isArray(a) &&\n a.length === 1) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-9-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-4.js",
+ "description": "Array.prototype.map doesn't visit expandos",
+ "test": "assertTrue((function testcase() {\n\n var callCnt = 0;\n function callbackfn(val, idx, obj)\n {\n callCnt++;\n }\n var srcArr = [1,2,3,4,5];\n srcArr[\"i\"] = 10;\n srcArr[true] = 11;\n\n var resArr = srcArr.map(callbackfn);\n if(callCnt == 5)\n {\n return true;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-9-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-5.js",
+ "description": "Array.prototype.map - empty array to be returned if 'length' is 0 (empty array)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = { 0: 9, 1: 8, length: 0 };\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-9-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-6.js",
+ "description": "Array.prototype.map - empty array to be returned if 'length' is 0 (subclassed Array, length overridden to null (type conversion))",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var Foo = function () { };\n Foo.prototype = [1, 2, 3];\n var obj = new Foo();\n obj.length = null;\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n return testResult.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-9-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-7.js",
+ "description": "Array.prototype.map - empty array to be returned if 'length' is 0 (subclassed Array, length overridden to false (type conversion))",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var Foo = function () { };\n Foo.prototype = [1, 2, 3];\n var obj = new Foo();\n obj.length = false;\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n return testResult.length === 0;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-9-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-8.js",
+ "description": "Array.prototype.map - empty array to be returned if 'length' is 0 (subclassed Array, length overridden to 0 (type conversion))",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var Foo = function () { };\n Foo.prototype = [1, 2, 3];\n var obj = new Foo();\n obj.length = 0;\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n return testResult.length === 0;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-9-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-9.js",
+ "description": "Array.prototype.map - empty array to be returned if 'length' is 0 (subclassed Array, length overridden to '0' (type conversion))",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var Foo = function () { };\n Foo.prototype = [1, 2, 3];\n var obj = new Foo();\n obj.length = '0';\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n return testResult.length === 0;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ }
+ ]
+ }
+}