2627282930313233
public class HelloWorldJNITest { @Test public final void testNativeHelloWorldJNI() throws Exception { HelloWorldJNI app = new HelloWorldJNI(); Assert.assertEquals( "Hello NAR World!", app.sayHello() ); }
3334353637383940
} @Test public final void testNativeTimesWorldJNI() throws Exception { HelloWorldJNI app = new HelloWorldJNI(); Assert.assertEquals( 35, app.timesHello(5, 7)); }
23242526272829
public class Hello { public static int times(int x, int y) { return new HelloWorldJNI().timesHello(x, y); }
262728293031323334
public class HelloWorldJavaDepJNITest { @Test public final void testNativeHelloWorldJavaDepJNI() throws Exception { HelloWorldJNI app = new HelloWorldJNI(); Assert.assertEquals( "Hello NAR World!", app.sayHello() ); }
public class HelloThirdPartyJNITest { @Test public final void testNativeHelloThirdPartyJNI() throws Exception { HelloWorldJNI app = new HelloWorldJNI(); Assert.assertEquals( "Hello NAR World!", app.sayHello() ); }