Debian Codegraph @

rhino/testsrc/tests/e4x/Regress/regress-352103.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 gTestfile = 'regress-352103.js';
7
8 //-----------------------------------------------------------------------------
9 var BUGNUMBER = "352103";
10 var summary = "<??> XML initializer should generate a SyntaxError";
11 var actual, expect;
12
13 printBugNumber(BUGNUMBER);
14 START(summary);
15
16 /**************
17 * BEGIN TEST *
18 **************/
19
20 var failed = false;
21
22 try
23 {
24 try
25 {
26 eval("var x = <??>;"); // force non-compile-time exception
27 throw "No SyntaxError thrown!";
28 }
29 catch (e)
30 {
31 if (!(e instanceof SyntaxError))
32 throw "Unexpected exception: " + e;
33 }
34 }
35 catch (ex)
36 {
37 failed = ex;
38 }
39
40 expect = false;
41 actual = failed;
42
43 TEST(1, expect, actual);