aboutsummaryrefslogtreecommitdiff
path: root/Examples/test-suite/java/typemap_namespace_runme.java
blob: eddb896cf38edb9581580992396111e2f7375d0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import typemap_namespace.*;

public class typemap_namespace_runme {

  static {
    try {
        System.loadLibrary("typemap_namespace");
    } 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[]) throws Throwable
  {
    if (!typemap_namespace.test1("hello").equals("hello"))
      throw new RuntimeException("test1 failed");
    if (!typemap_namespace.test2("hello").equals("hello"))
      throw new RuntimeException("test2 failed");
  }
}