Add naturalvar_more testcase runtime test

This commit is contained in:
William S Fulton 2013-10-11 19:42:19 +01:00
parent 3fcbb40af9
commit e5f9f91807
1 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,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");
}
}