< prev index next >

test/java/lang/invoke/VarHandles/X-VarHandleTestMethodHandleAccess.java.template

Print this page

        

*** 253,263 **** // get and add, add and get { $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(recv, $value3$); assertEquals(o, $value1$, "getAndAdd $type$"); $type$ c = ($type$) hs.get(TestAccessMode.ADD_AND_GET).invokeExact(recv, $value3$); ! assertEquals(c, $value1$ + $value3$ + $value3$, "getAndAdd $type$ value"); } #end[AtomicAdd] } static void testInstanceFieldUnsupported(VarHandleTestMethodHandleAccess$Type$ recv, Handles hs) throws Throwable { --- 253,263 ---- // get and add, add and get { $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(recv, $value3$); assertEquals(o, $value1$, "getAndAdd $type$"); $type$ c = ($type$) hs.get(TestAccessMode.ADD_AND_GET).invokeExact(recv, $value3$); ! assertEquals(c, ($type$)($value1$ + $value3$ + $value3$), "getAndAdd $type$ value"); } #end[AtomicAdd] } static void testInstanceFieldUnsupported(VarHandleTestMethodHandleAccess$Type$ recv, Handles hs) throws Throwable {
*** 426,436 **** // get and add, add and get { $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_ADD).invokeExact( $value3$); assertEquals(o, $value1$, "getAndAdd $type$"); $type$ c = ($type$) hs.get(TestAccessMode.ADD_AND_GET).invokeExact($value3$); ! assertEquals(c, $value1$ + $value3$ + $value3$, "getAndAdd $type$ value"); } #end[AtomicAdd] } static void testStaticFieldUnsupported(Handles hs) throws Throwable { --- 426,436 ---- // get and add, add and get { $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_ADD).invokeExact( $value3$); assertEquals(o, $value1$, "getAndAdd $type$"); $type$ c = ($type$) hs.get(TestAccessMode.ADD_AND_GET).invokeExact($value3$); ! assertEquals(c, ($type$)($value1$ + $value3$ + $value3$), "getAndAdd $type$ value"); } #end[AtomicAdd] } static void testStaticFieldUnsupported(Handles hs) throws Throwable {
*** 602,612 **** // get and add, add and get { $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(array, i, $value3$); assertEquals(o, $value1$, "getAndAdd $type$"); $type$ c = ($type$) hs.get(TestAccessMode.ADD_AND_GET).invokeExact(array, i, $value3$); ! assertEquals(c, $value1$ + $value3$ + $value3$, "getAndAdd $type$ value"); } #end[AtomicAdd] } } --- 602,612 ---- // get and add, add and get { $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(array, i, $value3$); assertEquals(o, $value1$, "getAndAdd $type$"); $type$ c = ($type$) hs.get(TestAccessMode.ADD_AND_GET).invokeExact(array, i, $value3$); ! assertEquals(c, ($type$)($value1$ + $value3$ + $value3$), "getAndAdd $type$ value"); } #end[AtomicAdd] } }
< prev index next >