Debian Codegraph @

rhino/testsrc/tests/e4x/Statements/12.3-01.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 = '12.3-01.js';
7
8 var summary = '12.3 - for-each-in should not affect for-in';
9 var BUGNUMBER = 292020;
10 var actual = '';
11 var expect = '';
12
13 printBugNumber(BUGNUMBER);
14 START(summary);
15
16 // test here
17 function foreachbug()
18 {
19 var arryOuter = ["outervalue0", "outervalue1"];
20 var arryInner = ["innervalue1","innervalue2"];
21
22 for (var j in arryOuter)
23 {
24 var result = (j in arryOuter);
25 if (!result)
26 {
27 return ("enumerated property not in object: (" +
28 j + " in arryOuter) " + result);
29 return result;
30 }
31
32
33 for each (k in arryInner)
34 {
35 // this for-each-in should not affect the outer for-in
36 }
37 }
38 return '';
39 }
40
41 TEST(1, '', foreachbug());
42
43 END();