test/jdk/java/lang/invoke/VarHandles/VarHandleTestAccessByte.java
changeset 53284 a995647f4911
parent 52914 4fa75d8ad418
child 53662 26ecda724028
equal deleted inserted replaced
53283:f7491df4fd3a 53284:a995647f4911
     1 /*
     1 /*
     2  * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   139 
   139 
   140         for (int i = 0; i < vhs1.length; i++) {
   140         for (int i = 0; i < vhs1.length; i++) {
   141             for (int j = 0; j < vhs1.length; j++) {
   141             for (int j = 0; j < vhs1.length; j++) {
   142                 if (i == j) {
   142                 if (i == j) {
   143                     assertEquals(vhs1[i], vhs1[i]);
   143                     assertEquals(vhs1[i], vhs1[i]);
   144                     assertEquals(vhs1[i], vhs2[i]);
       
   145                     assertEquals(vhs1[i].hashCode(), vhs2[i].hashCode());
       
   146                 }
   144                 }
   147                 else {
   145                 else {
   148                     assertNotEquals(vhs1[i], vhs1[j]);
   146                     assertNotEquals(vhs1[i], vhs1[j]);
   149                     assertNotEquals(vhs1[i], vhs2[j]);
   147                     assertNotEquals(vhs1[i], vhs2[j]);
   150                 }
   148                 }