summaryrefslogtreecommitdiff
path: root/Examples/test-suite/python/cpp11_decltype_runme.py
blob: 1650d9004e9788ee00590e3d52529ec64ffb9ba8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import cpp11_decltype

a = cpp11_decltype.A()
a.i = 5
if a.i != 5:
    raise RuntimeError, "Assignment to a.i failed."

a.j = 10
if a.j != 10:
    raise RuntimeError, "Assignment to a.j failed."

b = a.foo(5)
if b != 10:
    raise RuntimeError, "foo(5) should return 10."

b = a.foo(6)
if b != 0:
    raise RuntimeError, "foo(6) should return 0."