PageRenderTime 10ms CodeModel.GetById 2ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 1ms

/trunk/Examples/test-suite/python/overload_extend_runme.py

#
Python | 14 lines | 12 code | 2 blank | 0 comment | 5 complexity | 7f717afb13e5e1010dd9098d0d118076 MD5 | raw file
 1import overload_extend
 2
 3f = overload_extend.Foo()
 4if f.test() != 0:
 5    raise RuntimeError
 6if f.test(3) != 1:
 7    raise RuntimeError
 8if f.test("hello") != 2:
 9    raise RuntimeError
10if f.test(3,2) != 5:
11    raise RuntimeError
12if f.test(3.0) != 1003:
13    raise RuntimeError
14