add missing nested_workaround runtime test

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11751 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2009-11-17 19:28:29 +00:00
parent 7fd36f5bd6
commit f62c54c0f6
1 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,31 @@
import nested_workaround.*;
public class nested_workaround_runme {
static {
try {
System.loadLibrary("nested_workaround");
} 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[]) {
{
Inner inner = new Inner(5);
Outer outer = new Outer();
Inner newInner = outer.doubleInnerValue(inner);
if (newInner.getValue() != 10)
throw new RuntimeException("inner failed");
}
{
Outer outer = new Outer();
Inner inner = outer.createInner(3);
Inner newInner = outer.doubleInnerValue(inner);
if (outer.getInnerValue(newInner) != 6)
throw new RuntimeException("inner failed");
}
}
}