| 37 | |
| 38 | //@SuppressWarnings("unused") |
| 39 | public class PerformanceTest extends TestCase implements Paths { |
| 40 | |
| 41 | public void testEmpty() { } |
| 42 | |
| 43 | private static class JNILibrary { |
| 44 | static { |
| 45 | String path = TESTPATH + NativeLibrary.mapSharedLibraryName("testlib");; |
| 46 | if (!new File(path).isAbsolute()) { |
| 47 | path = new File(path).getAbsolutePath(); |
| 48 | } |
| 49 | System.load(path); |
| 50 | } |
| 51 | |
| 52 | private static native double cos(double x); |
| 53 | private static native int getpid(); |
| 54 | } |
| 55 | |
| 56 | public static void main(java.lang.String[] argList) { |
| 57 | checkPerformance(); |
| 58 | } |
| 59 | |
| 60 | static class MathLibrary { |
| 61 | |
| 62 | public static native double cos(double x); |
| 63 | |
| 64 | static { |
| 65 | Native.register(Platform.MATH_LIBRARY_NAME); |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | interface MathInterface extends Library { |
| 70 | double cos(double x); |
| 71 | } |
| 72 | |
| 73 | static class CLibrary { |
| 74 | public static class size_t extends IntegerType { |
| 75 | private static final long serialVersionUID = 1L; |
| 76 | |
| 77 | public size_t() { |
| 78 | super(Native.POINTER_SIZE); |
| 79 | } |
| 80 | public size_t(long value) { |
| 81 | super(Native.POINTER_SIZE, value); |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | public static native Pointer memset(Pointer p, int v, size_t len); |
| 86 | public static native Pointer memset(Pointer p, int v, int len); |
| 87 | public static native Pointer memset(Pointer p, int v, long len); |
| 88 | public static native long memset(long p, int v, long len); |
| 89 | public static native int memset(int p, int v, int len); |
| 90 | public static native int strlen(String s1); |
| 91 | public static native int strlen(Pointer p); |
| 92 | public static native int strlen(byte[] b); |
| 93 | public static native int strlen(Buffer b); |
| 94 | |
| 95 | static { |
| 96 | Native.register(Platform.C_LIBRARY_NAME); |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…