Debian Codegraph @

rhino/testsrc/tests/js1_5/Regress/regress-10278.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-10278.js';
7 /**
8 * File Name: regress-10278.js
9 * Reference: https://bugzilla.mozilla.org/show_bug.cgi?id=10278
10 * Description: Function declarations do not need to be separated
11 * by semi-colon if they occur on the same line.
12 * Author: [email protected]
13 */
14 //-----------------------------------------------------------------------------
15 var BUGNUMBER = 10278;
16 var summary = 'Function declarations do not need to be separated by semi-colon';
17 var actual;
18 var expect;
19
20
21 //-----------------------------------------------------------------------------
22 test();
23 //-----------------------------------------------------------------------------
24
25 function test()
26 {
27 enterFunc ('test');
28 printBugNumber(BUGNUMBER);
29 printStatus (summary);
30
31 expect = 'pass';
32 try
33 {
34 eval("function f(){}function g(){}");
35 actual = "pass";
36 printStatus('no exception thrown');
37 }
38 catch ( e )
39 {
40 actual = "fail";
41 printStatus('exception ' + e.toString() + ' thrown');
42 }
43
44 reportCompare(expect, actual, summary);
45
46 exitFunc ('test');
47 }