< prev index next >

test/jdk/java/lang/Class/GenericStringTest.java

Print this page
*** 23,10 ***
--- 23,13 ---
  
  /*
   * @test
   * @bug 6298888 6992705 8161500 6304578 8322878
   * @summary Check Class.toGenericString()
+  * @enablePreview
+  * @compile GenericStringTest.java
+  * @run main/othervm GenericStringTest
   */
  
  import java.lang.reflect.*;
  import java.lang.annotation.*;
  import java.util.*;

*** 84,10 ***
--- 87,11 ---
          for(Class<?> clazz : List.of(GenericStringTest.class,
                                       AnInterface.class,
                                       LocalMap.class,
                                       AnEnum.class,
                                       AnotherEnum.class,
+                                      AValueClass.class,
  
                                       SealedRootClass.class,
                                       SealedRootClass.ChildA.class,
                                       SealedRootClass.ChildB.class,
                                       SealedRootClass.ChildB.GrandChildAB.class,

*** 154,10 ***
--- 158,13 ---
  @ExpectedGenericString("sealed enum AnotherEnum")
  enum AnotherEnum {
      BAR{};
  }
  
+ @ExpectedGenericString("final value class AValueClass<E>")
+ value class AValueClass<E> {}
+ 
  // Test cases for sealed/non-sealed _class_ hierarchy.
  @ExpectedGenericString("sealed class SealedRootClass")
  sealed class SealedRootClass
      permits
      SealedRootClass.ChildA,
< prev index next >