summaryrefslogtreecommitdiff
path: root/test/built-ins/Array/prototype/map/15.4.4.19-8-5.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/Array/prototype/map/15.4.4.19-8-5.js')
-rw-r--r--test/built-ins/Array/prototype/map/15.4.4.19-8-5.js23
1 files changed, 12 insertions, 11 deletions
diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-5.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-5.js
index 85747416a..969ef76b0 100644
--- a/test/built-ins/Array/prototype/map/15.4.4.19-8-5.js
+++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-5.js
@@ -9,18 +9,19 @@ description: >
sparse array
---*/
- var callCnt = 0;
- function callbackfn(val, idx, obj)
- {
- srcArr[1000] = 3;
- callCnt++;
- return val;
- }
+var callCnt = 0;
- var srcArr = new Array(10);
- srcArr[1] = 1;
- srcArr[2] = 2;
- var resArr = srcArr.map(callbackfn);
+function callbackfn(val, idx, obj)
+{
+ srcArr[1000] = 3;
+ callCnt++;
+ return val;
+}
+
+var srcArr = new Array(10);
+srcArr[1] = 1;
+srcArr[2] = 2;
+var resArr = srcArr.map(callbackfn);
assert.sameValue(resArr.length, 10, 'resArr.length');
assert.sameValue(callCnt, 2, 'callCnt');