summaryrefslogtreecommitdiff
path: root/Examples/test-suite/python/cpp11_decltype_runme.py
blob: a18f334dc47651e2a5edef410c754ade2f183c5b (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.")