| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
var gTestfile = 'regress-352742-01.js'; |
| 7 |
|
| 8 |
var BUGNUMBER = 352742; |
| 9 |
var summary = 'Array filter on {valueOf: Function}'; |
| 10 |
var actual = ''; |
| 11 |
var expect = ''; |
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
test(); |
| 16 |
|
| 17 |
|
| 18 |
function test() |
| 19 |
{ |
| 20 |
enterFunc ('test'); |
| 21 |
printBugNumber(BUGNUMBER); |
| 22 |
printStatus (summary); |
| 23 |
|
| 24 |
print('If the test harness fails, this test fails.'); |
| 25 |
expect = 4; |
| 26 |
z = {valueOf: Function}; |
| 27 |
actual = 2; |
| 28 |
try { |
| 29 |
[11].filter(z); |
| 30 |
} |
| 31 |
catch(e) |
| 32 |
{ |
| 33 |
actual = 3; |
| 34 |
print(e); |
| 35 |
} |
| 36 |
actual = 4; |
| 37 |
|
| 38 |
reportCompare(expect, actual, summary); |
| 39 |
|
| 40 |
exitFunc ('test'); |
| 41 |
} |