new test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4251 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
28aaf91ab6
commit
048281b9f8
3 changed files with 26 additions and 0 deletions
|
|
@ -210,6 +210,7 @@ CPP_TEST_CASES += \
|
|||
using_private \
|
||||
using_protected \
|
||||
valuewrapper_base \
|
||||
varargs \
|
||||
virtual_destructor \
|
||||
voidtest
|
||||
|
||||
|
|
|
|||
8
Examples/test-suite/python/varargs_runme.py
Normal file
8
Examples/test-suite/python/varargs_runme.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import varargs
|
||||
|
||||
if varargs.test("Hello") != "Hello":
|
||||
raise RuntimeError, "Failed"
|
||||
|
||||
f = varargs.Foo()
|
||||
if f.test("Hello") != "Hello":
|
||||
raise RuntimeError, "Failed"
|
||||
17
Examples/test-suite/varargs.i
Normal file
17
Examples/test-suite/varargs.i
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
// Tests SWIG's *default* handling of varargs. The default behavior is to simply ignore the varargs.
|
||||
%module varargs
|
||||
|
||||
%inline %{
|
||||
|
||||
char *test(const char *fmt, ...) {
|
||||
return (char *) fmt;
|
||||
}
|
||||
|
||||
class Foo {
|
||||
public:
|
||||
char *test(const char *fmt, ...) {
|
||||
return (char *) fmt;
|
||||
}
|
||||
};
|
||||
|
||||
%}
|
||||
Loading…
Add table
Add a link
Reference in a new issue