Debian Codegraph @

rhino/testsrc/org/mozilla/javascript/tests/Bug492525Test.java

raw symbols SCIP
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5 package org.mozilla.javascript.tests;
6
7 import org.junit.Test;
8 import static org.junit.Assert.assertArrayEquals;
9 import org.mozilla.javascript.NativeArray;
10
11 public class Bug492525Test {
12 @Test
13 public void getAllIdsShouldIncludeArrayIndices() {
14 NativeArray array = new NativeArray(new String[]{"a", "b"});
15 Object[] expectedIds = new Object[] {0, 1, "length"};
16 Object[] actualIds = array.getAllIds();
17 assertArrayEquals(expectedIds, actualIds);
18 }
19 }