aboutsummaryrefslogtreecommitdiffstats
path: root/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-19.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-19.js')
-rw-r--r--test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-19.js90
1 files changed, 46 insertions, 44 deletions
diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-19.js b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-19.js
index 4ce0b025b..561ba7c9e 100644
--- a/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-19.js
+++ b/test/suite/ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-19.js
@@ -1,44 +1,46 @@
-/// Copyright (c) 2012 Ecma International. All rights reserved.
-/// Ecma International makes this code available under the terms and conditions set
-/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
-/// "Use Terms"). Any redistribution of this code must retain the above
-/// copyright and this notice and otherwise comply with the Use Terms.
-/**
- * @path ch15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-19.js
- * @description Array.prototype.reduceRight - properties added to prototype are visited on an Array-like object
- */
-
-
-function testcase() {
-
- var testResult = false;
-
- function callbackfn(prevVal, curVal, idx, obj) {
- if (idx === 1 && curVal === 6.99) {
- testResult = true;
- }
- }
-
- var obj = { length: 6 };
-
- Object.defineProperty(obj, "2", {
- get: function () {
- Object.defineProperty(Object.prototype, "1", {
- get: function () {
- return 6.99;
- },
- configurable: true
- });
- return 0;
- },
- configurable: true
- });
-
- try {
- Array.prototype.reduceRight.call(obj, callbackfn, "initialValue");
- return testResult;
- } finally {
- delete Object.prototype[1];
- }
- }
-runTestCase(testcase);
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// Ecma International makes this code available under the terms and conditions set
+// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+// "Use Terms"). Any redistribution of this code must retain the above
+// copyright and this notice and otherwise comply with the Use Terms.
+
+/*---
+description: >
+ Array.prototype.reduceRight - properties added to prototype are
+ visited on an Array-like object
+includes: [runTestCase.js]
+---*/
+
+function testcase() {
+
+ var testResult = false;
+
+ function callbackfn(prevVal, curVal, idx, obj) {
+ if (idx === 1 && curVal === 6.99) {
+ testResult = true;
+ }
+ }
+
+ var obj = { length: 6 };
+
+ Object.defineProperty(obj, "2", {
+ get: function () {
+ Object.defineProperty(Object.prototype, "1", {
+ get: function () {
+ return 6.99;
+ },
+ configurable: true
+ });
+ return 0;
+ },
+ configurable: true
+ });
+
+ try {
+ Array.prototype.reduceRight.call(obj, callbackfn, "initialValue");
+ return testResult;
+ } finally {
+ delete Object.prototype[1];
+ }
+ }
+runTestCase(testcase);