Debian Codegraph @

rhino/testsrc/tests/js1_5/Regress/regress-465347.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-465347.js';
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 465347;
9 var summary = 'Test integer to id in js_Int32ToId';
10 var actual = '';
11 var expect = '';
12
13
14 //-----------------------------------------------------------------------------
15 test();
16 //-----------------------------------------------------------------------------
17
18 function test()
19 {
20 enterFunc ('test');
21 printBugNumber(BUGNUMBER);
22 printStatus (summary);
23
24 var o;
25
26 o = new Array();
27
28 expect = undefined;
29 o[0xffffffff] = 'end';
30 actual = o[-1];
31 reportCompare(expect, actual, summary + ': 1');
32
33 expect = 42;
34 o['42'] = 42;
35 actual = o[42];
36 reportCompare(expect, actual, summary + ': 2');
37
38 //
39
40 o = new Object();
41
42 expect = undefined;
43 o[0xffffffff] = 'end';
44 actual = o[-1];
45 reportCompare(expect, actual, summary + ': 3');
46
47 expect = 42;
48 o['42'] = 42;
49 actual = o[42];
50 reportCompare(expect, actual, summary + ': 4');
51
52 exitFunc ('test');
53 }