/trunk/Examples/test-suite/java/typemap_namespace_runme.java

# · Java · 21 lines · 18 code · 3 blank · 0 comment · 2 complexity · 4854c57f292254994f7c68eaba2d3c08 MD5 · raw file

  1. import typemap_namespace.*;
  2. public class typemap_namespace_runme {
  3. static {
  4. try {
  5. System.loadLibrary("typemap_namespace");
  6. } catch (UnsatisfiedLinkError e) {
  7. 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);
  8. System.exit(1);
  9. }
  10. }
  11. public static void main(String argv[]) throws Throwable
  12. {
  13. if (!typemap_namespace.test1("hello").equals("hello"))
  14. throw new RuntimeException("test1 failed");
  15. if (!typemap_namespace.test2("hello").equals("hello"))
  16. throw new RuntimeException("test2 failed");
  17. }
  18. }