pre, post, cshin, pgcppname attribute tests for javain/csin typemap
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9679 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
0090cac1d0
commit
fd03218011
6 changed files with 281 additions and 0 deletions
28
Examples/test-suite/java/java_prepost_runme.java
Normal file
28
Examples/test-suite/java/java_prepost_runme.java
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
|
||||
import java_prepost.*;
|
||||
|
||||
public class java_prepost_runme {
|
||||
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("java_prepost");
|
||||
} 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[])
|
||||
{
|
||||
// ensure checked exception is generated
|
||||
try {
|
||||
PrePostThrows ppt = new PrePostThrows(null);
|
||||
} catch (InstantiationException e) {
|
||||
}
|
||||
}
|
||||
|
||||
private static void Assert(double d1, double d2) {
|
||||
if (d1 != d2)
|
||||
throw new RuntimeException("assertion failure. " + d1 + " != " + d2);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue