Merge branch 'master' into directorargout_and_java_typemaps
This commit is contained in:
commit
4ba9de370e
470 changed files with 15434 additions and 3110 deletions
42
Examples/test-suite/java/proxycode_runme.java
Normal file
42
Examples/test-suite/java/proxycode_runme.java
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
import proxycode.*;
|
||||
|
||||
public class proxycode_runme {
|
||||
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("proxycode");
|
||||
} 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[]) throws Throwable
|
||||
{
|
||||
if (new Proxy1().proxycode1(100) != 101)
|
||||
throw new RuntimeException("Fail");
|
||||
if (new Proxy2().proxycode2a(100) != 102)
|
||||
throw new RuntimeException("Fail");
|
||||
if (new Proxy2().proxycode2b(100) != 102)
|
||||
throw new RuntimeException("Fail");
|
||||
if (new Proxy3().proxycode3(100) != 103)
|
||||
throw new RuntimeException("Fail");
|
||||
|
||||
if (new Proxy4().proxycode4(100) != 104)
|
||||
throw new RuntimeException("Fail");
|
||||
if (new Proxy4.Proxy4Nested().proxycode4nested(100) != 144)
|
||||
throw new RuntimeException("Fail");
|
||||
|
||||
if (new Proxy5a().proxycode5((short)100) != (short)100)
|
||||
throw new RuntimeException("Fail");
|
||||
if (new Proxy5b().proxycode5(100) != 100)
|
||||
throw new RuntimeException("Fail");
|
||||
if (new Proxy5b().proxycode5(100, 100) != 255)
|
||||
throw new RuntimeException("Fail");
|
||||
|
||||
long t1 = 10;
|
||||
long t2 = 100;
|
||||
Proxy6 p = new Proxy6().proxyUseT(t1, t2);
|
||||
p.useT(t1, t2);
|
||||
}
|
||||
}
|
||||
90
Examples/test-suite/java/rename_wildcard_runme.java
Normal file
90
Examples/test-suite/java/rename_wildcard_runme.java
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
|
||||
import rename_wildcard.*;
|
||||
|
||||
public class rename_wildcard_runme {
|
||||
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("rename_wildcard");
|
||||
} 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[]) {
|
||||
// Wildcard check
|
||||
{
|
||||
new GlobalWildStruct().mm1();
|
||||
new GlobalWildTemplateStructInt().mm1();
|
||||
new SpaceWildStruct().mm1();
|
||||
new SpaceWildTemplateStructInt().mm1();
|
||||
}
|
||||
// No declaration
|
||||
{
|
||||
new GlobalWildStruct().mm2a();
|
||||
new GlobalWildTemplateStructInt().mm2b();
|
||||
new SpaceWildStruct().mm2c();
|
||||
new SpaceWildTemplateStructInt().mm2d();
|
||||
|
||||
new GlobalWildTemplateStructInt().tt2b();
|
||||
new SpaceWildTemplateStructInt().tt2d();
|
||||
}
|
||||
// With declaration
|
||||
{
|
||||
new GlobalWildStruct().mm3a();
|
||||
new GlobalWildTemplateStructInt().mm3b();
|
||||
new SpaceWildStruct().mm3c();
|
||||
new SpaceWildTemplateStructInt().mm3d();
|
||||
|
||||
new GlobalWildTemplateStructInt().tt3b();
|
||||
new SpaceWildTemplateStructInt().tt3d();
|
||||
}
|
||||
// Global override too
|
||||
{
|
||||
new GlobalWildStruct().mm4a();
|
||||
new GlobalWildTemplateStructInt().mm4b();
|
||||
new SpaceWildStruct().mm4c();
|
||||
new SpaceWildTemplateStructInt().mm4d();
|
||||
|
||||
new GlobalWildTemplateStructInt().tt4b();
|
||||
new SpaceWildTemplateStructInt().tt4d();
|
||||
}
|
||||
// %extend renames
|
||||
{
|
||||
new GlobalWildStruct().mm5a();
|
||||
new GlobalWildTemplateStructInt().mm5b();
|
||||
new SpaceWildStruct().mm5c();
|
||||
new SpaceWildTemplateStructInt().mm5d();
|
||||
|
||||
new GlobalWildTemplateStructInt().tt5b();
|
||||
new SpaceWildTemplateStructInt().tt5d();
|
||||
}
|
||||
// operators
|
||||
{
|
||||
new GlobalWildStruct().opinta();
|
||||
new GlobalWildTemplateStructInt().opintb();
|
||||
new SpaceWildStruct().opintc();
|
||||
new SpaceWildTemplateStructInt().opintd();
|
||||
|
||||
new GlobalWildTemplateStructInt().opdoubleb();
|
||||
new SpaceWildTemplateStructInt().opdoubled();
|
||||
}
|
||||
// Wildcard renames expected for these
|
||||
{
|
||||
new NoChangeStruct().mm1();
|
||||
new NoChangeStruct().mm2();
|
||||
new NoChangeStruct().mm3();
|
||||
new NoChangeStruct().mm4();
|
||||
new NoChangeStruct().mm5();
|
||||
new NoChangeStruct().opint();
|
||||
new SpaceNoChangeStruct().mm1();
|
||||
new SpaceNoChangeStruct().mm2();
|
||||
new SpaceNoChangeStruct().mm3();
|
||||
new SpaceNoChangeStruct().mm4();
|
||||
new SpaceNoChangeStruct().mm5();
|
||||
new SpaceNoChangeStruct().opint();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
18
Examples/test-suite/java/template_default_cache_runme.java
Normal file
18
Examples/test-suite/java/template_default_cache_runme.java
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import template_default_cache.*;
|
||||
|
||||
public class template_default_cache_runme {
|
||||
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("template_default_cache");
|
||||
} 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[]) {
|
||||
AModelPtr ap = template_default_cache.get_mp_a();
|
||||
BModelPtr bp = template_default_cache.get_mp_b();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue