Add naturalvar_more testcase runtime test
This commit is contained in:
parent
3fcbb40af9
commit
e5f9f91807
1 changed files with 23 additions and 0 deletions
23
Examples/test-suite/java/naturalvar_more_runme.java
Normal file
23
Examples/test-suite/java/naturalvar_more_runme.java
Normal 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");
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue