swig/Examples/test-suite/java/memberin_extend_runme.java
William S Fulton 0576ffcde7 add test for %extend on member variable
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11382 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-09 19:56:47 +00:00

26 lines
766 B
Java

import memberin_extend.*;
public class memberin_extend_runme {
static {
try {
System.loadLibrary("memberin_extend");
} 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[])
{
ExtendMe em1 = new ExtendMe();
ExtendMe em2 = new ExtendMe();
em1.setThing("em1thing");
em2.setThing("em2thing");
if (!em1.getThing().equals("em1thing"))
throw new RuntimeException("wrong: " + em1.getThing());
if (!em2.getThing().equals("em2thing"))
throw new RuntimeException("wrong: " + em2.getThing());
}
}