2015-08-15 21:45:16 +08:00
|
|
|
# RUN: %python -m artiq.compiler.testbench.jit %s
|
|
|
|
# RUN: %python %s
|
|
|
|
|
|
|
|
class c:
|
|
|
|
a = 1
|
|
|
|
def f():
|
|
|
|
return 2
|
2015-08-19 13:39:22 +08:00
|
|
|
def g(self):
|
|
|
|
return self.a + 5
|
2015-08-28 15:11:05 +08:00
|
|
|
def h(self, x):
|
|
|
|
return self.a + x
|
2015-08-15 21:45:16 +08:00
|
|
|
|
2015-08-19 06:05:43 +08:00
|
|
|
assert c.a == 1
|
|
|
|
assert c.f() == 2
|
2015-08-19 13:39:22 +08:00
|
|
|
assert c().g() == 6
|
2015-08-28 15:11:05 +08:00
|
|
|
assert c().h(9) == 10
|