rename overload_extendc testcase
This commit is contained in:
parent
a00b4f4463
commit
0bd41dc14d
7 changed files with 11 additions and 11 deletions
21
Examples/test-suite/python/overload_extend2_runme.py
Normal file
21
Examples/test-suite/python/overload_extend2_runme.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import overload_extend2
|
||||
|
||||
f = overload_extend2.Foo()
|
||||
if f.test(3) != 1:
|
||||
raise RuntimeError
|
||||
if f.test("hello") != 2:
|
||||
raise RuntimeError
|
||||
if f.test(3.5, 2.5) != 3:
|
||||
raise RuntimeError
|
||||
if f.test("hello", 20) != 1020:
|
||||
raise RuntimeError
|
||||
if f.test("hello", 20, 100) != 120:
|
||||
raise RuntimeError
|
||||
|
||||
# C default args
|
||||
if f.test(f) != 30:
|
||||
raise RuntimeError
|
||||
if f.test(f, 100) != 120:
|
||||
raise RuntimeError
|
||||
if f.test(f, 100, 200) != 300:
|
||||
raise RuntimeError
|
||||
Loading…
Add table
Add a link
Reference in a new issue