hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestChar.java
changeset 36316 7a83de7aabca
parent 35103 d19354bcbfa6
child 36827 53d2d43551d2
--- a/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestChar.java	Tue Feb 23 17:59:27 2016 +0100
+++ b/hotspot/test/compiler/unsafe/JdkInternalMiscUnsafeAccessTestChar.java	Tue Feb 23 22:09:41 2016 +0300
@@ -157,6 +157,20 @@
         }
 
 
+        // Lazy
+        {
+            UNSAFE.putCharRelease(base, offset, 'a');
+            char x = UNSAFE.getCharAcquire(base, offset);
+            assertEquals(x, 'a', "putRelease char value");
+        }
+
+        // Opaque
+        {
+            UNSAFE.putCharOpaque(base, offset, 'b');
+            char x = UNSAFE.getCharOpaque(base, offset);
+            assertEquals(x, 'b', "putOpaque char value");
+        }
+
         // Unaligned
         {
             UNSAFE.putCharUnaligned(base, offset, 'b');