swig/Examples/test-suite/java/director_nested_class_runme.java
William S Fulton bca042a7dd Add director_nested_class testcase
Java nested director class test for fix in e7db081d5e
2014-11-07 19:50:20 +00:00

30 lines
779 B
Java

import director_nested_class.*;
public class director_nested_class_runme {
static {
try {
System.loadLibrary("director_nested_class");
} 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[]) {
director_nested_class_Derived d = new director_nested_class_Derived();
if (DirectorOuter.callMethod(d, 999) != 9990) {
throw new RuntimeException("callMethod(999) failed");
}
}
}
class director_nested_class_Derived extends DirectorOuter.DirectorInner {
public int vmethod(int input) {
return input * 10;
}
}