1
0
mirror of https://github.com/myhdl/myhdl.git synced 2025-01-24 21:52:56 +08:00

Added test for issue 169

This commit is contained in:
srivatsansoft 2016-05-24 23:03:33 +05:30
parent eb770a199d
commit c8e0dce0c7

View File

@ -12,9 +12,11 @@ class Test1:
@instance @instance
def func(): def func():
while True: i = 0
while i <= 100:
yield delay(10) yield delay(10)
self.clock.next = not self.clock self.clock.next = not self.clock
i = i + 1
return func return func
@ -28,9 +30,11 @@ class Test2:
@instance @instance
def func(): def func():
while True: i = 0
while i <= 100:
yield delay(10) yield delay(10)
self.clock.next = not self.clock self.clock.next = not self.clock
i = i + 1
return func return func
@ -48,8 +52,8 @@ def test_bench():
@pytest.mark.xfail @pytest.mark.xfail
def test_issue_169(): def test_issue_169():
test_inst = testbench() test_inst = test_bench()
assert test_inst.verify_convert() == 0 assert test_inst.verify_convert() == True
if __name__ == '__main__': if __name__ == '__main__':
test_issue_169() test_issue_169()