Add director_nested_class testcase
Java nested director class test for fix in e7db081d5e
This commit is contained in:
parent
837d2bfd04
commit
bca042a7dd
2 changed files with 46 additions and 0 deletions
30
Examples/test-suite/java/director_nested_class_runme.java
Normal file
30
Examples/test-suite/java/director_nested_class_runme.java
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue