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