summaryrefslogtreecommitdiff
path: root/Examples/test-suite/python/cpp11_alternate_function_syntax_runme.py
blob: cc7b5cd91990e642e0b4bab593a3466e02cee70e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import cpp11_alternate_function_syntax

a = cpp11_alternate_function_syntax.SomeStruct()

res = a.addNormal(4, 5)
if res != 9:
    raise RuntimeError, ("SomeStruct::addNormal(4,5) returns ", res, " should be 9.")

res = a.addAlternate(4, 5)
if res != 9:
    raise RuntimeError, ("SomeStruct::addAlternate(4,5) returns ", res, " should be 9.")

res = a.addAlternateConst(4, 5)
if res != 9:
    raise RuntimeError, ("SomeStruct::addAlternateConst(4,5) returns ", res, " should be 9.")

res = a.addAlternateNoExcept(4, 5)
if res != 9:
    raise RuntimeError, ("SomeStruct::addAlternateNoExcept(4,5) returns ", res, " should be 9.")

res = a.addAlternateConstNoExcept(4, 5)
if res != 9:
    raise RuntimeError, ("SomeStruct::addAlternateConstNoExcept(4,5) returns ", res, " should be 9.")