Debian Codegraph @

rhino/testsrc/tests/e4x/GC/regress-313952-02.js

raw symbols SCIP
1 /* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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-313952-02.js';
7
8 var summary = "13.3.5.2 - root QName.uri";
9 var BUGNUMBER = 313952;
10 var actual = '';
11 var expect = '';
12
13 printBugNumber(BUGNUMBER);
14 START(summary);
15
16 var str = String(1);
17 var expected = String(1);
18
19 var x = new XML("text");
20
21 x.function::toString = function() {
22 var tmp = str;
23 str = null;
24 return tmp;
25 }
26
27 var TWO = 2.0;
28
29 var likeString = {
30 toString: function() {
31 var tmp = new XML("");
32 tmp = (tmp == "string");
33 if (typeof gc == "function")
34 gc();
35 for (var i = 0; i != 40000; ++i) {
36 tmp = 1e100 * TWO;
37 tmp = null;
38 }
39 return expected;
40 }
41 }
42
43 TEST(1, true, x == likeString);
44
45 END();