hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestShort.java
changeset 36316 7a83de7aabca
parent 35103 d19354bcbfa6
child 36827 53d2d43551d2
--- a/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestShort.java	Tue Feb 23 17:59:27 2016 +0100
+++ b/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestShort.java	Tue Feb 23 22:09:41 2016 +0300
@@ -157,6 +157,20 @@
         }
 
 
+        // Lazy
+        {
+            UNSAFE.putShortRelease(base, offset, (short)1);
+            short x = UNSAFE.getShortAcquire(base, offset);
+            assertEquals(x, (short)1, "putRelease short value");
+        }
+
+        // Opaque
+        {
+            UNSAFE.putShortOpaque(base, offset, (short)2);
+            short x = UNSAFE.getShortOpaque(base, offset);
+            assertEquals(x, (short)2, "putOpaque short value");
+        }
+
         // Unaligned
         {
             UNSAFE.putShortUnaligned(base, offset, (short)2);