Fix using statements for overloaded methods
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10176 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
84dc1cc4f6
commit
575efcdd53
9 changed files with 317 additions and 52 deletions
|
|
@ -2,10 +2,33 @@ from using_composition import *
|
|||
|
||||
f = FooBar()
|
||||
if f.blah(3) != 3:
|
||||
raise RuntimeError,"blah(int)"
|
||||
raise RuntimeError,"FooBar::blah(int)"
|
||||
|
||||
if f.blah(3.5) != 3.5:
|
||||
raise RuntimeError,"blah(double)"
|
||||
raise RuntimeError,"FooBar::blah(double)"
|
||||
|
||||
if f.blah("hello") != "hello":
|
||||
raise RuntimeError,"blah(char *)"
|
||||
raise RuntimeError,"FooBar::blah(char *)"
|
||||
|
||||
|
||||
f = FooBar2()
|
||||
if f.blah(3) != 3:
|
||||
raise RuntimeError,"FooBar2::blah(int)"
|
||||
|
||||
if f.blah(3.5) != 3.5:
|
||||
raise RuntimeError,"FooBar2::blah(double)"
|
||||
|
||||
if f.blah("hello") != "hello":
|
||||
raise RuntimeError,"FooBar2::blah(char *)"
|
||||
|
||||
|
||||
f = FooBar3()
|
||||
if f.blah(3) != 3:
|
||||
raise RuntimeError,"FooBar3::blah(int)"
|
||||
|
||||
if f.blah(3.5) != 3.5:
|
||||
raise RuntimeError,"FooBar3::blah(double)"
|
||||
|
||||
if f.blah("hello") != "hello":
|
||||
raise RuntimeError,"FooBar3::blah(char *)"
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,48 @@ from using_inherit import *
|
|||
|
||||
b = Bar()
|
||||
if b.test(3) != 3:
|
||||
raise RuntimeError,"test(int)"
|
||||
raise RuntimeError,"Bar::test(int)"
|
||||
|
||||
if b.test(3.5) != 3.5:
|
||||
raise RuntimeError, "test(double)"
|
||||
raise RuntimeError, "Bar::test(double)"
|
||||
|
||||
|
||||
b = Bar2()
|
||||
if b.test(3) != 6:
|
||||
raise RuntimeError,"Bar2::test(int)"
|
||||
|
||||
if b.test(3.5) != 7.0:
|
||||
raise RuntimeError, "Bar2::test(double)"
|
||||
|
||||
|
||||
b = Bar3()
|
||||
if b.test(3) != 6:
|
||||
raise RuntimeError,"Bar3::test(int)"
|
||||
|
||||
if b.test(3.5) != 7.0:
|
||||
raise RuntimeError, "Bar3::test(double)"
|
||||
|
||||
|
||||
b = Bar4()
|
||||
if b.test(3) != 6:
|
||||
raise RuntimeError,"Bar4::test(int)"
|
||||
|
||||
if b.test(3.5) != 7.0:
|
||||
raise RuntimeError, "Bar4::test(double)"
|
||||
|
||||
|
||||
b = Fred1()
|
||||
if b.test(3) != 3:
|
||||
raise RuntimeError,"Fred1::test(int)"
|
||||
|
||||
if b.test(3.5) != 7.0:
|
||||
raise RuntimeError, "Fred1::test(double)"
|
||||
|
||||
|
||||
b = Fred2()
|
||||
if b.test(3) != 3:
|
||||
raise RuntimeError,"Fred2::test(int)"
|
||||
|
||||
if b.test(3.5) != 7.0:
|
||||
raise RuntimeError, "Fred2::test(double)"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue