diff options
| -rw-r--r-- | testsuite/pyunit/libghdl/Comments.py | 10 | ||||
| -rw-r--r-- | testsuite/pyunit/libghdl/process.vhdl | 9 | ||||
| -rw-r--r-- | testsuite/pyunit/libghdl/process_fail.vhdl | 9 | 
3 files changed, 28 insertions, 0 deletions
| diff --git a/testsuite/pyunit/libghdl/Comments.py b/testsuite/pyunit/libghdl/Comments.py index 7bdffba11..2c426a626 100644 --- a/testsuite/pyunit/libghdl/Comments.py +++ b/testsuite/pyunit/libghdl/Comments.py @@ -73,6 +73,9 @@ class Instantiate(TestCase):              k = nodes.Get_Kind(stmt)              if k in nodes.Iir_Kinds.Process_Statement:                  self.checkDecls(nodes.Get_Declaration_Chain(stmt)) +                id = nodes.Get_Identifier(stmt) +                if id != name_table.Null_Identifier: +                    self.checkComments(stmt, name_table.Get_Name_Ptr(id))              stmt = nodes.Get_Chain(stmt)      def checkFile(self, filename) -> None: @@ -257,5 +260,12 @@ class Instantiate(TestCase):      def test_func_param(self) -> None:          self.checkFile(self._root / "func_param.vhdl") +    @expectedFailure +    def test_process_fail(self) -> None: +        self.checkFile(self._root / "process_fail.vhdl") + +    def test_process(self) -> None: +        self.checkFile(self._root / "process.vhdl") +  # TODO: first comment  # Empty line before to easy cut & put diff --git a/testsuite/pyunit/libghdl/process.vhdl b/testsuite/pyunit/libghdl/process.vhdl new file mode 100644 index 000000000..c0b56fe6e --- /dev/null +++ b/testsuite/pyunit/libghdl/process.vhdl @@ -0,0 +1,9 @@ +architecture arch of e is +  signal s, s_n : bit; +begin +  --  Comment for :p: +  p : process (s) +  begin +    s <= not s_n; +  end process; +end arch; diff --git a/testsuite/pyunit/libghdl/process_fail.vhdl b/testsuite/pyunit/libghdl/process_fail.vhdl new file mode 100644 index 000000000..819e5ea6e --- /dev/null +++ b/testsuite/pyunit/libghdl/process_fail.vhdl @@ -0,0 +1,9 @@ +architecture arch of e is +  signal s, s_n : bit; +begin +  --  Comment +  p : process (s) +  begin +    s <= not s_n; +  end process; +end arch; | 
