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:
William S Fulton 2003-03-19 20:50:05 +00:00
commit b39ab0aa29
3 changed files with 57 additions and 4 deletions

View file

@ -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

View 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");
}
}