Imported Upstream version 1.0.0
[platform/upstream/js.git] / js / src / tests / js1_5 / Regress / regress-449666.js
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3  * Any copyright is dedicated to the Public Domain.
4  * http://creativecommons.org/licenses/publicdomain/
5  * Contributor: Robert Sayre
6  */
7
8 //-----------------------------------------------------------------------------
9 var BUGNUMBER = 449666;
10 var summary = 'Do not assert: JSSTRING_IS_FLAT(str_)';
11 var actual = '';
12 var expect = '';
13
14
15 //-----------------------------------------------------------------------------
16 test();
17 //-----------------------------------------------------------------------------
18
19 function test()
20 {
21   enterFunc ('test');
22   printBugNumber(BUGNUMBER);
23   printStatus (summary);
24
25   var global;
26
27   jit(true);
28
29   if (typeof window == 'undefined') {
30     global = this;
31   }
32   else {
33     global = window;
34   }
35
36   if (!global['g']) {
37     global['g'] = {};
38   }
39
40   if (!global['g']['l']) {
41     global['g']['l'] = {};
42     (function() {
43       function k(a,b){
44         var c=a.split(/\./);
45         var d=global;
46         for(var e=0;e<c.length-1;e++){
47           if(!d[c[e]]){
48             d[c[e]]={};
49           }
50           d=d[c[e]];
51         }
52         d[c[c.length-1]]=b;
53         print("hi");
54       }
55
56       function T(a){return "hmm"}
57       k("g.l.loaded",T);
58     })();
59
60   }
61
62   jit(false);
63
64   reportCompare(expect, actual, summary);
65
66   exitFunc ('test');
67 }