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

Method testFindInterfaceClass

test/com/sun/jna/NativeTest.java:234–245  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

232 }
233
234 public void testFindInterfaceClass() throws Exception {
235 Class<?> interfaceClass = TestInterface.class;
236 Class<?> cls = TestInterface.InnerTestClass.class;
237 Class<?> subClass = TestInterface.InnerTestClass.InnerSubclass.class;
238 Class<?> callbackClass = TestInterface.InnerTestClass.TestCallback.class;
239 assertEquals("Enclosing interface not found for class",
240 interfaceClass, Native.findEnclosingLibraryClass(cls));
241 assertEquals("Enclosing interface not found for derived class",
242 interfaceClass, Native.findEnclosingLibraryClass(subClass));
243 assertEquals("Enclosing interface not found for callback",
244 interfaceClass, Native.findEnclosingLibraryClass(callbackClass));
245 }
246
247 public interface TestInterfaceWithInstance extends Library {
248 int TEST_ALIGNMENT = Structure.ALIGN_NONE;

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected