Debian Codegraph @

rhino/testsrc/tests/js1_5/decompilation/regress-375882.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-375882.js';
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 375882;
9 var summary = 'Decompilation of switch with case 0/0';
10 var actual = '';
11 var expect = '';
12
13
14 //-----------------------------------------------------------------------------
15 test();
16 //-----------------------------------------------------------------------------
17
18 function test()
19 {
20 enterFunc ('test');
21 printBugNumber(BUGNUMBER);
22 printStatus (summary);
23
24 var f = function()
25 {
26 switch(a)
27 {
28 case 0/0: a;
29 case 1/0: b;
30 case -1/0: c;
31 case -0:
32 d;
33 }
34 };
35
36 expect = 'function ( ) { switch ( a ) { case 0 / 0 : a ; case 1 / 0 : b ; ' +
37 'case 1 / - 0 : c ; case - 0 : d ; default : ; } } ';
38
39 actual = f + '';
40
41 compareSource(expect, actual, summary);
42
43 exitFunc ('test');
44 }