提交 ccac3fd3 authored 作者: Frederic Bastien's avatar Frederic Bastien

added test for different init value.

上级 ea4fae3e
......@@ -188,6 +188,14 @@ class T_test_wiki_module(unittest.TestCase):
assert inst.c == -1
assert inst.plus10() == 9
inst = m.make(c = 5) # here, we make an "instance" of the module with c initialized to 0
assert inst.c == 5
inst.inc(2)
assert inst.c == 7
inst.dec(3)
assert inst.c == 4
assert inst.plus10() == 14
def test_Module_nesting_example1(self):
def make_incdec_function():
n, c = T.scalars('nc')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论