PageRenderTime 8ms CodeModel.GetById 1ms app.highlight 3ms 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
 1from smart_pointer_overload import *
 2
 3f = Foo()
 4b = Bar(f)
 5
 6
 7if f.test(3) != 1:
 8    raise RuntimeError
 9if f.test(3.5) != 2:
10    raise RuntimeError
11if f.test("hello") != 3:
12    raise RuntimeError
13
14if b.test(3) != 1:
15    raise RuntimeError
16if b.test(3.5) != 2:
17    raise RuntimeError
18if b.test("hello") != 3:
19    raise RuntimeError
20
21