test/script/basic/JDK-8138632.js

Tue, 21 Mar 2017 13:41:57 -0700

author
asaha
date
Tue, 21 Mar 2017 13:41:57 -0700
changeset 2160
1df40fe54cd6
parent 1556
92bcafb57da3
permissions
-rw-r--r--

Merge

hannesw@1556 1 /*
hannesw@1556 2 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
hannesw@1556 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
hannesw@1556 4 *
hannesw@1556 5 * This code is free software; you can redistribute it and/or modify it
hannesw@1556 6 * under the terms of the GNU General Public License version 2 only, as
hannesw@1556 7 * published by the Free Software Foundation.
hannesw@1556 8 *
hannesw@1556 9 * This code is distributed in the hope that it will be useful, but WITHOUT
hannesw@1556 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
hannesw@1556 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
hannesw@1556 12 * version 2 for more details (a copy is included in the LICENSE file that
hannesw@1556 13 * accompanied this code).
hannesw@1556 14 *
hannesw@1556 15 * You should have received a copy of the GNU General Public License version
hannesw@1556 16 * 2 along with this work; if not, write to the Free Software Foundation,
hannesw@1556 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
hannesw@1556 18 *
hannesw@1556 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
hannesw@1556 20 * or visit www.oracle.com if you need additional information or have any
hannesw@1556 21 * questions.
hannesw@1556 22 */
hannesw@1556 23
hannesw@1556 24 /**
hannesw@1556 25 * JDK-8138632: Sparse array does not handle growth of underlying dense array
hannesw@1556 26 *
hannesw@1556 27 * @test
hannesw@1556 28 * @run
hannesw@1556 29 */
hannesw@1556 30
hannesw@1556 31 var x = [];
hannesw@1556 32 x[10000000] = 1;
hannesw@1556 33 x[10] = 1;
hannesw@1556 34 x[20] = 1;
hannesw@1556 35 print(Object.keys(x));

mercurial