summaryrefslogtreecommitdiff
path: root/test/built-ins/Array/prototype/forEach/15.4.4.18-8-11.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Array/prototype/forEach/15.4.4.18-8-11.js')
-rw-r--r--test/built-ins/Array/prototype/forEach/15.4.4.18-8-11.js18
1 files changed, 5 insertions, 13 deletions
diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-11.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-11.js
index e73457fc2..228694dc4 100644
--- a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-11.js
+++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-11.js
@@ -6,25 +6,17 @@ es5id: 15.4.4.18-8-11
description: >
Array.prototype.forEach doesn't mutate the array on which it is
called on
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj)
{
return true;
}
var arr = [1,2,3,4,5];
arr.forEach(callbackfn);
- if(arr[0] === 1 &&
- arr[1] === 2 &&
- arr[2] === 3 &&
- arr[3] === 4 &&
- arr[4] === 5)
- {
- return true;
- }
- }
-runTestCase(testcase);
+assert.sameValue(arr[0], 1, 'arr[0]');
+assert.sameValue(arr[1], 2, 'arr[1]');
+assert.sameValue(arr[2], 3, 'arr[2]');
+assert.sameValue(arr[3], 4, 'arr[3]');
+assert.sameValue(arr[4], 5, 'arr[4]');