summaryrefslogtreecommitdiff
path: root/Examples/test-suite/java/naturalvar_more_runme.java
blob: 60e2fadbe5afbe4996eff6d8939d476e5d90d2b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

import naturalvar_more.*;

public class naturalvar_more_runme {
  static {
    try {
        System.loadLibrary("naturalvar_more");
    } 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[]) 
  {
    S s = new S();
    if (!s.getConst_string_member().equals("initial string value"))
      throw new RuntimeException("Test 1 fail");
    s.setString_member("some member value");
    if (!s.getString_member().equals("some member value"))
      throw new RuntimeException("Test 2 fail");
  }
}