MCPcopy Index your code
hub / github.com/java-native-access/jna / testRegisterMethods

Method testRegisterMethods

test/com/sun/jna/DirectTest.java:141–153  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

139 }
140
141 public void testRegisterMethods() throws Exception {
142 if (Platform.isAIX()) {
143 // https://stackoverflow.com/questions/8961441/java-system-loadlibrarym-fails-on-aix-6-1
144 System.out.println("Skip " + getName() + " - libm can't be dynamically linked on AIX");
145 return;
146 }
147 assertEquals("Math library call failed", 1., MathLibrary.cos(0), .01);
148 assertTrue("Library not registered",
149 Native.registered(MathLibrary.class));
150 Native.unregister(MathLibrary.class);
151 assertFalse("Registered methods not unregistered",
152 Native.registered(MathLibrary.class));
153 }
154
155 private Class<?> returnCallingClass() {
156 return Native.getCallingClass();

Callers

nothing calls this directly

Calls 5

isAIXMethod · 0.95
cosMethod · 0.95
registeredMethod · 0.95
unregisterMethod · 0.95
getNameMethod · 0.65

Tested by

no test coverage detected