()
| 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(); |
nothing calls this directly
no test coverage detected