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