| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
var gTestfile = '15.7.4.3-01.js'; |
| 7 |
|
| 8 |
var BUGNUMBER = "412068"; |
| 9 |
var summary = "num.toLocaleString incorrectly accesses its first argument " + |
| 10 |
"even when no first argument has been given"; |
| 11 |
var actual, expect; |
| 12 |
|
| 13 |
printBugNumber(BUGNUMBER); |
| 14 |
printStatus(summary); |
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
var failed = false; |
| 21 |
|
| 22 |
try |
| 23 |
{ |
| 24 |
if ("3" !== 3..toLocaleString()) |
| 25 |
throw '"3" should equal 3..toLocaleString()'; |
| 26 |
if ("9" !== 9..toLocaleString(8)) |
| 27 |
throw 'Number.prototype.toLocaleString should ignore its first argument'; |
| 28 |
} |
| 29 |
catch (e) |
| 30 |
{ |
| 31 |
failed = e; |
| 32 |
} |
| 33 |
|
| 34 |
expect = false; |
| 35 |
actual = failed; |
| 36 |
|
| 37 |
reportCompare(expect, actual, summary); |