diff options
author | Derrick <a11426@users.sourceforge.net> | 2011-02-14 20:11:58 +0000 |
---|---|---|
committer | Derrick <a11426@users.sourceforge.net> | 2011-02-14 20:11:58 +0000 |
commit | 5815f7ec289e067e765fb8e893a2f337d8b48303 (patch) | |
tree | ebe9e0534a089fe431cedc6fdbc1a53ac523d70c /Examples/test-suite/java/char_binary_runme.java | |
parent | 3e1af1f698d5d02d7905431bcb3549c0f7bc9aa7 (diff) | |
parent | 1fab53b2046b97702e1de4cfab06cb8fa8fc129d (diff) | |
download | swig-a11426-fortran.tar.gz |
update fortran branch. merge of 12160:12460a11426-fortran
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/a11426-fortran@12461 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Examples/test-suite/java/char_binary_runme.java')
-rw-r--r-- | Examples/test-suite/java/char_binary_runme.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Examples/test-suite/java/char_binary_runme.java b/Examples/test-suite/java/char_binary_runme.java new file mode 100644 index 000000000..9227f8617 --- /dev/null +++ b/Examples/test-suite/java/char_binary_runme.java @@ -0,0 +1,24 @@ +import char_binary.*; + +public class char_binary_runme { + + static { + try { + System.loadLibrary("char_binary"); + } 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[]) { + Test t = new Test(); + byte[] hile = "hile".getBytes(); + byte[] hil0 = "hil\0".getBytes(); + if (t.strlen(hile) != 4) + throw new RuntimeException("bad multi-arg typemap"); + + if (t.strlen(hil0) != 4) + throw new RuntimeException("bad multi-arg typemap"); + } +} |