jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsFloat.java
changeset 38368 c8eb5d6812c5
parent 38358 cb99c6d2af1b
parent 38328 40435a469d25
child 38382 98d5a441bc2f
equal deleted inserted replaced
38367:21801e8e9344 38368:c8eb5d6812c5
    25  * @test
    25  * @test
    26  * @bug 8154556
    26  * @bug 8154556
    27  * @run testng/othervm -Diters=20000 -XX:TieredStopAtLevel=1 VarHandleTestByteArrayAsFloat
    27  * @run testng/othervm -Diters=20000 -XX:TieredStopAtLevel=1 VarHandleTestByteArrayAsFloat
    28  * @run testng/othervm -Diters=20000                         VarHandleTestByteArrayAsFloat
    28  * @run testng/othervm -Diters=20000                         VarHandleTestByteArrayAsFloat
    29  * @run testng/othervm -Diters=20000 -XX:-TieredCompilation  VarHandleTestByteArrayAsFloat
    29  * @run testng/othervm -Diters=20000 -XX:-TieredCompilation  VarHandleTestByteArrayAsFloat
       
    30  * @run testng/othervm -Diters=20000 -Djava.lang.invoke.VarHandle.VAR_HANDLE_GUARDS=false VarHandleTestByteArrayAsFloat
    30  */
    31  */
    31 
    32 
    32 import org.testng.annotations.DataProvider;
    33 import org.testng.annotations.DataProvider;
    33 import org.testng.annotations.Test;
    34 import org.testng.annotations.Test;
    34 
    35 
   252             });
   253             });
   253 
   254 
   254             checkROBE(() -> {
   255             checkROBE(() -> {
   255                 float o = (float) vh.getAndSet(array, ci, VALUE_1);
   256                 float o = (float) vh.getAndSet(array, ci, VALUE_1);
   256             });
   257             });
   257             checkUOE(() -> {
   258 
   258                 boolean r = vh.compareAndSet(array, ci, VALUE_1, VALUE_2);
       
   259             });
       
   260 
   259 
   261             checkUOE(() -> {
   260             checkUOE(() -> {
   262                 float o = (float) vh.getAndAdd(array, ci, VALUE_1);
   261                 float o = (float) vh.getAndAdd(array, ci, VALUE_1);
   263             });
   262             });
   264 
   263