Debian Codegraph @

rhino/testsrc/tests/js1_5/extensions/regress-352372.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-352372.js';
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 352372;
9 var summary = 'Do not assert eval("setter/*...")';
10 var actual = 'No Crash';
11 var expect = 'No Crash';
12
13
14 //-----------------------------------------------------------------------------
15 test();
16 //-----------------------------------------------------------------------------
17
18 function test()
19 {
20 enterFunc ('test');
21 printBugNumber(BUGNUMBER);
22 printStatus (summary);
23
24 expect = 'ReferenceError: setter is not defined';
25 try
26 {
27 eval("setter/*\n*/;");
28 }
29 catch(ex)
30 {
31 actual = ex + '';
32 }
33 reportCompare(expect, actual, 'eval("setter/*\n*/;")');
34
35 try
36 {
37 eval("setter/*\n*/g");
38 }
39 catch(ex)
40 {
41 actual = ex + '';
42 }
43 reportCompare(expect, actual, 'eval("setter/*\n*/g")');
44
45 try
46 {
47 eval("setter/*\n*/ ;");
48 }
49 catch(ex)
50 {
51 actual = ex + '';
52 }
53 reportCompare(expect, actual, 'eval("setter/*\n*/ ;")');
54
55 try
56 {
57 eval("setter/*\n*/ g");
58 }
59 catch(ex)
60 {
61 actual = ex + '';
62 }
63 reportCompare(expect, actual, 'eval("setter/*\n*/ g")');
64
65 exitFunc ('test');
66 }