js/src/tests/js1_5/Regress/regress-280769-2.js

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:ae27668f4312
1 // |reftest| skip-if(Android) silentfail
2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 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 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 280769;
9 var summary = 'Do not overflow 64K boundary in treeDepth';
10 var actual = 'No Crash';
11 var expect = /No Crash|InternalError: allocation size overflow/;
12 var status;
13 var result;
14
15 printBugNumber(BUGNUMBER);
16 printStatus (summary);
17
18 expectExitCode(0);
19 expectExitCode(5);
20
21 status = summary + ' ' + inSection(1) + ' (new RegExp("0|...|99999") ';
22
23 try
24 {
25 var N = 100 * 1000;
26 var a = new Array(N);
27 for (var i = 0; i != N; ++i) {
28 a[i] = i;
29 }
30 var str = a.join('|'); // str is 0|1|2|3|...|<printed value of N -1>
31 var re = new RegExp(str);
32 re.exec(N - 1);
33 }
34 catch(ex)
35 {
36 actual = ex + '';
37 }
38
39 print('Done: ' + actual);
40
41 reportMatch(expect, actual, summary);
42
43
44

mercurial