mirror of https://github.com/swig/swig
runtime test for Java added
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8124 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
68c3d83b40
commit
c113d339ea
|
@ -0,0 +1,21 @@
|
|||
import typemap_namespace.*;
|
||||
|
||||
public class typemap_namespace_runme {
|
||||
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("typemap_namespace");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String argv[]) throws Throwable
|
||||
{
|
||||
if (!typemap_namespace.test1("hello").equals("hello"))
|
||||
throw new RuntimeException("test1 failed");
|
||||
if (!typemap_namespace.test2("hello").equals("hello"))
|
||||
throw new RuntimeException("test2 failed");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue