8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 4245470 7088913
27 * @summary Test the primitive wrappers hashCode()
28 */
29
30 import java.util.Objects;
31 import java.util.Random;
32
33 public class HashCode {
34
35 final Random rnd = new Random();
36
37 void testOrdinals(String args[]) throws Exception {
38 long[] longs = {
39 Long.MIN_VALUE,
40 Integer.MIN_VALUE,
41 Short.MIN_VALUE,
42 Character.MIN_VALUE,
43 Byte.MIN_VALUE,
44 -1, 0, 1,
45 Byte.MAX_VALUE,
46 Character.MAX_VALUE,
47 Short.MAX_VALUE,
|
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 4245470 7088913
27 * @summary Test the primitive wrappers hashCode()
28 * @key randomness
29 */
30
31 import java.util.Objects;
32 import java.util.Random;
33
34 public class HashCode {
35
36 final Random rnd = new Random();
37
38 void testOrdinals(String args[]) throws Exception {
39 long[] longs = {
40 Long.MIN_VALUE,
41 Integer.MIN_VALUE,
42 Short.MIN_VALUE,
43 Character.MIN_VALUE,
44 Byte.MIN_VALUE,
45 -1, 0, 1,
46 Byte.MAX_VALUE,
47 Character.MAX_VALUE,
48 Short.MAX_VALUE,
|