< prev index next >

test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaType.java

Print this page
*** 207,11 ***
          String javaName = lambda.getClass().getName();
          assertEquals(typeName, toInternalName(javaName));
          assertEquals(javaName, internalNameToJava(typeName, true, true));
      }
  
!     @Test
      public void getModifiersTest() {
          for (Class<?> c : classes) {
              ResolvedJavaType type = metaAccess.lookupJavaType(c);
              int mask = Modifier.classModifiers() & ~Modifier.STATIC;
              int expected = c.getModifiers() & mask;
--- 207,12 ---
          String javaName = lambda.getClass().getName();
          assertEquals(typeName, toInternalName(javaName));
          assertEquals(javaName, internalNameToJava(typeName, true, true));
      }
  
!     // TODO 8291719
+     // @Test
      public void getModifiersTest() {
          for (Class<?> c : classes) {
              ResolvedJavaType type = metaAccess.lookupJavaType(c);
              int mask = Modifier.classModifiers() & ~Modifier.STATIC;
              int expected = c.getModifiers() & mask;

*** 285,11 ***
      public void getInterfacesTest() {
          for (Class<?> c : classes) {
              ResolvedJavaType type = metaAccess.lookupJavaType(c);
              Class<?>[] expected = c.getInterfaces();
              ResolvedJavaType[] actual = type.getInterfaces();
!             assertEquals(expected.length, actual.length);
              for (int i = 0; i < expected.length; i++) {
                  assertTrue(actual[i].equals(metaAccess.lookupJavaType(expected[i])));
              }
          }
      }
--- 286,13 ---
      public void getInterfacesTest() {
          for (Class<?> c : classes) {
              ResolvedJavaType type = metaAccess.lookupJavaType(c);
              Class<?>[] expected = c.getInterfaces();
              ResolvedJavaType[] actual = type.getInterfaces();
!             // With injection of the IdentityObject interface by the JVM, the number of
+             // interfaces visible through reflection and through JVMCI could differ by one
+             assertTrue(expected.length == actual.length || (actual.length - expected.length) == 1);
              for (int i = 0; i < expected.length; i++) {
                  assertTrue(actual[i].equals(metaAccess.lookupJavaType(expected[i])));
              }
          }
      }
< prev index next >