PageRenderTime 36ms CodeModel.GetById 16ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
Python | 21 lines | 15 code | 6 blank | 0 comment | 6 complexity | ef25a3ccfb7be7c555c46885f64e8547 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. from smart_pointer_overload import *
  2. f = Foo()
  3. b = Bar(f)
  4. if f.test(3) != 1:
  5. raise RuntimeError
  6. if f.test(3.5) != 2:
  7. raise RuntimeError
  8. if f.test("hello") != 3:
  9. raise RuntimeError
  10. if b.test(3) != 1:
  11. raise RuntimeError
  12. if b.test(3.5) != 2:
  13. raise RuntimeError
  14. if b.test("hello") != 3:
  15. raise RuntimeError