MCPcopy Create free account
hub / github.com/java-native-access/jna / assertLibraryExists

Method assertLibraryExists

test/com/sun/jna/JNALoadTest.java:79–89  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

77 }
78
79 protected void assertLibraryExists() {
80 String osPrefix = Platform.getNativeLibraryResourcePrefix();
81 String name = System.mapLibraryName("jnidispatch").replace(".dylib", ".jnilib");
82 if(Platform.isAIX()) {
83 name = name.replaceAll(".so$", ".a");
84 }
85 File lib = new File(CLASSES + "/com/sun/jna/" + osPrefix + "/" + name);
86 if (!lib.exists()) {
87 throw new Error("Expected JNA library at " + lib + " is missing");
88 }
89 }
90
91 public void testAvoidJarUnpacking() throws Exception {
92 System.setProperty("jna.nounpack", "true");

Callers 1

TestLoaderMethod · 0.80

Calls 3

isAIXMethod · 0.95
replaceMethod · 0.80

Tested by

no test coverage detected