Debian Codegraph @

rhino/testsrc/tests/js1_5/Regress/regress-203402.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 *
8 * Date: 28 April 2003
9 * SUMMARY: Testing the ternary query operator
10 *
11 * See http://bugzilla.mozilla.org/show_bug.cgi?id=203402
12 *
13 */
14 //-----------------------------------------------------------------------------
15 var gTestfile = 'regress-203402.js';
16 var UBound = 0;
17 var BUGNUMBER = 203402;
18 var summary = 'Testing the ternary query operator';
19 var status = '';
20 var statusitems = [];
21 var actual = '';
22 var actualvalues = [];
23 var expect= '';
24 var expectedvalues = [];
25
26
27 // This used to crash the Rhino optimized shell -
28 status = inSection(1);
29 actual = "" + (1==0) ? "" : "";
30 expect = "";
31 addThis();
32
33
34
35 //-----------------------------------------------------------------------------
36 test();
37 //-----------------------------------------------------------------------------
38
39
40
41 function addThis()
42 {
43 statusitems[UBound] = status;
44 actualvalues[UBound] = actual;
45 expectedvalues[UBound] = expect;
46 UBound++;
47 }
48
49
50 function test()
51 {
52 enterFunc('test');
53 printBugNumber(BUGNUMBER);
54 printStatus(summary);
55
56 for (var i=0; i<UBound; i++)
57 {
58 reportCompare(expectedvalues[i], actualvalues[i], statusitems[i]);
59 }
60
61 exitFunc ('test');
62 }