From c8e0dce0c7d857e382467e60d3975e03724900a3 Mon Sep 17 00:00:00 2001 From: srivatsansoft Date: Tue, 24 May 2016 23:03:33 +0530 Subject: [PATCH] Added test for issue 169 --- myhdl/test/bugs/test_issue_169.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/myhdl/test/bugs/test_issue_169.py b/myhdl/test/bugs/test_issue_169.py index 905decd7..c7cced96 100644 --- a/myhdl/test/bugs/test_issue_169.py +++ b/myhdl/test/bugs/test_issue_169.py @@ -12,9 +12,11 @@ class Test1: @instance def func(): - while True: + i = 0 + while i <= 100: yield delay(10) self.clock.next = not self.clock + i = i + 1 return func @@ -28,9 +30,11 @@ class Test2: @instance def func(): - while True: + i = 0 + while i <= 100: yield delay(10) self.clock.next = not self.clock + i = i + 1 return func @@ -48,8 +52,8 @@ def test_bench(): @pytest.mark.xfail def test_issue_169(): - test_inst = testbench() - assert test_inst.verify_convert() == 0 + test_inst = test_bench() + assert test_inst.verify_convert() == True if __name__ == '__main__': test_issue_169()