Debian Codegraph @

rhino/testsrc/tests/js1_5/Regress/regress-102725.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 /*
7 * Date: 09 October 2001
8 *
9 * SUMMARY: Regression test for Bugzilla bug 102725
10 * See http://bugzilla.mozilla.org/show_bug.cgi?id=102725
11 * "gcc -O2 problems converting numbers to strings"
12 *
13 */
14 //-----------------------------------------------------------------------------
15 var gTestfile = 'regress-102725.js';
16 var UBound = 0;
17 var BUGNUMBER = 102725;
18 var summary = 'Testing converting numbers to strings';
19 var status = '';
20 var statusitems = [];
21 var actual = '';
22 var actualvalues = [];
23 var expect= '';
24 var expectedvalues = [];
25
26
27 /*
28 * Successive calls to foo.toString() were producing different answers!
29 */
30 status = inSection(1);
31 foo = (new Date()).getTime();
32 actual = foo.toString();
33 expect = foo.toString();
34 addThis();
35
36
37
38 //-----------------------------------------------------------------------------
39 test();
40 //-----------------------------------------------------------------------------
41
42
43
44 function addThis()
45 {
46 statusitems[UBound] = status;
47 actualvalues[UBound] = actual;
48 expectedvalues[UBound] = expect;
49 UBound++;
50 }
51
52
53 function test()
54 {
55 enterFunc ('test');
56 printBugNumber(BUGNUMBER);
57 printStatus (summary);
58
59 for (var i=0; i<UBound; i++)
60 {
61 reportCompare(expectedvalues[i], actualvalues[i], statusitems[i]);
62 }
63
64 exitFunc ('test');
65 }