summaryrefslogtreecommitdiff
path: root/Examples/test-suite/python/functors_runme.py
blob: 98945a047985b13a51cf365393a2081e29b72dc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
from functors import *

a = Functor0(10)
b = Functor1(10)
c = Functor2(10)

if a()!=-10:
    raise RuntimeError("a failed")
if b(1)!=11:
    raise RuntimeError("b failed")
if c(1, 2)!=13:
    raise RuntimeError("c failed")