From ed0be926b39ee7d44e1bee7b6f80c2da5020d386 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Wed, 15 Dec 2004 00:23:33 +0000 Subject: [PATCH] runtime test (currently crashes) git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6887 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- .../java/director_string_runme.java | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Examples/test-suite/java/director_string_runme.java diff --git a/Examples/test-suite/java/director_string_runme.java b/Examples/test-suite/java/director_string_runme.java new file mode 100644 index 000000000..477ab2dc9 --- /dev/null +++ b/Examples/test-suite/java/director_string_runme.java @@ -0,0 +1,36 @@ + +import director_string.*; + +public class director_string_runme { + + static { + try { + System.loadLibrary("director_string"); + } 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[]) { + + B b = new B("hello"); + + b.get(0); + b.get_first(); + } +} + +class B extends A { + public B(String first) { + super(first); + } + public String get_first() { + return get(0); + } + + public String get(int n) { + return super.get(n); + } +} +