PageRenderTime 47ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
Java | 21 lines | 18 code | 3 blank | 0 comment | 2 complexity | 4854c57f292254994f7c68eaba2d3c08 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  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. }