blob: 49a86d8de09eccc8a7807fdf38a769c3650e0a2d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.map
description: >
Array.prototype.map - applied to String object, which implements
its own property get method
---*/
function callbackfn(val, idx, obj) {
return parseInt(val, 10) > 1;
}
var str = new String("432");
String.prototype[3] = "1";
var testResult = Array.prototype.map.call(str, callbackfn);
assert.sameValue(testResult.length, 3, 'testResult.length');
reportCompare(0, 0);
|