summaryrefslogtreecommitdiff
path: root/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-15.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-15.js')
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-15.js52
1 files changed, 24 insertions, 28 deletions
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-15.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-15.js
index fb6f4b430..8a4819778 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-15.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-15.js
@@ -9,33 +9,29 @@ description: >
accessor property on an Array-like object
---*/
-var testResult = false;
-var initialValue = 0;
-
-function callbackfn(prevVal, curVal, idx, obj) {
- if (idx === 1) {
- testResult = (curVal === 1);
- }
-}
-
-var proto = {
- 0: 0,
- 2: 2
-};
-
-Object.defineProperty(proto, "1", {
- get: function() {
- return 1;
- },
- configurable: true
-});
-
-var Con = function() {};
-Con.prototype = proto;
-
-var child = new Con();
-child.length = 3;
-
-Array.prototype.reduce.call(child, callbackfn, initialValue);
+ var testResult = false;
+ var initialValue = 0;
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1) {
+ testResult = (curVal === 1);
+ }
+ }
+
+ var proto = { 0: 0, 2: 2 };
+
+ Object.defineProperty(proto, "1", {
+ get: function () {
+ return 1;
+ },
+ configurable: true
+ });
+
+ var Con = function () { };
+ Con.prototype = proto;
+
+ var child = new Con();
+ child.length = 3;
+
+ Array.prototype.reduce.call(child, callbackfn, initialValue);
assert(testResult, 'testResult !== true');