varargs runtime test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4578 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
346e766e31
commit
b39ab0aa29
3 changed files with 57 additions and 4 deletions
19
Examples/test-suite/csharp/varargs_runme.cs
Normal file
19
Examples/test-suite/csharp/varargs_runme.cs
Normal file
|
|
@ -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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,10 +1,12 @@
|
||||||
abstract_inherit
|
abstract_inherit
|
||||||
abstract_inherit_ok
|
abstract_inherit_ok
|
||||||
abstract_signature
|
abstract_signature
|
||||||
|
abstract_typedef
|
||||||
abstract_typedef2
|
abstract_typedef2
|
||||||
abstract_virtual
|
abstract_virtual
|
||||||
add_link
|
add_link
|
||||||
anonymous_arg
|
anonymous_arg
|
||||||
|
anonymous_bitfield
|
||||||
argout
|
argout
|
||||||
arrayptr
|
arrayptr
|
||||||
arrayref
|
arrayref
|
||||||
|
|
@ -43,8 +45,13 @@ default_ns
|
||||||
default_ref
|
default_ref
|
||||||
defineop
|
defineop
|
||||||
defines
|
defines
|
||||||
|
director_basic
|
||||||
|
director_exception
|
||||||
|
director_finalizer
|
||||||
|
director_unroll
|
||||||
dynamic_cast
|
dynamic_cast
|
||||||
enum
|
enum
|
||||||
|
enum_cpp
|
||||||
enum_plus
|
enum_plus
|
||||||
enum_scope
|
enum_scope
|
||||||
enum_scope_template
|
enum_scope_template
|
||||||
|
|
@ -81,13 +88,13 @@ lib_std_string
|
||||||
lib_std_vector
|
lib_std_vector
|
||||||
lib_typemaps
|
lib_typemaps
|
||||||
long_long
|
long_long
|
||||||
|
long_long_apply
|
||||||
macro_2
|
macro_2
|
||||||
member_template
|
member_template
|
||||||
minherit
|
minherit
|
||||||
name
|
name
|
||||||
namespace_enum
|
namespace_enum
|
||||||
namespace_extend
|
namespace_extend
|
||||||
namespace_nested
|
|
||||||
namespace_template
|
namespace_template
|
||||||
namespace_typemap
|
namespace_typemap
|
||||||
name_cxx
|
name_cxx
|
||||||
|
|
@ -119,6 +126,7 @@ ret_by_value
|
||||||
rname
|
rname
|
||||||
sizeof_pointer
|
sizeof_pointer
|
||||||
smart_pointer_const
|
smart_pointer_const
|
||||||
|
smart_pointer_const2
|
||||||
smart_pointer_multi
|
smart_pointer_multi
|
||||||
smart_pointer_multi_typedef
|
smart_pointer_multi_typedef
|
||||||
smart_pointer_not
|
smart_pointer_not
|
||||||
|
|
@ -142,17 +150,15 @@ template_construct
|
||||||
template_const_ref
|
template_const_ref
|
||||||
template_default
|
template_default
|
||||||
template_default2
|
template_default2
|
||||||
template_default_arg
|
|
||||||
template_default_inherit
|
template_default_inherit
|
||||||
template_default_qualify
|
template_default_qualify
|
||||||
|
template_default_vw
|
||||||
template_enum
|
template_enum
|
||||||
template_enum_ns_inherit
|
template_enum_ns_inherit
|
||||||
template_enum_typedef
|
template_enum_typedef
|
||||||
template_explicit
|
template_explicit
|
||||||
template_extend1
|
template_extend1
|
||||||
template_extend2
|
template_extend2
|
||||||
template_extend_overload
|
|
||||||
template_extend_overload_2
|
|
||||||
template_forward
|
template_forward
|
||||||
template_inherit
|
template_inherit
|
||||||
template_inherit_abstract
|
template_inherit_abstract
|
||||||
|
|
|
||||||
28
Examples/test-suite/java/varargs_runme.java
Normal file
28
Examples/test-suite/java/varargs_runme.java
Normal file
|
|
@ -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");
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue