Debian Codegraph @

rhino/testsrc/tests/ecma_3/Number/15.7.4.3-01.js

raw symbols SCIP
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
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 * BEGIN TEST *
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);