diff options
Diffstat (limited to 'Examples/test-suite/java/nested_template_base_runme.java')
-rw-r--r-- | Examples/test-suite/java/nested_template_base_runme.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Examples/test-suite/java/nested_template_base_runme.java b/Examples/test-suite/java/nested_template_base_runme.java new file mode 100644 index 000000000..8404afe04 --- /dev/null +++ b/Examples/test-suite/java/nested_template_base_runme.java @@ -0,0 +1,27 @@ +import nested_template_base.*; + +public class nested_template_base_runme { + + static { + try { + System.loadLibrary("nested_template_base"); + } 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[]) { + OuterC.InnerS ois = new OuterC.InnerS(123); + OuterC.InnerC oic = new OuterC.InnerC(); + + // Check base method is available + if (oic.outer(ois).getVal() != 123) + throw new RuntimeException("Wrong value calling outer"); + + // Check non-derived class using base class + if (oic.innerc().outer(ois).getVal() != 123) + throw new RuntimeException("Wrong value calling innerc"); + + } +} |