summaryrefslogtreecommitdiff
path: root/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-30.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-30.js')
-rw-r--r--test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-30.js47
1 files changed, 26 insertions, 21 deletions
diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-30.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-30.js
index d9cec7c6b..cae9865e2 100644
--- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-30.js
+++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-30.js
@@ -9,30 +9,35 @@ description: >
terminate iteration on an Array-like object
---*/
- var obj = { 0: 11, 5: 10, 10: 8, length: 20 };
- var accessed = false;
+var obj = {
+ 0: 11,
+ 5: 10,
+ 10: 8,
+ length: 20
+};
+var accessed = false;
- function callbackfn(val, idx, obj) {
- if (idx > 1) {
- accessed = true;
- }
- }
+function callbackfn(val, idx, obj) {
+ if (idx > 1) {
+ accessed = true;
+ }
+}
- Object.defineProperty(obj, "1", {
- get: function () {
- throw new RangeError("unhandle exception happened in getter");
- },
- configurable: true
- });
+Object.defineProperty(obj, "1", {
+ get: function() {
+ throw new RangeError("unhandle exception happened in getter");
+ },
+ configurable: true
+});
- Object.defineProperty(obj, "2", {
- get: function () {
- accessed = true;
- return 100;
- },
- configurable: true
- });
+Object.defineProperty(obj, "2", {
+ get: function() {
+ accessed = true;
+ return 100;
+ },
+ configurable: true
+});
assert.throws(RangeError, function() {
- Array.prototype.map.call(obj, callbackfn);
+ Array.prototype.map.call(obj, callbackfn);
});
assert.sameValue(accessed, false, 'accessed');