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

# · Python · 14 lines · 12 code · 2 blank · 0 comment · 5 complexity · 7f717afb13e5e1010dd9098d0d118076 MD5 · raw file

  1. import overload_extend
  2. f = overload_extend.Foo()
  3. if f.test() != 0:
  4. raise RuntimeError
  5. if f.test(3) != 1:
  6. raise RuntimeError
  7. if f.test("hello") != 2:
  8. raise RuntimeError
  9. if f.test(3,2) != 5:
  10. raise RuntimeError
  11. if f.test(3.0) != 1003:
  12. raise RuntimeError