Commit 2ebe2aad authored by Philippe Merle's avatar Philippe Merle

* Corrected a bug introduced by my previous commits, i.e.,

  storeJavaInterface() must be called even when a ClassNotFoundException is thrown.
* Added a test case for examples/examples-native/helloworld-binding-native
parent 281bb4bd
/**
* OW2 FraSCAti Examples: HelloWorld Native
* Copyright (C) 2010 INRIA, University of Lille 1
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: frascati@ow2.org
*
* Author: Philippe Merle
*
* Contributor(s):
*/
package org.ow2.frascati.examples.helloworld.jna.test;
import org.junit.Test;
import org.ow2.frascati.examples.test.FraSCAtiTestCase;
/**
* Test the HelloWorld Native composite.
*
*/
public class HelloWorldNativeTestCase
extends FraSCAtiTestCase
{
@Override
public final String getComposite()
{
String composite ="helloworld-native";
String osName = System.getProperty("os.name");
if(osName.startsWith("Windows")) {
composite += "-windows";
}
return composite;
}
@Test
public final void testService()
{
getService(Runnable.class, "r").run();
}
}
......@@ -105,10 +105,11 @@ public class FraSCAtiInterfaceNativeProcessor
Class<?> clazz = null;
try {
clazz = processingContext.loadClass(javaInterface);
storeJavaInterface(nativeItf, processingContext, javaInterface, clazz);
} catch (ClassNotFoundException cnfe) {
// If the Java interface is not found then this requires to compile Native to Java.
}
storeJavaInterface(nativeItf, processingContext, javaInterface, clazz);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment