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:
William S Fulton 2007-11-30 22:34:50 +00:00
commit 575efcdd53
9 changed files with 317 additions and 52 deletions

View file

@ -15,14 +15,42 @@ include Using_composition
f = FooBar.new
if f.blah(3) != 3
raise RuntimeError,"blah(int)"
raise RuntimeError,"FooBar::blah(int)"
end
if f.blah(3.5) != 3.5
raise RuntimeError,"blah(double)"
raise RuntimeError,"FooBar::blah(double)"
end
if f.blah("hello") != "hello"
raise RuntimeError,"blah(char *)"
raise RuntimeError,"FooBar::blah(char *)"
end
f = FooBar2.new
if f.blah(3) != 3
raise RuntimeError,"FooBar2::blah(int)"
end
if f.blah(3.5) != 3.5
raise RuntimeError,"FooBar2::blah(double)"
end
if f.blah("hello") != "hello"
raise RuntimeError,"FooBar2::blah(char *)"
end
f = FooBar3.new
if f.blah(3) != 3
raise RuntimeError,"FooBar3::blah(int)"
end
if f.blah(3.5) != 3.5
raise RuntimeError,"FooBar3::blah(double)"
end
if f.blah("hello") != "hello"
raise RuntimeError,"FooBar3::blah(char *)"
end

View file

@ -15,10 +15,60 @@ include Using_inherit
b = Bar.new
if b.test(3) != 3
raise RuntimeError,"test(int)"
raise RuntimeError,"Bar::test(int)"
end
if b.test(3.5) != 3.5
raise RuntimeError, "test(double)"
raise RuntimeError, "Bar::test(double)"
end
b = Bar2.new
if b.test(3) != 6
raise RuntimeError,"Bar2::test(int)"
end
if b.test(3.5) != 7.0
raise RuntimeError, "Bar2::test(double)"
end
b = Bar3.new
if b.test(3) != 6
raise RuntimeError,"Bar3::test(int)"
end
if b.test(3.5) != 7.0
raise RuntimeError, "Bar3::test(double)"
end
b = Bar4.new
if b.test(3) != 6
raise RuntimeError,"Bar4::test(int)"
end
if b.test(3.5) != 7.0
raise RuntimeError, "Bar4::test(double)"
end
b = Fred1.new
if b.test(3) != 3
raise RuntimeError,"Fred1::test(int)"
end
if b.test(3.5) != 7.0
raise RuntimeError, "Fred1::test(double)"
end
b = Fred2.new
if b.test(3) != 3
raise RuntimeError,"Fred2::test(int)"
end
if b.test(3.5) != 7.0
raise RuntimeError, "Fred2::test(double)"
end