diff --git a/Examples/test-suite/csharp/varargs_runme.cs b/Examples/test-suite/csharp/varargs_runme.cs new file mode 100644 index 000000000..1ccd7e95d --- /dev/null +++ b/Examples/test-suite/csharp/varargs_runme.cs @@ -0,0 +1,19 @@ +// varargs test + +using System; + +public class varargs_runme { + + public static void Main() { + + if (varargs.test("Hello") != "Hello") + throw new Exception("Failed"); + + Foo f = new Foo("Greetings"); + if (f.str != "Greetings") + throw new Exception("Failed"); + + if (f.test("Hello") != "Hello") + throw new Exception("Failed"); + } +} diff --git a/Examples/test-suite/java/.cvsignore b/Examples/test-suite/java/.cvsignore index b3491f35a..366c41e53 100644 --- a/Examples/test-suite/java/.cvsignore +++ b/Examples/test-suite/java/.cvsignore @@ -1,10 +1,12 @@ abstract_inherit abstract_inherit_ok abstract_signature +abstract_typedef abstract_typedef2 abstract_virtual add_link anonymous_arg +anonymous_bitfield argout arrayptr arrayref @@ -43,8 +45,13 @@ default_ns default_ref defineop defines +director_basic +director_exception +director_finalizer +director_unroll dynamic_cast enum +enum_cpp enum_plus enum_scope enum_scope_template @@ -81,13 +88,13 @@ lib_std_string lib_std_vector lib_typemaps long_long +long_long_apply macro_2 member_template minherit name namespace_enum namespace_extend -namespace_nested namespace_template namespace_typemap name_cxx @@ -119,6 +126,7 @@ ret_by_value rname sizeof_pointer smart_pointer_const +smart_pointer_const2 smart_pointer_multi smart_pointer_multi_typedef smart_pointer_not @@ -142,17 +150,15 @@ template_construct template_const_ref template_default template_default2 -template_default_arg template_default_inherit template_default_qualify +template_default_vw template_enum template_enum_ns_inherit template_enum_typedef template_explicit template_extend1 template_extend2 -template_extend_overload -template_extend_overload_2 template_forward template_inherit template_inherit_abstract diff --git a/Examples/test-suite/java/varargs_runme.java b/Examples/test-suite/java/varargs_runme.java new file mode 100644 index 000000000..a8a993f6a --- /dev/null +++ b/Examples/test-suite/java/varargs_runme.java @@ -0,0 +1,28 @@ +// varargs test + +import varargs.*; + +public class varargs_runme { + + static { + try { + System.loadLibrary("varargs"); + } 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 (!varargs.test("Hello").equals("Hello")) + throw new RuntimeException("Failed"); + + Foo f = new Foo("Greetings"); + if (!f.getStr().equals("Greetings")) + throw new RuntimeException("Failed"); + + if (!f.test("Hello").equals("Hello")) + throw new RuntimeException("Failed"); + } +}