< prev index next >

test/jdk/java/lang/invoke/VarHandles/VarHandleTestExact.java

Print this page
*** 21,11 ***
   * questions.
   */
  
  /*
   * @test
-  * @enablePreview
   * @modules java.base/jdk.internal.access.foreign
   * @modules java.base/jdk.internal.foreign.layout
   *
   * @run testng/othervm -Xverify:all
   *   -Djdk.internal.foreign.SHOULD_ADAPT_HANDLES=false
--- 21,10 ---

*** 169,11 ***
              ".*\\Qhandle's method type (ByteBuffer,int," + arrayClass.componentType().getSimpleName() + ")void \\E.*");
      }
  
      @Test(dataProvider = "dataSetMemorySegment")
      public void testExactSegmentSet(Class<?> carrier, Object testValue, SetSegmentX setter) {
!         VarHandle vh = MethodHandles.memorySegmentViewVarHandle(ValueLayouts.valueLayout(carrier, ByteOrder.nativeOrder()));
          try (Arena arena = Arena.ofConfined()) {
              MemorySegment seg = arena.allocate(8);
              doTest(vh,
                  tvh -> tvh.set(seg, 0L, testValue),
                  tvh -> setter.set(tvh, seg, 0L, testValue),
--- 168,11 ---
              ".*\\Qhandle's method type (ByteBuffer,int," + arrayClass.componentType().getSimpleName() + ")void \\E.*");
      }
  
      @Test(dataProvider = "dataSetMemorySegment")
      public void testExactSegmentSet(Class<?> carrier, Object testValue, SetSegmentX setter) {
!         VarHandle vh = ValueLayouts.valueLayout(carrier, ByteOrder.nativeOrder()).varHandle();
          try (Arena arena = Arena.ofConfined()) {
              MemorySegment seg = arena.allocate(8);
              doTest(vh,
                  tvh -> tvh.set(seg, 0L, testValue),
                  tvh -> setter.set(tvh, seg, 0L, testValue),
< prev index next >