/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
- from smart_pointer_overload import *
- f = Foo()
- b = Bar(f)
- if f.test(3) != 1:
- raise RuntimeError
- if f.test(3.5) != 2:
- raise RuntimeError
- if f.test("hello") != 3:
- raise RuntimeError
- if b.test(3) != 1:
- raise RuntimeError
- if b.test(3.5) != 2:
- raise RuntimeError
- if b.test("hello") != 3:
- raise RuntimeError