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