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