Debian Codegraph @

rhino/testsrc/tests/js1_5/Date/regress-188211.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 = 'regress-188211.js';
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 188211;
9 var summary = 'Date.prototype.toLocaleString() error on future dates';
10 var actual = '';
11 var expect = '';
12
13 printBugNumber(BUGNUMBER);
14 printStatus (summary);
15
16 var dt;
17
18 dt = new Date(208e10);
19 printStatus(dt+'');
20 expect = true;
21 actual = dt.toLocaleString().indexOf('2035') >= 0;
22 reportCompare(expect, actual, summary + ': new Date(208e10)');
23
24 dt = new Date(209e10);
25 printStatus(dt+'');
26 expect = true;
27 actual = dt.toLocaleString().indexOf('2036') >= 0;
28 reportCompare(expect, actual, summary + ': new Date(209e10)');