Fix %varargs when used with a numerical argument, which was emitting one more optional argument than documented

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12657 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2011-05-06 20:56:42 +00:00
commit 769b26d575
4 changed files with 27 additions and 2 deletions

View file

@ -16,3 +16,19 @@ if varargs.test_def("Hello",1) != "Hello":
if varargs.test_def("Hello") != "Hello":
raise RuntimeError, "Failed"
###
if varargs.test_plenty("Hello") != "Hello":
raise RuntimeError, "Failed"
if varargs.test_plenty("Hello", 1) != "Hello":
raise RuntimeError, "Failed"
if varargs.test_plenty("Hello", 1, 2) != "Hello":
raise RuntimeError, "Failed"
try:
varargs.test_plenty("Hello", 1, 2, 3)
raise RuntimeError
except NotImplementedError:
pass