summaryrefslogtreecommitdiff
path: root/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-12.js
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/forEach/15.4.4.18-7-c-i-12.js
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/forEach/15.4.4.18-7-c-i-12.js')
-rw-r--r--test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-12.js12
1 files changed, 2 insertions, 10 deletions
diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-12.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-12.js
index 27ac3e1b0..3501d5944 100644
--- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-12.js
+++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-12.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-c-i-12
description: >
Array.prototype.forEach - 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(val, idx, obj) {
@@ -20,7 +17,7 @@ function testcase() {
}
var arr = [];
- try {
+
Array.prototype[0] = 10;
Object.defineProperty(arr, "0", {
@@ -32,9 +29,4 @@ function testcase() {
arr.forEach(callbackfn);
- return testResult;
- } finally {
- delete Array.prototype[0];
- }
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');