Debian Codegraph @

rhino/testsrc/tests/e4x/XML/regress-324422-2.js

raw symbols SCIP
1 /* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7 gTestfile = 'regress-324422-2.js';
8
9 var summary = "Do not crash creating XML object with long initialiser";
10 var BUGNUMBER = 324422;
11 var actual = 'No Crash';
12 var expect = 'No Crash';
13
14 printBugNumber(BUGNUMBER);
15 START(summary);
16 printStatus ("Expect out of memory or script stack space quota is exhausted error");
17
18 expectExitCode(0);
19 expectExitCode(3);
20
21 try
22 {
23 var str = '0123456789';
24
25 for (var icount = 0; icount < 24; icount++)
26 {
27 str = str + str;
28 }
29
30 printStatus(str.length);
31
32 var x = new XML('<root>' + str + '</root>');
33 }
34 catch(ex)
35 {
36 print(ex + '');
37 }
38 TEST(1, expect, actual);
39
40 END();