blob: 16f6997fe541ea574bd0b5fd16f2c18633741487 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
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
|