< prev index next >

test/jdk/com/sun/tools/jextract/JextractToolProviderTest.java

Print this page




 423         } finally {
 424             deleteFile(nestedJar);
 425         }
 426     }
 427 
 428     @Test
 429     public void testAnonymousStructTypeGlobalVar() {
 430         Path elaboratedTypeJar = getOutputFilePath("elaboratedtype.jar");
 431         deleteFile(elaboratedTypeJar);
 432         Path elaboratedTypeH = getInputFilePath("elaboratedtype.h");
 433         try {
 434             checkSuccess(null, "-o", elaboratedTypeJar.toString(), elaboratedTypeH.toString());
 435             Class<?> headerCls = loadClass("elaboratedtype", elaboratedTypeJar);
 436             assertNotNull(findGlobalVariableGet(headerCls, "point"));
 437             assertNotNull(findGlobalVariableGet(headerCls, "long_or_int"));
 438             assertNotNull(findMethod(headerCls, "func", Pointer.class));
 439         } finally {
 440             deleteFile(elaboratedTypeJar);
 441         }
 442     }









 443 }


 423         } finally {
 424             deleteFile(nestedJar);
 425         }
 426     }
 427 
 428     @Test
 429     public void testAnonymousStructTypeGlobalVar() {
 430         Path elaboratedTypeJar = getOutputFilePath("elaboratedtype.jar");
 431         deleteFile(elaboratedTypeJar);
 432         Path elaboratedTypeH = getInputFilePath("elaboratedtype.h");
 433         try {
 434             checkSuccess(null, "-o", elaboratedTypeJar.toString(), elaboratedTypeH.toString());
 435             Class<?> headerCls = loadClass("elaboratedtype", elaboratedTypeJar);
 436             assertNotNull(findGlobalVariableGet(headerCls, "point"));
 437             assertNotNull(findGlobalVariableGet(headerCls, "long_or_int"));
 438             assertNotNull(findMethod(headerCls, "func", Pointer.class));
 439         } finally {
 440             deleteFile(elaboratedTypeJar);
 441         }
 442     }
 443 
 444     @Test
 445     public void testBuiltinHeader() {
 446         Path stdargincJar = getOutputFilePath("stdarginc.jar");
 447         deleteFile(stdargincJar);
 448         Path stdargincH = getInputFilePath("stdarginc.h");
 449         checkSuccess(null, "-o", stdargincJar.toString(), stdargincH.toString());
 450         deleteFile(stdargincJar);
 451     }
 452 }
< prev index next >