beefed up the kwargs tests
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6453 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
2d1e6b77bf
commit
fa423253a9
2 changed files with 77 additions and 16 deletions
|
|
@ -1,7 +1,44 @@
|
|||
import kwargs
|
||||
from kwargs import *
|
||||
|
||||
if kwargs.foo(a=1,b=2) != 3:
|
||||
# Simple class
|
||||
f = Foo(b=2,a=1)
|
||||
|
||||
if f.foo(b=1,a=2) != 3:
|
||||
raise RuntimeError
|
||||
|
||||
if kwargs.foo(b=2) != 3:
|
||||
if Foo.statfoo(b=2) != 3:
|
||||
raise RuntimeError
|
||||
|
||||
if f.efoo(b=2) != 3:
|
||||
raise RuntimeError
|
||||
|
||||
if Foo.sfoo(b=2) != 3:
|
||||
raise RuntimeError
|
||||
|
||||
|
||||
# Templated class
|
||||
b = BarInt(b=2,a=1)
|
||||
|
||||
if b.bar(b=1,a=2) != 3:
|
||||
raise RuntimeError
|
||||
|
||||
if BarInt.statbar(b=2) != 3:
|
||||
raise RuntimeError
|
||||
|
||||
if b.ebar(b=2) != 3:
|
||||
raise RuntimeError
|
||||
|
||||
if BarInt.sbar(b=2) != 3:
|
||||
raise RuntimeError
|
||||
|
||||
|
||||
# Functions
|
||||
if templatedfunction(b=2) != 3:
|
||||
raise RuntimeError
|
||||
|
||||
if foo(a=1,b=2) != 3:
|
||||
raise RuntimeError
|
||||
|
||||
if foo(b=2) != 3:
|
||||
raise RuntimeError
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue