summaryrefslogtreecommitdiff
path: root/test/built-ins/Array/prototype/reduceRight
diff options
context:
space:
mode:
authorAndré Bargull <andre.bargull@gmail.com>2015-08-13 17:42:21 +0200
committerAndré Bargull <andre.bargull@gmail.com>2015-08-13 17:42:40 +0200
commit52a706c0223d446394256a748b384f70cc72afc0 (patch)
treec84bf3162aee14a0e5b2e6726b96983ed730a349 /test/built-ins/Array/prototype/reduceRight
parent6b48d9f1b29452db77403410d6d15c0de4a8ea21 (diff)
downloadqtdeclarative-testsuites-52a706c0223d446394256a748b384f70cc72afc0.tar.gz
Replace runTestCase with assert, try-finally, [test/built-ins/Array]
Diffstat (limited to 'test/built-ins/Array/prototype/reduceRight')
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-10.js14
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-13.js14
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-3.js14
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-5.js14
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-12.js12
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-15.js19
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-18.js13
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-4.js13
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-12.js11
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-14.js11
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-16.js11
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-19.js11
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-20.js11
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-22.js12
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-23.js17
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-4.js11
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-6.js12
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-8.js13
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-4.js8
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-10.js13
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-11.js13
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-12.js12
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-13.js12
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-15.js11
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-19.js12
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-20.js12
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-23.js13
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-24.js13
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-25.js12
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-26.js12
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-28.js11
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-6.js12
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-7.js12
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-12.js11
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-14.js11
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-16.js11
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-19.js11
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-20.js11
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-22.js12
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-23.js17
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-4.js11
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-6.js12
-rw-r--r--test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-8.js13
43 files changed, 75 insertions, 456 deletions
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-10.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-10.js
index a146182df..35b7715bb 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-10.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-10.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.22-1-10
description: Array.prototype.reduceRight applied to the Math object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -16,13 +13,8 @@ function testcase() {
return '[object Math]' === Object.prototype.toString.call(obj);
}
- try {
Math.length = 1;
Math[0] = 1;
- return Array.prototype.reduceRight.call(Math, callbackfn, 1) && accessed;
- } finally {
- delete Math[0];
- delete Math.length;
- }
- }
-runTestCase(testcase);
+
+assert(Array.prototype.reduceRight.call(Math, callbackfn, 1), 'Array.prototype.reduceRight.call(Math, callbackfn, 1) !== true');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-13.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-13.js
index b85fa21ff..1791e2bc8 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-13.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-13.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.22-1-13
description: Array.prototype.reduceRight applied to the JSON object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -16,13 +13,8 @@ function testcase() {
return ('[object JSON]' === Object.prototype.toString.call(obj));
}
- try {
JSON.length = 1;
JSON[0] = 1;
- return Array.prototype.reduceRight.call(JSON, callbackfn, 1) && accessed;
- } finally {
- delete JSON.length;
- delete JSON[0];
- }
- }
-runTestCase(testcase);
+
+assert(Array.prototype.reduceRight.call(JSON, callbackfn, 1), 'Array.prototype.reduceRight.call(JSON, callbackfn, 1) !== true');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-3.js
index 6d932248a..22200e777 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-3.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-3.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.22-1-3
description: Array.prototype.reduceRight applied to boolean primitive
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -16,13 +13,8 @@ function testcase() {
return obj instanceof Boolean;
}
- try {
Boolean.prototype[0] = 1;
Boolean.prototype.length = 1;
- return Array.prototype.reduceRight.call(false, callbackfn, 1) && accessed;
- } finally {
- delete Boolean.prototype[0];
- delete Boolean.prototype.length;
- }
- }
-runTestCase(testcase);
+
+assert(Array.prototype.reduceRight.call(false, callbackfn, 1), 'Array.prototype.reduceRight.call(false, callbackfn, 1) !== true');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-5.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-5.js
index e482f0fbd..16d8c5bbd 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-5.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-5.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.22-1-5
description: Array.prototype.reduceRight applied to number primitive
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -16,13 +13,8 @@ function testcase() {
return obj instanceof Number;
}
- try {
Number.prototype[0] = 1;
Number.prototype.length = 1;
- return Array.prototype.reduceRight.call(2.5, callbackfn, 1) && accessed;
- } finally {
- delete Number.prototype[0];
- delete Number.prototype.length;
- }
- }
-runTestCase(testcase);
+
+assert(Array.prototype.reduceRight.call(2.5, callbackfn, 1), 'Array.prototype.reduceRight.call(2.5, callbackfn, 1) !== true');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-12.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-12.js
index 55c81f627..093e493ba 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-12.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-12.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduceRight - 'length' is own accessor property
without a get function that overrides an inherited accessor
property
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -19,7 +16,6 @@ function testcase() {
return typeof obj.length === "undefined";
}
- try {
Object.defineProperty(Object.prototype, "length", {
get: function () {
return 2;
@@ -33,9 +29,5 @@ function testcase() {
configurable: true
});
- return Array.prototype.reduceRight.call(obj, callbackfn, 11) === 11 && !accessed;
- } finally {
- delete Object.prototype.length;
- }
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 11), 11, 'Array.prototype.reduceRight.call(obj, callbackfn, 11)');
+assert.sameValue(accessed, false, 'accessed');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-15.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-15.js
index ae3bf03ab..78a7ee7e9 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-15.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-15.js
@@ -6,13 +6,9 @@ es5id: 15.4.4.22-2-15
description: >
Array.prototype.reduceRight - 'length' is property of the global
object
-includes:
- - runTestCase.js
- - fnGlobalObject.js
+includes: [fnGlobalObject.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -20,18 +16,11 @@ function testcase() {
return obj.length === fnGlobalObject().length;
}
- try {
var oldLen = fnGlobalObject().length;
fnGlobalObject()[0] = 12;
fnGlobalObject()[1] = 11;
fnGlobalObject()[2] = 9;
fnGlobalObject().length = 2;
- return Array.prototype.reduceRight.call(fnGlobalObject(), callbackfn, 111) && accessed;
- } finally {
- delete fnGlobalObject()[0];
- delete fnGlobalObject()[1];
- delete fnGlobalObject()[2];
- fnGlobalObject().length = oldLen;
- }
- }
-runTestCase(testcase);
+
+assert(Array.prototype.reduceRight.call(fnGlobalObject(), callbackfn, 111), 'Array.prototype.reduceRight.call(fnGlobalObject(), callbackfn, 111) !== true');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-18.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-18.js
index af67834e8..3d3aed329 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-18.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-18.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.22-2-18
description: >
Array.prototype.reduceRight applied to String object, which
implements its own property get method
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
var str = new String("432");
@@ -19,11 +16,7 @@ function testcase() {
return obj.length === 3;
}
- try {
String.prototype[3] = "1";
- return Array.prototype.reduceRight.call(str, callbackfn, 111) && accessed;
- } finally {
- delete String.prototype[3];
- }
- }
-runTestCase(testcase);
+
+assert(Array.prototype.reduceRight.call(str, callbackfn, 111), 'Array.prototype.reduceRight.call(str, callbackfn, 111) !== true');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-4.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-4.js
index 930853b5c..3c3a8e6b9 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-4.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-4.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.22-2-4
description: >
Array.prototype.reduceRight - 'length' is own data property that
overrides an inherited data property on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
var arrProtoLen;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -18,14 +15,8 @@ function testcase() {
return obj.length === 2;
}
- try {
arrProtoLen = Array.prototype.length;
Array.prototype.length = 0;
- return [12, 11].reduceRight(callbackfn, 11) && accessed;
- } finally {
- Array.prototype.length = arrProtoLen;
- }
-
- }
-runTestCase(testcase);
+assert([12, 11].reduceRight(callbackfn, 11), '[12, 11].reduceRight(callbackfn, 11) !== true');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-12.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-12.js
index 96616646d..884278982 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-12.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-12.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduceRight - element to be retrieved is own
accessor property that overrides an inherited data property on an
Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -19,7 +16,6 @@ function testcase() {
}
}
- try {
Array.prototype[2] = 2;
var arr = [0, 1];
@@ -31,10 +27,5 @@ function testcase() {
});
arr.reduceRight(callbackfn);
- return testResult;
- } finally {
- delete Array.prototype[2];
- }
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-14.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-14.js
index f35f43bd6..bbf447769 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-14.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-14.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduceRight - element to be retrieved is own
accessor property that overrides an inherited accessor property on
an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -19,7 +16,6 @@ function testcase() {
}
}
- try {
Object.defineProperty(Array.prototype, "2", {
get: function () {
return 2;
@@ -37,10 +33,5 @@ function testcase() {
});
arr.reduceRight(callbackfn);
- return testResult;
- } finally {
- delete Array.prototype[2];
- }
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-16.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-16.js
index a7814ef34..7e37073a5 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-16.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-16.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.22-8-b-iii-1-16
description: >
Array.prototype.reduceRight - element to be retrieved is inherited
accessor property on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -18,7 +15,6 @@ function testcase() {
}
}
- try {
Object.defineProperty(Array.prototype, "2", {
get: function () {
return 2;
@@ -29,10 +25,5 @@ function testcase() {
var arr = [0, 1, , ];
arr.reduceRight(callbackfn);
- return testResult;
- } finally {
- delete Array.prototype[2];
- }
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-19.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-19.js
index c0087cdb0..cb28c4bb1 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-19.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-19.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduceRight - element to be retrieved is own
accessor property without a get function that overrides an
inherited accessor property on an Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -19,7 +16,6 @@ function testcase() {
}
}
- try {
Object.prototype[2] = 2;
var obj = { 0: 0, 1: 1, length: 3 };
@@ -29,10 +25,5 @@ function testcase() {
});
Array.prototype.reduceRight.call(obj, callbackfn);
- return testResult;
- } finally {
- delete Object.prototype[2];
- }
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-20.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-20.js
index 16d9ea43a..a08f1b962 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-20.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-20.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduceRight - element to be retrieved is own
accessor property without a get function that overrides an
inherited accessor property on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -19,7 +16,6 @@ function testcase() {
}
}
- try {
Array.prototype[2] = 2;
var arr = [0, 1];
Object.defineProperty(arr, "2", {
@@ -28,10 +24,5 @@ function testcase() {
});
arr.reduceRight(callbackfn);
- return testResult;
- } finally {
- delete Array.prototype[2];
- }
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-22.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-22.js
index c3d2e698b..0f687743b 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-22.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-22.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.22-8-b-iii-1-22
description: >
Array.prototype.reduceRight - element to be retrieved is inherited
accessor property without a get function on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -18,7 +15,6 @@ function testcase() {
}
}
- try {
Object.defineProperty(Array.prototype, "2", {
set: function () { },
configurable: true
@@ -27,11 +23,5 @@ function testcase() {
var arr = [0, 1, , ];
arr.reduceRight(callbackfn);
- return testResult;
-
- } finally {
- delete Array.prototype[2];
- }
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-23.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-23.js
index dfbd2db0a..bbe19f73d 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-23.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-23.js
@@ -6,13 +6,9 @@ es5id: 15.4.4.22-8-b-iii-1-23
description: >
Array.prototype.reduceRight - This object is the global object
which contains index property
-includes:
- - runTestCase.js
- - fnGlobalObject.js
+includes: [fnGlobalObject.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -20,7 +16,6 @@ function testcase() {
}
}
- try {
var oldLen = fnGlobalObject().length;
fnGlobalObject()[0] = 0;
fnGlobalObject()[1] = 1;
@@ -28,13 +23,5 @@ function testcase() {
fnGlobalObject().length = 3;
Array.prototype.reduceRight.call(fnGlobalObject(), callbackfn);
- return testResult;
- } finally {
- delete fnGlobalObject()[0];
- delete fnGlobalObject()[1];
- delete fnGlobalObject()[2];
- fnGlobalObject().length = oldLen;
- }
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-4.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-4.js
index b4daf842a..579c346cd 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-4.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-4.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.22-8-b-iii-1-4
description: >
Array.prototype.reduceRight - element to be retrieved is own data
property that overrides an inherited data property on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -18,13 +15,7 @@ function testcase() {
}
}
- try {
Array.prototype[2] = "11";
[0, 1, 2].reduceRight(callbackfn);
- return testResult;
- } finally {
- delete Array.prototype[2];
- }
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-6.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-6.js
index 6195bef8a..34ff8e5b3 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-6.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-6.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.22-8-b-iii-1-6
description: >
Array.prototype.reduceRight - element to be retrieved is own data
property that overrides an inherited accessor property on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -18,7 +15,6 @@ function testcase() {
}
}
- try {
Object.defineProperty(Array.prototype, "2", {
get: function () {
return "2";
@@ -26,11 +22,5 @@ function testcase() {
configurable: true
});
[0, 1, 2].reduceRight(callbackfn);
- return testResult;
-
- } finally {
- delete Array.prototype[2];
- }
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-8.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-8.js
index 3d23c6185..2471f3353 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-8.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-8.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.22-8-b-iii-1-8
description: >
Array.prototype.reduceRight - element to be retrieved is inherited
data property on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -18,17 +15,9 @@ function testcase() {
}
}
- try {
Array.prototype[0] = 0;
Array.prototype[1] = 1;
Array.prototype[2] = 2;
[, , ,].reduceRight(callbackfn);
- return testResult;
- } finally {
- delete Array.prototype[0];
- delete Array.prototype[1];
- delete Array.prototype[2];
- }
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-4.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-4.js
index 9b1d5fb86..2824cfd96 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-4.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-c-4.js
@@ -6,21 +6,13 @@ es5id: 15.4.4.22-8-c-4
description: >
Array.prototype.reduceRight doesn't throw error when array has no
own properties but prototype contains a single property
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var arr = [, , , ];
try {
Array.prototype[1] = "prototype";
arr.reduceRight(function () { });
- return true;
- } catch (ex) {
- return false;
} finally {
delete Array.prototype[1];
}
- }
-runTestCase(testcase);
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-10.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-10.js
index 0467957d7..8054929e9 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-10.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-10.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduceRight - deleting property of prototype in
step 8 causes deleted index property not to be visited on an
Array-like Object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
var testResult = true;
@@ -32,12 +29,8 @@ function testcase() {
configurable: true
});
- try {
Object.prototype[3] = 1;
Array.prototype.reduceRight.call(obj, callbackfn);
- return testResult && accessed;
- } finally {
- delete Object.prototype[3];
- }
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-11.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-11.js
index b8dd5940e..c18b3c552 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-11.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-11.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-b-11
description: >
Array.prototype.reduceRight - deleting property of prototype in
step 8 causes deleted index property not to be visited on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
var testResult = true;
@@ -30,12 +27,8 @@ function testcase() {
configurable: true
});
- try {
Array.prototype[1] = 1;
arr.reduceRight(callbackfn);
- return testResult && accessed;
- } finally {
- delete Array.prototype[1];
- }
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-12.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-12.js
index a9d1c2165..883290baa 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-12.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-12.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduceRight - deleting own property with prototype
property in step 8 causes prototype index property to be visited
on an Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -30,12 +27,7 @@ function testcase() {
configurable: true
});
- try {
Object.prototype[1] = 1;
Array.prototype.reduceRight.call(obj, callbackfn);
- return testResult;
- } finally {
- delete Object.prototype[1];
- }
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-13.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-13.js
index 725c3de54..b4617abc1 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-13.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-13.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduceRight - deleting own property with prototype
property in step 8 causes prototype index property to be visited
on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -29,12 +26,7 @@ function testcase() {
configurable: true
});
- try {
Array.prototype[1] = 1;
arr.reduceRight(callbackfn);
- return testResult;
- } finally {
- delete Array.prototype[1];
- }
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-15.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-15.js
index 3fe58488a..d2c89fe56 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-15.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-15.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduceRight - decreasing length of array with
prototype property in step 8 causes prototype index property to be
visited
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -21,7 +18,6 @@ function testcase() {
}
var arr = [0, 1, 2, 3];
- try {
Object.defineProperty(Array.prototype, "2", {
get: function () {
return "prototype";
@@ -39,9 +35,4 @@ function testcase() {
arr.reduceRight(callbackfn);
- return testResult;
- } finally {
- delete Array.prototype[2];
- }
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-19.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-19.js
index 9fc059f06..677fc5218 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-19.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-19.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-b-19
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) {
@@ -34,11 +31,6 @@ function testcase() {
configurable: true
});
- try {
Array.prototype.reduceRight.call(obj, callbackfn, "initialValue");
- return testResult;
- } finally {
- delete Object.prototype[1];
- }
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-20.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-20.js
index 5d47fd9f1..4a1c7dcc4 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-20.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-20.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-b-20
description: >
Array.prototype.reduceRight - properties added to prototype can be
visited on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -34,11 +31,6 @@ function testcase() {
configurable: true
});
- try {
arr.reduceRight(callbackfn, "initialValue");
- return testResult;
- } finally {
- delete Array.prototype[1];
- }
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-23.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-23.js
index 33f434433..6ced9a816 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-23.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-23.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduceRight - deleting property of prototype
causes deleted index property not to be visited on an Array-like
Object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
var testResult = true;
@@ -32,12 +29,8 @@ function testcase() {
configurable: true
});
- try {
Object.prototype[3] = 1;
Array.prototype.reduceRight.call(obj, callbackfn, "initialValue");
- return testResult && accessed;
- } finally {
- delete Object.prototype[3];
- }
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-24.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-24.js
index 0fee30536..218340c5f 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-24.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-24.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-b-24
description: >
Array.prototype.reduceRight - deleting property of prototype
causes deleted index property not to be visited on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
var testResult = true;
@@ -30,12 +27,8 @@ function testcase() {
configurable: true
});
- try {
Array.prototype[1] = 1;
arr.reduceRight(callbackfn, "initialValue");
- return testResult && accessed;
- } finally {
- delete Array.prototype[1];
- }
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-25.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-25.js
index 5234c1958..ab59c0780 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-25.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-25.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduceRight - deleting own property with prototype
property causes prototype index property to be visited on an
Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -30,12 +27,7 @@ function testcase() {
configurable: true
});
- try {
Object.prototype[1] = 1;
Array.prototype.reduceRight.call(obj, callbackfn, "initialValue");
- return testResult;
- } finally {
- delete Object.prototype[1];
- }
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-26.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-26.js
index 96ecdf625..08231b2e4 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-26.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-26.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-b-26
description: >
Array.prototype.reduceRight - deleting own property with prototype
property causes prototype index property to be visited on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -28,12 +25,7 @@ function testcase() {
configurable: true
});
- try {
Array.prototype[1] = 1;
arr.reduceRight(callbackfn, "initialValue");
- return testResult;
- } finally {
- delete Array.prototype[1];
- }
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-28.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-28.js
index e77cae365..7c3743976 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-28.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-28.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-b-28
description: >
Array.prototype.reduceRight - decreasing length of array with
prototype property causes prototype index property to be visited
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -20,7 +17,6 @@ function testcase() {
}
var arr = [0, 1, 2, 3];
- try {
Object.defineProperty(Array.prototype, "2", {
get: function () {
return "prototype";
@@ -38,9 +34,4 @@ function testcase() {
arr.reduceRight(callbackfn, "initialValue");
- return testResult;
- } finally {
- delete Array.prototype[2];
- }
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-6.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-6.js
index 8f96ac484..db4e3977d 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-6.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-6.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-b-6
description: >
Array.prototype.reduceRight - properties added to prototype in
step 8 visited on an Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(preVal, curVal, idx, obj) {
@@ -34,11 +31,6 @@ function testcase() {
configurable: true
});
- try {
Array.prototype.reduceRight.call(obj, callbackfn);
- return testResult;
- } finally {
- delete Object.prototype[1];
- }
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-7.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-7.js
index c83e459fb..9dd8692bd 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-7.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-7.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-b-7
description: >
Array.prototype.reduceRight - properties added to prototype in
step 8 visited on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(preVal, curVal, idx, obj) {
@@ -34,11 +31,6 @@ function testcase() {
configurable: true
});
- try {
arr.reduceRight(callbackfn);
- return testResult;
- } finally {
- delete Array.prototype[1];
- }
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-12.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-12.js
index d62bfc9d5..495ed1040 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-12.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-12.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduceRight - element to be retrieved is own
accessor property that overrides an inherited data property on an
Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -19,7 +16,6 @@ function testcase() {
}
}
- try {
Array.prototype[1] = 11;
var arr = [0, ,2];
@@ -31,10 +27,5 @@ function testcase() {
});
arr.reduceRight(callbackfn, "initialValue");
- return testResult;
- } finally {
- delete Array.prototype[1];
- }
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-14.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-14.js
index f9a8c8ada..80e358bc9 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-14.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-14.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduceRight - element to be retrieved is own
accessor property that overrides an inherited accessor property on
an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -19,7 +16,6 @@ function testcase() {
}
}
- try {
Object.defineProperty(Array.prototype, "1", {
get: function () {
return 11;
@@ -36,10 +32,5 @@ function testcase() {
configurable: true
});
arr.reduceRight(callbackfn, "initialValue");
- return testResult;
- } finally {
- delete Array.prototype[1];
- }
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-16.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-16.js
index ced9ca9bf..494abf802 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-16.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-16.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-i-16
description: >
Array.prototype.reduceRight - element to be retrieved is inherited
accessor property on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -18,7 +15,6 @@ function testcase() {
}
}
- try {
Object.defineProperty(Array.prototype, "1", {
get: function () {
return 1;
@@ -29,10 +25,5 @@ function testcase() {
var arr = [0, , 2];
arr.reduceRight(callbackfn, "initialValue");
- return testResult;
- } finally {
- delete Array.prototype[1];
- }
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-19.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-19.js
index b93bb45e0..a5c367dd8 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-19.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-19.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduceRight - element to be retrieved is own
accessor property without a get function that overrides an
inherited accessor property on an Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -19,7 +16,6 @@ function testcase() {
}
}
- try {
Object.prototype[1] = 1;
var obj = { 0: 0, 2: 2, length: 3 };
@@ -29,10 +25,5 @@ function testcase() {
});
Array.prototype.reduceRight.call(obj, callbackfn, "initialValue");
- return testResult;
- } finally {
- delete Object.prototype[1];
- }
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-20.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-20.js
index 0e2c194fa..5a901f843 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-20.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-20.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduceRight - element to be retrieved is own
accessor property without a get function that overrides an
inherited accessor property on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -19,7 +16,6 @@ function testcase() {
}
}
- try {
Array.prototype[1] = 1;
var arr = [0, ,2];
Object.defineProperty(arr, "1", {
@@ -28,10 +24,5 @@ function testcase() {
});
arr.reduceRight(callbackfn, "initialValue");
- return testResult;
- } finally {
- delete Array.prototype[1];
- }
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-22.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-22.js
index 2b2062867..256d03072 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-22.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-22.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-i-22
description: >
Array.prototype.reduceRight - element to be retrieved is inherited
accessor property without a get function on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -18,7 +15,6 @@ function testcase() {
}
}
- try {
Object.defineProperty(Array.prototype, "1", {
set: function () { },
configurable: true
@@ -27,11 +23,5 @@ function testcase() {
var arr = [0, , 2];
arr.reduceRight(callbackfn, "initialValue");
- return testResult;
- } finally {
- delete Array.prototype[1];
- }
-
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-23.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-23.js
index 2411819ba..854466ce7 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-23.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-23.js
@@ -6,13 +6,9 @@ es5id: 15.4.4.22-9-c-i-23
description: >
Array.prototype.reduceRight - This object is an global object
which contains index property
-includes:
- - runTestCase.js
- - fnGlobalObject.js
+includes: [fnGlobalObject.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -20,7 +16,6 @@ function testcase() {
}
}
- try {
var oldLen = fnGlobalObject().length;
fnGlobalObject()[0] = 0;
fnGlobalObject()[1] = 1;
@@ -28,13 +23,5 @@ function testcase() {
fnGlobalObject().length = 3;
Array.prototype.reduceRight.call(fnGlobalObject(), callbackfn, "initialValue");
- return testResult;
- } finally {
- delete fnGlobalObject()[0];
- delete fnGlobalObject()[1];
- delete fnGlobalObject()[2];
- fnGlobalObject().length = oldLen;
- }
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-4.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-4.js
index 6bdad8d75..1021829d7 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-4.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-4.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-i-4
description: >
Array.prototype.reduceRight - element to be retrieved is own data
property that overrides an inherited data property on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -18,13 +15,7 @@ function testcase() {
}
}
- try {
Array.prototype[1] = "11";
[0, 1, 2].reduceRight(callbackfn, "initialValue");
- return testResult;
- } finally {
- delete Array.prototype[1];
- }
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-6.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-6.js
index d4b4e6f23..80d577ff8 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-6.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-6.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-i-6
description: >
Array.prototype.reduceRight - element to be retrieved is own data
property that overrides an inherited accessor property on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -18,7 +15,6 @@ function testcase() {
}
}
- try {
Object.defineProperty(Array.prototype, "1", {
get: function () {
return "11";
@@ -26,11 +22,5 @@ function testcase() {
configurable: true
});
[0, 1, 2].reduceRight(callbackfn, "initialValue");
- return testResult;
-
- } finally {
- delete Array.prototype[1];
- }
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-8.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-8.js
index e961a66b8..bf150824f 100644
--- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-8.js
+++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-8.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-i-8
description: >
Array.prototype.reduceRight - element to be retrieved is inherited
data property on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -18,17 +15,9 @@ function testcase() {
}
}
- try {
Array.prototype[0] = 0;
Array.prototype[1] = 1;
Array.prototype[2] = 2;
[, , , ].reduceRight(callbackfn, "initialValue");
- return testResult;
- } finally {
- delete Array.prototype[0];
- delete Array.prototype[1];
- delete Array.prototype[2];
- }
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');