new test to test windows calling conventions with extern functions

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7320 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2005-06-27 21:15:55 +00:00
commit c838d83d2c
3 changed files with 49 additions and 0 deletions

View file

@ -0,0 +1,21 @@
import extern_declaration.*;
public class extern_declaration_runme {
static {
try {
System.loadLibrary("extern_declaration");
} 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[])
{
if (extern_declaration.externimport(100) != 100) throw new RuntimeException("externimport failed");
if (extern_declaration.externexport(200) != 200) throw new RuntimeException("externexport failed");
if (extern_declaration.externstdcall(300) != 300) throw new RuntimeException("externstdcall failed");
}
}