From 4c6faa3940488b1dc15ab5d2c75d4e61ddd24ca2 Mon Sep 17 00:00:00 2001 From: Mark Donszelmann Date: Tue, 6 Oct 2009 16:55:06 +0200 Subject: Fixed test 6, 8 and 9 --- .../jni-dep-lib-shared/pom.xml | 72 ---------------------- .../src/main/c/HelloWorldSharedLibJNI.c | 17 ----- .../mypackage/HelloWorldSharedLibJNI.java | 36 ----------- .../src/test/java/HelloWorldSharedLibJNITest.java | 52 ---------------- 4 files changed, 177 deletions(-) delete mode 100644 src/it/it0009-jni-dep-lib-shared/jni-dep-lib-shared/pom.xml delete mode 100644 src/it/it0009-jni-dep-lib-shared/jni-dep-lib-shared/src/main/c/HelloWorldSharedLibJNI.c delete mode 100644 src/it/it0009-jni-dep-lib-shared/jni-dep-lib-shared/src/main/java/com/mycompany/mypackage/HelloWorldSharedLibJNI.java delete mode 100644 src/it/it0009-jni-dep-lib-shared/jni-dep-lib-shared/src/test/java/HelloWorldSharedLibJNITest.java (limited to 'src/it/it0009-jni-dep-lib-shared/jni-dep-lib-shared') diff --git a/src/it/it0009-jni-dep-lib-shared/jni-dep-lib-shared/pom.xml b/src/it/it0009-jni-dep-lib-shared/jni-dep-lib-shared/pom.xml deleted file mode 100644 index 45d3487..0000000 --- a/src/it/it0009-jni-dep-lib-shared/jni-dep-lib-shared/pom.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - 4.0.0 - - - org.apache.maven.its.nar - it0009-pom - 1.0-SNAPSHOT - - - it0009-jni-dep-lib-shared - nar - - Maven NAR JNI - 1.0-SNAPSHOT - - JNI - - - - integration-test - - - maven-nar-plugin - true - - - - jni - com.mycompany.mypackage - false - - - - - - maven-surefire-plugin - - true - - - - - - - - org.apache.maven.its.nar - it0009-lib-shared - 1.0-SNAPSHOT - - - diff --git a/src/it/it0009-jni-dep-lib-shared/jni-dep-lib-shared/src/main/c/HelloWorldSharedLibJNI.c b/src/it/it0009-jni-dep-lib-shared/jni-dep-lib-shared/src/main/c/HelloWorldSharedLibJNI.c deleted file mode 100644 index e5b8e4b..0000000 --- a/src/it/it0009-jni-dep-lib-shared/jni-dep-lib-shared/src/main/c/HelloWorldSharedLibJNI.c +++ /dev/null @@ -1,17 +0,0 @@ -#include -#include "HelloWorldLib.h" - -#include "com_mycompany_mypackage_HelloWorldSharedLibJNI.h" - -JNIEXPORT jstring JNICALL Java_com_mycompany_mypackage_HelloWorldSharedLibJNI_sayHello( JNIEnv *env, jobject obj ) { - jstring value; /* the return value */ - - char buf[80]; /* working buffer (really only need 20 ) */ - - sprintf ( buf, "%s", HelloWorldLib_sayHello()); - - value = (*env)->NewStringUTF( env, buf ); - - return value; -} - diff --git a/src/it/it0009-jni-dep-lib-shared/jni-dep-lib-shared/src/main/java/com/mycompany/mypackage/HelloWorldSharedLibJNI.java b/src/it/it0009-jni-dep-lib-shared/jni-dep-lib-shared/src/main/java/com/mycompany/mypackage/HelloWorldSharedLibJNI.java deleted file mode 100644 index 0c64a53..0000000 --- a/src/it/it0009-jni-dep-lib-shared/jni-dep-lib-shared/src/main/java/com/mycompany/mypackage/HelloWorldSharedLibJNI.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.mycompany.mypackage; - -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -public class HelloWorldSharedLibJNI -{ - static - { - NarSystem.loadLibrary(); - } - - public native String sayHello(); - - public static void main( String[] args ) - { - HelloWorldSharedLibJNI app = new HelloWorldSharedLibJNI(); - System.out.println( app.sayHello() ); - } -} diff --git a/src/it/it0009-jni-dep-lib-shared/jni-dep-lib-shared/src/test/java/HelloWorldSharedLibJNITest.java b/src/it/it0009-jni-dep-lib-shared/jni-dep-lib-shared/src/test/java/HelloWorldSharedLibJNITest.java deleted file mode 100644 index 393212d..0000000 --- a/src/it/it0009-jni-dep-lib-shared/jni-dep-lib-shared/src/test/java/HelloWorldSharedLibJNITest.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import junit.framework.*; - -import com.mycompany.mypackage.HelloWorldSharedLibJNI; - -public class HelloWorldSharedLibJNITest - extends TestCase -{ - - public HelloWorldSharedLibJNITest( String name ) - { - super( name ); - } - - protected void setUp() - throws Exception - { - super.setUp(); - } - - protected void tearDown() - throws Exception - { - super.tearDown(); - } - - public void testNativeHelloWorldSharedLibJNI() - throws Exception - { - HelloWorldSharedLibJNI app = new HelloWorldSharedLibJNI(); - - this.assertEquals( "Hello NAR LIB World!", app.sayHello() ); - } -} -- cgit v1.2.3