From 9824b3c9a8d2103a5ecd77ff957536fa16c24bbf Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Mon, 5 Dec 2022 21:39:51 +0100 Subject: Reorganized testcases. --- testsuite/pyunit/libghdl/Comment2.vhdl | 132 --------------------- testsuite/pyunit/libghdl/Comments.py | 124 ++++++++++--------- testsuite/pyunit/libghdl/DesignComment.vhdl | 14 --- testsuite/pyunit/libghdl/arch_bef.vhdl | 5 - testsuite/pyunit/libghdl/arch_inside.vhdl | 6 - testsuite/pyunit/libghdl/arch_inside_fail.vhdl | 5 - testsuite/pyunit/libghdl/array.vhdl | 4 - testsuite/pyunit/libghdl/conf_bef.vhdl | 6 - testsuite/pyunit/libghdl/conf_inside.vhdl | 6 - testsuite/pyunit/libghdl/conf_inside_fail.vhdl | 6 - testsuite/pyunit/libghdl/const.vhdl | 4 - testsuite/pyunit/libghdl/const_fail.vhdl | 4 - testsuite/pyunit/libghdl/ctxt_bef.vhdl | 4 - testsuite/pyunit/libghdl/ctxt_inside.vhdl | 5 - testsuite/pyunit/libghdl/ctxt_inside_fail.vhdl | 5 - testsuite/pyunit/libghdl/element_1.vhdl | 7 -- testsuite/pyunit/libghdl/element_2.vhdl | 7 -- testsuite/pyunit/libghdl/element_3.vhdl | 6 - testsuite/pyunit/libghdl/element_4.vhdl | 7 -- testsuite/pyunit/libghdl/elements_fail.vhdl | 7 -- testsuite/pyunit/libghdl/ent_arch.vhdl | 10 -- testsuite/pyunit/libghdl/ent_bef.vhdl | 4 - testsuite/pyunit/libghdl/ent_inside.vhdl | 15 --- testsuite/pyunit/libghdl/enum.vhdl | 4 - testsuite/pyunit/libghdl/enum_fail.vhdl | 4 - testsuite/pyunit/libghdl/enumlit_1.vhdl | 8 -- testsuite/pyunit/libghdl/enumlit_2.vhdl | 8 -- testsuite/pyunit/libghdl/enumlit_3.vhdl | 8 -- testsuite/pyunit/libghdl/enumlit_fail.vhdl | 8 -- testsuite/pyunit/libghdl/examples/Complex.vhdl | 132 +++++++++++++++++++++ .../libghdl/examples/comments/DesignComment.vhdl | 14 +++ .../pyunit/libghdl/examples/comments/arch_bef.vhdl | 5 + .../libghdl/examples/comments/arch_inside.vhdl | 6 + .../examples/comments/arch_inside_fail.vhdl | 5 + .../pyunit/libghdl/examples/comments/array.vhdl | 4 + .../pyunit/libghdl/examples/comments/conf_bef.vhdl | 6 + .../libghdl/examples/comments/conf_inside.vhdl | 6 + .../examples/comments/conf_inside_fail.vhdl | 6 + .../pyunit/libghdl/examples/comments/const.vhdl | 4 + .../libghdl/examples/comments/const_fail.vhdl | 4 + .../pyunit/libghdl/examples/comments/ctxt_bef.vhdl | 4 + .../libghdl/examples/comments/ctxt_inside.vhdl | 5 + .../examples/comments/ctxt_inside_fail.vhdl | 5 + .../libghdl/examples/comments/element_1.vhdl | 7 ++ .../libghdl/examples/comments/element_2.vhdl | 7 ++ .../libghdl/examples/comments/element_3.vhdl | 6 + .../libghdl/examples/comments/element_4.vhdl | 7 ++ .../libghdl/examples/comments/elements_fail.vhdl | 7 ++ .../pyunit/libghdl/examples/comments/ent_arch.vhdl | 10 ++ .../pyunit/libghdl/examples/comments/ent_bef.vhdl | 4 + .../libghdl/examples/comments/ent_inside.vhdl | 15 +++ .../pyunit/libghdl/examples/comments/enum.vhdl | 4 + .../libghdl/examples/comments/enum_fail.vhdl | 4 + .../libghdl/examples/comments/enumlit_1.vhdl | 8 ++ .../libghdl/examples/comments/enumlit_2.vhdl | 8 ++ .../libghdl/examples/comments/enumlit_3.vhdl | 8 ++ .../libghdl/examples/comments/enumlit_fail.vhdl | 8 ++ .../pyunit/libghdl/examples/comments/func.vhdl | 6 + .../libghdl/examples/comments/func_fail.vhdl | 6 + .../libghdl/examples/comments/func_param.vhdl | 9 ++ .../libghdl/examples/comments/func_param_fail.vhdl | 9 ++ .../pyunit/libghdl/examples/comments/line1.vhdl | 4 + .../pyunit/libghdl/examples/comments/multi1.vhdl | 10 ++ .../pyunit/libghdl/examples/comments/pkg_bef.vhdl | 4 + .../libghdl/examples/comments/pkg_inside.vhdl | 5 + .../libghdl/examples/comments/pkg_inside_fail.vhdl | 5 + .../examples/comments/pkg_inside_fail2.vhdl | 3 + .../pyunit/libghdl/examples/comments/process.vhdl | 9 ++ .../libghdl/examples/comments/process_fail.vhdl | 9 ++ .../pyunit/libghdl/examples/comments/record.vhdl | 7 ++ .../libghdl/examples/comments/record_fail.vhdl | 7 ++ .../pyunit/libghdl/examples/comments/sig.vhdl | 5 + .../pyunit/libghdl/examples/comments/sig_2.vhdl | 6 + .../pyunit/libghdl/examples/comments/sig_fail.vhdl | 5 + .../pyunit/libghdl/examples/comments/type.vhdl | 4 + .../libghdl/examples/comments/type_fail.vhdl | 4 + .../pyunit/libghdl/examples/comments/var.vhdl | 12 ++ .../pyunit/libghdl/examples/comments/var_fail.vhdl | 12 ++ testsuite/pyunit/libghdl/func.vhdl | 6 - testsuite/pyunit/libghdl/func_fail.vhdl | 6 - testsuite/pyunit/libghdl/func_param.vhdl | 9 -- testsuite/pyunit/libghdl/func_param_fail.vhdl | 9 -- testsuite/pyunit/libghdl/line1.vhdl | 4 - testsuite/pyunit/libghdl/multi1.vhdl | 10 -- testsuite/pyunit/libghdl/pkg_bef.vhdl | 4 - testsuite/pyunit/libghdl/pkg_inside.vhdl | 5 - testsuite/pyunit/libghdl/pkg_inside_fail.vhdl | 5 - testsuite/pyunit/libghdl/pkg_inside_fail2.vhdl | 3 - testsuite/pyunit/libghdl/process.vhdl | 9 -- testsuite/pyunit/libghdl/process_fail.vhdl | 9 -- testsuite/pyunit/libghdl/record.vhdl | 7 -- testsuite/pyunit/libghdl/record_fail.vhdl | 7 -- testsuite/pyunit/libghdl/sig.vhdl | 5 - testsuite/pyunit/libghdl/sig_2.vhdl | 6 - testsuite/pyunit/libghdl/sig_fail.vhdl | 5 - testsuite/pyunit/libghdl/type.vhdl | 4 - testsuite/pyunit/libghdl/type_fail.vhdl | 4 - testsuite/pyunit/libghdl/var.vhdl | 12 -- testsuite/pyunit/libghdl/var_fail.vhdl | 12 -- 99 files changed, 515 insertions(+), 509 deletions(-) delete mode 100644 testsuite/pyunit/libghdl/Comment2.vhdl delete mode 100644 testsuite/pyunit/libghdl/DesignComment.vhdl delete mode 100644 testsuite/pyunit/libghdl/arch_bef.vhdl delete mode 100644 testsuite/pyunit/libghdl/arch_inside.vhdl delete mode 100644 testsuite/pyunit/libghdl/arch_inside_fail.vhdl delete mode 100644 testsuite/pyunit/libghdl/array.vhdl delete mode 100644 testsuite/pyunit/libghdl/conf_bef.vhdl delete mode 100644 testsuite/pyunit/libghdl/conf_inside.vhdl delete mode 100644 testsuite/pyunit/libghdl/conf_inside_fail.vhdl delete mode 100644 testsuite/pyunit/libghdl/const.vhdl delete mode 100644 testsuite/pyunit/libghdl/const_fail.vhdl delete mode 100644 testsuite/pyunit/libghdl/ctxt_bef.vhdl delete mode 100644 testsuite/pyunit/libghdl/ctxt_inside.vhdl delete mode 100644 testsuite/pyunit/libghdl/ctxt_inside_fail.vhdl delete mode 100644 testsuite/pyunit/libghdl/element_1.vhdl delete mode 100644 testsuite/pyunit/libghdl/element_2.vhdl delete mode 100644 testsuite/pyunit/libghdl/element_3.vhdl delete mode 100644 testsuite/pyunit/libghdl/element_4.vhdl delete mode 100644 testsuite/pyunit/libghdl/elements_fail.vhdl delete mode 100644 testsuite/pyunit/libghdl/ent_arch.vhdl delete mode 100644 testsuite/pyunit/libghdl/ent_bef.vhdl delete mode 100644 testsuite/pyunit/libghdl/ent_inside.vhdl delete mode 100644 testsuite/pyunit/libghdl/enum.vhdl delete mode 100644 testsuite/pyunit/libghdl/enum_fail.vhdl delete mode 100644 testsuite/pyunit/libghdl/enumlit_1.vhdl delete mode 100644 testsuite/pyunit/libghdl/enumlit_2.vhdl delete mode 100644 testsuite/pyunit/libghdl/enumlit_3.vhdl delete mode 100644 testsuite/pyunit/libghdl/enumlit_fail.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/Complex.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/DesignComment.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/arch_bef.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/arch_inside.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/arch_inside_fail.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/array.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/conf_bef.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/conf_inside.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/conf_inside_fail.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/const.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/const_fail.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/ctxt_bef.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/ctxt_inside.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/ctxt_inside_fail.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/element_1.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/element_2.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/element_3.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/element_4.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/elements_fail.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/ent_arch.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/ent_bef.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/ent_inside.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/enum.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/enum_fail.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/enumlit_1.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/enumlit_2.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/enumlit_3.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/enumlit_fail.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/func.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/func_fail.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/func_param.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/func_param_fail.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/line1.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/multi1.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/pkg_bef.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/pkg_inside.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/pkg_inside_fail.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/pkg_inside_fail2.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/process.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/process_fail.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/record.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/record_fail.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/sig.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/sig_2.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/sig_fail.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/type.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/type_fail.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/var.vhdl create mode 100644 testsuite/pyunit/libghdl/examples/comments/var_fail.vhdl delete mode 100644 testsuite/pyunit/libghdl/func.vhdl delete mode 100644 testsuite/pyunit/libghdl/func_fail.vhdl delete mode 100644 testsuite/pyunit/libghdl/func_param.vhdl delete mode 100644 testsuite/pyunit/libghdl/func_param_fail.vhdl delete mode 100644 testsuite/pyunit/libghdl/line1.vhdl delete mode 100644 testsuite/pyunit/libghdl/multi1.vhdl delete mode 100644 testsuite/pyunit/libghdl/pkg_bef.vhdl delete mode 100644 testsuite/pyunit/libghdl/pkg_inside.vhdl delete mode 100644 testsuite/pyunit/libghdl/pkg_inside_fail.vhdl delete mode 100644 testsuite/pyunit/libghdl/pkg_inside_fail2.vhdl delete mode 100644 testsuite/pyunit/libghdl/process.vhdl delete mode 100644 testsuite/pyunit/libghdl/process_fail.vhdl delete mode 100644 testsuite/pyunit/libghdl/record.vhdl delete mode 100644 testsuite/pyunit/libghdl/record_fail.vhdl delete mode 100644 testsuite/pyunit/libghdl/sig.vhdl delete mode 100644 testsuite/pyunit/libghdl/sig_2.vhdl delete mode 100644 testsuite/pyunit/libghdl/sig_fail.vhdl delete mode 100644 testsuite/pyunit/libghdl/type.vhdl delete mode 100644 testsuite/pyunit/libghdl/type_fail.vhdl delete mode 100644 testsuite/pyunit/libghdl/var.vhdl delete mode 100644 testsuite/pyunit/libghdl/var_fail.vhdl (limited to 'testsuite/pyunit') diff --git a/testsuite/pyunit/libghdl/Comment2.vhdl b/testsuite/pyunit/libghdl/Comment2.vhdl deleted file mode 100644 index e56815a52..000000000 --- a/testsuite/pyunit/libghdl/Comment2.vhdl +++ /dev/null @@ -1,132 +0,0 @@ --- comments before design units (javadoc / .net documentation style) --- might be multiline -entity e1 is -end entity; - --- comments before design units --- might be multiline -architecture a1 of e1 is -begin -end architecture; - --- comments before design units --- might be multiline -package p1 is -end package; - --- package body should be supported too to keep parity, but I have currently no usecase for it. - --- comments before design units --- might be multiline -context ctx1 is -end context; - --- comments before design units --- might be multiline -configuration cfg1 of e1 is - for a1 - end for; -end configuration; - - -library ieee; -use ieee.std_logic_1164.all; - -entity e2 is - -- comments in design units (python doc-string style) - -- might be multi line - generic ( - -- comment before a generic - -- might be multiline - constant FREQUENCY : positive; - constant BITS : positive; -- comment after a generic are mostly single line, - -- but could be multi line too - -- in case comment is before and after - constant DEBUG : boolean -- the after has presidence - ); - port ( - signal Clock : in std_logic -- same as for generics - ); -end entity; - -architecture a2 of e2 is - -- comments in design units (python doc-string style) - -- might be multi line -begin - -end architecture; - --- As packages define public elements like constants, types and sub-programs, we are intrested in such documentation too. -package p2 is - -- comments in design units (python doc-string style) - -- might be multi line - - -- comment before - constant DEBUG : boolean := TRUE; - constant SYNC_STAGES : positive := 3; -- comment after - - -- comment before - type AType1 is array(natural range <>) of bit; - type AType2 is array(natural range <>) of bit; -- comment after - - -- same applies to subtype, alias, attributes, ... - - -- comment before - type RType is record - -- xor comment inside - - -- per element comment before (note the comment "block" is separated by newlines) - elem1 : integer; - elem2 : integer; -- per element comment behind - end record; - - -- as functions are longer in definitions, it might be written before - function log2(param : positive) return natural; - - function log2( - -- otoh, we also want to document parameters too (similar to a record with comments) - - -- comment before - param1 : integer; - param2 : boolean -- comment after - ) return natural; - - -- this applies to procedures as well. - - - -end package; - -context ctx2 is - -- comments in design units (python doc-string style) - -- might be multi line -end context; - -configuration cfg2 of e2 is - -- comments in design units (python doc-string style) - -- might be multi line - for a2 - end for; -end configuration; - - - - - - - --- This should allow for any kind of documentation style and embedded documentation language. --- A real implementation might use similar rules are Python+docutils+Sphinx. Here we would e.g. --- document a function either before (or inside) a function declaration and use the --- :arg name: description --- syntax. - - --- Package `math` provides math extensions not provided by the IEEE packages. -package math is - -- Computes the logarith to base 2. - -- - -- :arg param: Input value - -- :returns: Logarithm - function log2(param : positive) return natural; -end package; diff --git a/testsuite/pyunit/libghdl/Comments.py b/testsuite/pyunit/libghdl/Comments.py index ff45a8057..ea0bf81ed 100644 --- a/testsuite/pyunit/libghdl/Comments.py +++ b/testsuite/pyunit/libghdl/Comments.py @@ -1,5 +1,6 @@ from pathlib import Path -from unittest import TestCase, skip, expectedFailure +from unittest import TestCase, expectedFailure +from pytest import mark import pyGHDL.libghdl as libghdl from pyGHDL.libghdl import name_table, files_map, errorout_console, flags @@ -12,8 +13,8 @@ if __name__ == "__main__": exit(1) -class Instantiate(TestCase): - _root = Path(__file__).resolve().parent +class Base(TestCase): + _root = Path(__file__).resolve().parent / "examples" @staticmethod def getIdentifier(node) -> str: @@ -39,9 +40,10 @@ class Instantiate(TestCase): f = files_map.Location_To_File(nodes.Get_Location(node)) idx = file_comments.Find_First_Comment(f, node) while idx != file_comments.No_Comment_Index: - s = file_comments.Get_Comment(f, idx) - self.assertTrue(s.find(':'+name+':') >= 0, - f"no :{name}: in '{s}'") + commentText = file_comments.Get_Comment(f, idx) + commentStart = file_comments.Get_Comment_Start(f, idx) + commentEnd = file_comments.Get_Comment_Last(f, idx) + self.assertTrue(commentText.find(':'+name+':') >= 0, f"no :{name}: in [{commentStart}..{commentEnd}] '{commentText}'({len(commentText)})") idx = file_comments.Get_Next_Comment(f, idx) def checkFlist(self, flist) -> None: @@ -126,170 +128,174 @@ class Instantiate(TestCase): designUnit = nodes.Get_Chain(designUnit) + +class CommentAssociation(Base): def test_Comments(self) -> None: """Very first test""" - self.checkFile(self._root / "DesignComment.vhdl") - - @skip("not yet handled") - def test_Comment2(self) -> None: - """More exhaustive""" - self.checkFile(self._root / "Comment2.vhdl") + self.checkFile(self._root / "comments/DesignComment.vhdl") def test_entity_before(self) -> None: - self.checkFile(self._root / "ent_bef.vhdl") + self.checkFile(self._root / "comments/ent_bef.vhdl") def test_arch_before(self) -> None: - self.checkFile(self._root / "arch_bef.vhdl") + self.checkFile(self._root / "comments/arch_bef.vhdl") def test_pkg_before(self) -> None: - self.checkFile(self._root / "pkg_bef.vhdl") + self.checkFile(self._root / "comments/pkg_bef.vhdl") def test_ctxt_before(self) -> None: - self.checkFile(self._root / "ctxt_bef.vhdl") + self.checkFile(self._root / "comments/ctxt_bef.vhdl") def test_conf_before(self) -> None: - self.checkFile(self._root / "conf_bef.vhdl") + self.checkFile(self._root / "comments/conf_bef.vhdl") def test_entity_inside(self) -> None: - self.checkFile(self._root / "ent_inside.vhdl") + self.checkFile(self._root / "comments/ent_inside.vhdl") def test_entity_arch(self) -> None: - self.checkFile(self._root / "ent_arch.vhdl") + self.checkFile(self._root / "comments/ent_arch.vhdl") @expectedFailure def test_arch_inside_fail(self) -> None: - self.checkFile(self._root / "arch_inside_fail.vhdl") + self.checkFile(self._root / "comments/arch_inside_fail.vhdl") def test_arch_inside(self) -> None: - self.checkFile(self._root / "arch_inside.vhdl") + self.checkFile(self._root / "comments/arch_inside.vhdl") @expectedFailure def test_pkg_inside_fail(self) -> None: - self.checkFile(self._root / "pkg_inside_fail.vhdl") + self.checkFile(self._root / "comments/pkg_inside_fail.vhdl") @expectedFailure def test_pkg_inside_fail2(self) -> None: - self.checkFile(self._root / "pkg_inside_fail2.vhdl") + self.checkFile(self._root / "comments/pkg_inside_fail2.vhdl") def test_pkg_inside(self) -> None: - self.checkFile(self._root / "pkg_inside.vhdl") + self.checkFile(self._root / "comments/pkg_inside.vhdl") @expectedFailure def test_ctxt_inside_fail(self) -> None: - self.checkFile(self._root / "ctxt_inside_fail.vhdl") + self.checkFile(self._root / "comments/ctxt_inside_fail.vhdl") def test_ctxt_inside(self) -> None: - self.checkFile(self._root / "ctxt_inside.vhdl") + self.checkFile(self._root / "comments/ctxt_inside.vhdl") @expectedFailure def test_conf_inside_fail(self) -> None: - self.checkFile(self._root / "conf_inside_fail.vhdl") + self.checkFile(self._root / "comments/conf_inside_fail.vhdl") def test_conf_inside(self) -> None: - self.checkFile(self._root / "conf_inside.vhdl") + self.checkFile(self._root / "comments/conf_inside.vhdl") @expectedFailure def test_const_fail(self) -> None: - self.checkFile(self._root / "const_fail.vhdl") + self.checkFile(self._root / "comments/const_fail.vhdl") def test_const(self) -> None: - self.checkFile(self._root / "const.vhdl") + self.checkFile(self._root / "comments/const.vhdl") @expectedFailure def test_sig_fail(self) -> None: - self.checkFile(self._root / "sig_fail.vhdl") + self.checkFile(self._root / "comments/sig_fail.vhdl") def test_sig(self) -> None: - self.checkFile(self._root / "sig.vhdl") + self.checkFile(self._root / "comments/sig.vhdl") def test_sig_2(self) -> None: - self.checkFile(self._root / "sig_2.vhdl") + self.checkFile(self._root / "comments/sig_2.vhdl") @expectedFailure def test_var_fail(self) -> None: - self.checkFile(self._root / "var_fail.vhdl") + self.checkFile(self._root / "comments/var_fail.vhdl") def test_var(self) -> None: - self.checkFile(self._root / "var.vhdl") + self.checkFile(self._root / "comments/var.vhdl") @expectedFailure def test_type_fail(self) -> None: - self.checkFile(self._root / "type_fail.vhdl") + self.checkFile(self._root / "comments/type_fail.vhdl") def test_type(self) -> None: - self.checkFile(self._root / "type.vhdl") + self.checkFile(self._root / "comments/type.vhdl") def test_array(self) -> None: - self.checkFile(self._root / "array.vhdl") + self.checkFile(self._root / "comments/array.vhdl") @expectedFailure def test_record_fail(self) -> None: - self.checkFile(self._root / "record_fail.vhdl") + self.checkFile(self._root / "comments/record_fail.vhdl") def test_record(self) -> None: - self.checkFile(self._root / "record.vhdl") + self.checkFile(self._root / "comments/record.vhdl") @expectedFailure def test_elements_fail(self) -> None: - self.checkFile(self._root / "elements_fail.vhdl") + self.checkFile(self._root / "comments/elements_fail.vhdl") def test_element_1(self) -> None: - self.checkFile(self._root / "element_1.vhdl") + self.checkFile(self._root / "comments/element_1.vhdl") def test_element_2(self) -> None: - self.checkFile(self._root / "element_2.vhdl") + self.checkFile(self._root / "comments/element_2.vhdl") def test_element_3(self) -> None: - self.checkFile(self._root / "element_3.vhdl") + self.checkFile(self._root / "comments/element_3.vhdl") def test_element_4(self) -> None: - self.checkFile(self._root / "element_4.vhdl") + self.checkFile(self._root / "comments/element_4.vhdl") @expectedFailure def test_enum_fail(self) -> None: - self.checkFile(self._root / "enum_fail.vhdl") + self.checkFile(self._root / "comments/enum_fail.vhdl") def test_enum(self) -> None: - self.checkFile(self._root / "enum.vhdl") + self.checkFile(self._root / "comments/enum.vhdl") @expectedFailure def test_enumlit_fail(self) -> None: - self.checkFile(self._root / "enumlit_fail.vhdl") + self.checkFile(self._root / "comments/enumlit_fail.vhdl") def test_enumlit_1(self) -> None: - self.checkFile(self._root / "enumlit_1.vhdl") + self.checkFile(self._root / "comments/enumlit_1.vhdl") def test_enumlit_2(self) -> None: - self.checkFile(self._root / "enumlit_2.vhdl") + self.checkFile(self._root / "comments/enumlit_2.vhdl") def test_enumlit_3(self) -> None: - self.checkFile(self._root / "enumlit_3.vhdl") + self.checkFile(self._root / "comments/enumlit_3.vhdl") @expectedFailure def test_func_fail(self) -> None: - self.checkFile(self._root / "func_fail.vhdl") + self.checkFile(self._root / "comments/func_fail.vhdl") def test_func(self) -> None: - self.checkFile(self._root / "func.vhdl") + self.checkFile(self._root / "comments/func.vhdl") @expectedFailure def test_func_param_fail(self) -> None: - self.checkFile(self._root / "func_param_fail.vhdl") + self.checkFile(self._root / "comments/func_param_fail.vhdl") def test_func_param(self) -> None: - self.checkFile(self._root / "func_param.vhdl") + self.checkFile(self._root / "comments/func_param.vhdl") @expectedFailure def test_process_fail(self) -> None: - self.checkFile(self._root / "process_fail.vhdl") + self.checkFile(self._root / "comments/process_fail.vhdl") def test_process(self) -> None: - self.checkFile(self._root / "process.vhdl") + self.checkFile(self._root / "comments/process.vhdl") def test_multi1(self) -> None: - self.checkFile(self._root / "multi1.vhdl") + self.checkFile(self._root / "comments/multi1.vhdl") def test_line1(self) -> None: - self.checkFile(self._root / "line1.vhdl") + self.checkFile(self._root / "comments/line1.vhdl") + + +class Complex(Base): + @mark.xfail(reason="not yet handled") + def test_Comment2(self) -> None: + """More exhaustive""" + self.checkFile(self._root / "Complex.vhdl") # Empty line before to easy cut & put diff --git a/testsuite/pyunit/libghdl/DesignComment.vhdl b/testsuite/pyunit/libghdl/DesignComment.vhdl deleted file mode 100644 index 5cd555d33..000000000 --- a/testsuite/pyunit/libghdl/DesignComment.vhdl +++ /dev/null @@ -1,14 +0,0 @@ --- No copyright for :accum: design. - -library ieee; -use ieee.std_logic_1164.all; - -entity accum is - port ( - -- :a: and :b: are the inputs of the adder. - a, b : in std_logic_vector (31 downto 0); - -- :res: is the result of the adder. - res : out std_logic_vector (31 downto 0) - ); -end accum; - diff --git a/testsuite/pyunit/libghdl/arch_bef.vhdl b/testsuite/pyunit/libghdl/arch_bef.vhdl deleted file mode 100644 index c089b1429..000000000 --- a/testsuite/pyunit/libghdl/arch_bef.vhdl +++ /dev/null @@ -1,5 +0,0 @@ --- comments before design units :a1: --- might be multiline :a1: -architecture a1 of e1 is -begin -end architecture; diff --git a/testsuite/pyunit/libghdl/arch_inside.vhdl b/testsuite/pyunit/libghdl/arch_inside.vhdl deleted file mode 100644 index 9e2184df3..000000000 --- a/testsuite/pyunit/libghdl/arch_inside.vhdl +++ /dev/null @@ -1,6 +0,0 @@ -architecture a2 of e2 is - -- comments in design units (python doc-string style) :a2: - --:a2: might be multi line -begin - -end architecture; diff --git a/testsuite/pyunit/libghdl/arch_inside_fail.vhdl b/testsuite/pyunit/libghdl/arch_inside_fail.vhdl deleted file mode 100644 index 96002d336..000000000 --- a/testsuite/pyunit/libghdl/arch_inside_fail.vhdl +++ /dev/null @@ -1,5 +0,0 @@ -architecture a2 of e2 is - -- comments in design units (python doc-string style) :fail: -begin - -end architecture; diff --git a/testsuite/pyunit/libghdl/array.vhdl b/testsuite/pyunit/libghdl/array.vhdl deleted file mode 100644 index 69db03d15..000000000 --- a/testsuite/pyunit/libghdl/array.vhdl +++ /dev/null @@ -1,4 +0,0 @@ -package p is - -- Comment for :vec: - type vec is array(natural) of bit_vector(0 to 1); -end p; diff --git a/testsuite/pyunit/libghdl/conf_bef.vhdl b/testsuite/pyunit/libghdl/conf_bef.vhdl deleted file mode 100644 index 0dc3af77e..000000000 --- a/testsuite/pyunit/libghdl/conf_bef.vhdl +++ /dev/null @@ -1,6 +0,0 @@ --- comments before design units :cfg1: --- might be multiline :cfg1: -configuration cfg1 of e1 is - for a1 - end for; -end configuration; diff --git a/testsuite/pyunit/libghdl/conf_inside.vhdl b/testsuite/pyunit/libghdl/conf_inside.vhdl deleted file mode 100644 index 6181d572a..000000000 --- a/testsuite/pyunit/libghdl/conf_inside.vhdl +++ /dev/null @@ -1,6 +0,0 @@ -configuration cfg2 of e2 is - -- comments in design units (python doc-string style) :cfg2: - -- might be multi line :cfg2: - for a2 - end for; -end configuration; diff --git a/testsuite/pyunit/libghdl/conf_inside_fail.vhdl b/testsuite/pyunit/libghdl/conf_inside_fail.vhdl deleted file mode 100644 index 6b9b4dce3..000000000 --- a/testsuite/pyunit/libghdl/conf_inside_fail.vhdl +++ /dev/null @@ -1,6 +0,0 @@ -configuration cfg2 of e2 is - -- comments in design units (python doc-string style) - -- might be multi line - for a2 - end for; -end configuration; diff --git a/testsuite/pyunit/libghdl/const.vhdl b/testsuite/pyunit/libghdl/const.vhdl deleted file mode 100644 index 75e22ab51..000000000 --- a/testsuite/pyunit/libghdl/const.vhdl +++ /dev/null @@ -1,4 +0,0 @@ -package p is - -- Comment for the decl :c1: - constant c1 : natural := 3; -end p; diff --git a/testsuite/pyunit/libghdl/const_fail.vhdl b/testsuite/pyunit/libghdl/const_fail.vhdl deleted file mode 100644 index 79b37fec5..000000000 --- a/testsuite/pyunit/libghdl/const_fail.vhdl +++ /dev/null @@ -1,4 +0,0 @@ -package p is - -- Comment for the decl. - constant c1 : natural := 3; -end p; diff --git a/testsuite/pyunit/libghdl/ctxt_bef.vhdl b/testsuite/pyunit/libghdl/ctxt_bef.vhdl deleted file mode 100644 index f7a8fd31c..000000000 --- a/testsuite/pyunit/libghdl/ctxt_bef.vhdl +++ /dev/null @@ -1,4 +0,0 @@ --- comments before design units :ctx1: ---:ctx1: might be multiline -context ctx1 is -end context; diff --git a/testsuite/pyunit/libghdl/ctxt_inside.vhdl b/testsuite/pyunit/libghdl/ctxt_inside.vhdl deleted file mode 100644 index af7fdc37b..000000000 --- a/testsuite/pyunit/libghdl/ctxt_inside.vhdl +++ /dev/null @@ -1,5 +0,0 @@ -context ctx2 is - -- comments in design units (python doc-string style) :ctx2: - -- might be multi line :ctx2: -end context; - diff --git a/testsuite/pyunit/libghdl/ctxt_inside_fail.vhdl b/testsuite/pyunit/libghdl/ctxt_inside_fail.vhdl deleted file mode 100644 index 71dce9e40..000000000 --- a/testsuite/pyunit/libghdl/ctxt_inside_fail.vhdl +++ /dev/null @@ -1,5 +0,0 @@ -context ctx2 is - -- comments in design units (python doc-string style) - -- might be multi line -end context; - diff --git a/testsuite/pyunit/libghdl/element_1.vhdl b/testsuite/pyunit/libghdl/element_1.vhdl deleted file mode 100644 index f88219bec..000000000 --- a/testsuite/pyunit/libghdl/element_1.vhdl +++ /dev/null @@ -1,7 +0,0 @@ -package p is - type rec is record - -- Comment for the first element :a: - a : bit; - b : bit; - end record; -end p; diff --git a/testsuite/pyunit/libghdl/element_2.vhdl b/testsuite/pyunit/libghdl/element_2.vhdl deleted file mode 100644 index 324dac9db..000000000 --- a/testsuite/pyunit/libghdl/element_2.vhdl +++ /dev/null @@ -1,7 +0,0 @@ -package p is - type rec is record - a : bit; - -- Comment for the first element :b: - b : bit; - end record; -end p; diff --git a/testsuite/pyunit/libghdl/element_3.vhdl b/testsuite/pyunit/libghdl/element_3.vhdl deleted file mode 100644 index 22f20349e..000000000 --- a/testsuite/pyunit/libghdl/element_3.vhdl +++ /dev/null @@ -1,6 +0,0 @@ -package p is - type rec is record - a : bit; -- Comment for :a: - b : bit; -- For :b: - end record; -end p; diff --git a/testsuite/pyunit/libghdl/element_4.vhdl b/testsuite/pyunit/libghdl/element_4.vhdl deleted file mode 100644 index 57f5ea16b..000000000 --- a/testsuite/pyunit/libghdl/element_4.vhdl +++ /dev/null @@ -1,7 +0,0 @@ -package p is - type rec is record - a : bit; -- Comment for :a: - -- Also for :a: - b : bit; - end record; -end p; diff --git a/testsuite/pyunit/libghdl/elements_fail.vhdl b/testsuite/pyunit/libghdl/elements_fail.vhdl deleted file mode 100644 index 9173524f2..000000000 --- a/testsuite/pyunit/libghdl/elements_fail.vhdl +++ /dev/null @@ -1,7 +0,0 @@ -package p is - type rec is record - -- Comment for the first element. - a : bit; - b : bit; - end record; -end p; diff --git a/testsuite/pyunit/libghdl/ent_arch.vhdl b/testsuite/pyunit/libghdl/ent_arch.vhdl deleted file mode 100644 index 2283de701..000000000 --- a/testsuite/pyunit/libghdl/ent_arch.vhdl +++ /dev/null @@ -1,10 +0,0 @@ --- :e1: comments before design units (javadoc / .net documentation style) --- :e1: might be multiline -entity e1 is -end entity; - --- :a1: comments before design units --- :a1: might be multiline -architecture a1 of e1 is -begin -end architecture; diff --git a/testsuite/pyunit/libghdl/ent_bef.vhdl b/testsuite/pyunit/libghdl/ent_bef.vhdl deleted file mode 100644 index 0fbf61d22..000000000 --- a/testsuite/pyunit/libghdl/ent_bef.vhdl +++ /dev/null @@ -1,4 +0,0 @@ --- comments before design units (javadoc / .net documentation style) :e1: --- might be multiline :e1: -entity e1 is -end entity; diff --git a/testsuite/pyunit/libghdl/ent_inside.vhdl b/testsuite/pyunit/libghdl/ent_inside.vhdl deleted file mode 100644 index 834eaa999..000000000 --- a/testsuite/pyunit/libghdl/ent_inside.vhdl +++ /dev/null @@ -1,15 +0,0 @@ -library ieee; -use ieee.std_logic_1164.all; - -entity e2 is - -- comments in design units (python doc-string style) :e2: - -- might be multi line :e2: - generic ( - -- comment before a generic :frequency: - -- might be multiline :frequency: - constant FREQUENCY : positive - ); - port ( - signal Clock : in std_logic - ); -end entity; diff --git a/testsuite/pyunit/libghdl/enum.vhdl b/testsuite/pyunit/libghdl/enum.vhdl deleted file mode 100644 index 320f0a7dc..000000000 --- a/testsuite/pyunit/libghdl/enum.vhdl +++ /dev/null @@ -1,4 +0,0 @@ -package p is - -- Comment for :state_t: - type state_t is (s1, s2, s3); -end p; diff --git a/testsuite/pyunit/libghdl/enum_fail.vhdl b/testsuite/pyunit/libghdl/enum_fail.vhdl deleted file mode 100644 index 51ebfac86..000000000 --- a/testsuite/pyunit/libghdl/enum_fail.vhdl +++ /dev/null @@ -1,4 +0,0 @@ -package p is - -- Comment - type state_t is (s1, s2, s3); -end p; diff --git a/testsuite/pyunit/libghdl/enumlit_1.vhdl b/testsuite/pyunit/libghdl/enumlit_1.vhdl deleted file mode 100644 index c9b923051..000000000 --- a/testsuite/pyunit/libghdl/enumlit_1.vhdl +++ /dev/null @@ -1,8 +0,0 @@ -package p is - type state_t is - ( - -- Comment for :s1: - s1, - s2, - s3); -end p; diff --git a/testsuite/pyunit/libghdl/enumlit_2.vhdl b/testsuite/pyunit/libghdl/enumlit_2.vhdl deleted file mode 100644 index 44aa71d7d..000000000 --- a/testsuite/pyunit/libghdl/enumlit_2.vhdl +++ /dev/null @@ -1,8 +0,0 @@ -package p is - type state_t is - ( - s1, - s2, - -- Comment for :s3: - s3); -end p; diff --git a/testsuite/pyunit/libghdl/enumlit_3.vhdl b/testsuite/pyunit/libghdl/enumlit_3.vhdl deleted file mode 100644 index 7f325f549..000000000 --- a/testsuite/pyunit/libghdl/enumlit_3.vhdl +++ /dev/null @@ -1,8 +0,0 @@ -package p is - type state_t is - ( - s1, -- For :s1: - s2, - s3 -- For :s3: - ); -end p; diff --git a/testsuite/pyunit/libghdl/enumlit_fail.vhdl b/testsuite/pyunit/libghdl/enumlit_fail.vhdl deleted file mode 100644 index 36a200402..000000000 --- a/testsuite/pyunit/libghdl/enumlit_fail.vhdl +++ /dev/null @@ -1,8 +0,0 @@ -package p is - type state_t is - ( - -- Comment - s1, - s2, - s3); -end p; diff --git a/testsuite/pyunit/libghdl/examples/Complex.vhdl b/testsuite/pyunit/libghdl/examples/Complex.vhdl new file mode 100644 index 000000000..87276a2d5 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/Complex.vhdl @@ -0,0 +1,132 @@ +-- :e1: comments before desIgn units (javadoc / .net documentation style) +-- :e1: mIGht be multiline +entity e1 is +end entitY; + +-- :a1: comments before design units +-- :a1: might be multiline +architecture a1 of e1 is +begin +end architecture; + +-- :p1: comments before design units +-- :p1: might be multiline +package p1 is +end package; + +-- package body should be supported too to keep parity, but I have currently no usecase for it. + +-- :ctx1: comments before design units +-- :ctx1: might be multiline +context ctx1 is +end context; + +-- :cfg1: comments before design units +-- :cfg1: might be multiline +configuration cfg1 of e1 is + for a1 + end for; +end configuration; + + +library ieee; +use ieee.std_logic_1164.all; + +entity e2 is + -- :e2: comments in design units (python doc-string style) + -- :e2: might be multi line + generic ( + -- :FREQUENCY: comment before a generic + -- :FREQUENCY: might be multiline + constant FREQUENCY : positive; + constant BITS : positive; -- :BITS: comment after a generic are mostly single line, + -- :BITS: but could be multi line too + -- in case comment is before and after + constant DEBUG : boolean -- :DEBUG: the after has presidency + ); + port ( + signal Clock : in std_logic -- :Clock: same as for generics + ); +end entity; + +architecture a2 of e2 is + -- :a2: comments in design units (python doc-string style) + -- :a2: might be multi line +begin + +end architecture; + +-- As packages define public elements like constants, types and sub-programs, we are interested in such documentation too. +package p2 is + -- :p2: comments in design units (python doc-string style) + -- :p2: might be multi line + + -- :DEBUG: comment before + constant DEBUG : boolean := TRUE; + constant SYNC_STAGES : positive := 3; -- :SYNC_STAGES: comment after + + -- :AType1: comment before + type AType1 is array(natural range <>) of bit; + type AType2 is array(natural range <>) of bit; -- :AType2: comment after + + -- same applies to subtype, alias, attributes, ... + + -- :RType: comment before + type RType is record + -- :RType: xor comment inside + + -- :elem1: per element comment before (note the comment "block" is separated by newlines) + elem1 : integer; + elem2 : integer; -- :elem2: per element comment behind + end record; + + -- :log2: as functions are longer in definitions, it might be written before + function log2(param : positive) return natural; + + function log2( + -- :log2: otoh, we also want to document parameters too (similar to a record with comments) + + -- :param1: comment before + param1 : integer; + param2 : boolean -- :param2: comment after + ) return natural; + + -- this applies to procedures as well. + + + +end package; + +context ctx2 is + -- :ctx2: comments in design units (python doc-string style) + -- :ctx2: might be multi line +end context; + +configuration cfg2 of e2 is + -- :cfg2: comments in design units (python doc-string style) + -- :cfg2: might be multi line + for a2 + end for; +end configuration; + + + + + + + +-- This should allow for any kind of documentation style and embedded documentation language. +-- A real implementation might use similar rules are Python+docutils+Sphinx. Here we would e.g. +-- document a function either before (or inside) a function declaration and use the +-- :arg name: description +-- syntax. + + +-- :math: Package `math` provides math extensions not provided by the IEEE packages. +package math is + -- :log2: Computes the logarithm to base 2. + -- :log2: + -- :log2: :arg param: Input value + -- :log2: :returns: Logarithm + function log2(param : positive) return natural; +end package; diff --git a/testsuite/pyunit/libghdl/examples/comments/DesignComment.vhdl b/testsuite/pyunit/libghdl/examples/comments/DesignComment.vhdl new file mode 100644 index 000000000..5cd555d33 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/DesignComment.vhdl @@ -0,0 +1,14 @@ +-- No copyright for :accum: design. + +library ieee; +use ieee.std_logic_1164.all; + +entity accum is + port ( + -- :a: and :b: are the inputs of the adder. + a, b : in std_logic_vector (31 downto 0); + -- :res: is the result of the adder. + res : out std_logic_vector (31 downto 0) + ); +end accum; + diff --git a/testsuite/pyunit/libghdl/examples/comments/arch_bef.vhdl b/testsuite/pyunit/libghdl/examples/comments/arch_bef.vhdl new file mode 100644 index 000000000..c089b1429 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/arch_bef.vhdl @@ -0,0 +1,5 @@ +-- comments before design units :a1: +-- might be multiline :a1: +architecture a1 of e1 is +begin +end architecture; diff --git a/testsuite/pyunit/libghdl/examples/comments/arch_inside.vhdl b/testsuite/pyunit/libghdl/examples/comments/arch_inside.vhdl new file mode 100644 index 000000000..9e2184df3 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/arch_inside.vhdl @@ -0,0 +1,6 @@ +architecture a2 of e2 is + -- comments in design units (python doc-string style) :a2: + --:a2: might be multi line +begin + +end architecture; diff --git a/testsuite/pyunit/libghdl/examples/comments/arch_inside_fail.vhdl b/testsuite/pyunit/libghdl/examples/comments/arch_inside_fail.vhdl new file mode 100644 index 000000000..96002d336 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/arch_inside_fail.vhdl @@ -0,0 +1,5 @@ +architecture a2 of e2 is + -- comments in design units (python doc-string style) :fail: +begin + +end architecture; diff --git a/testsuite/pyunit/libghdl/examples/comments/array.vhdl b/testsuite/pyunit/libghdl/examples/comments/array.vhdl new file mode 100644 index 000000000..69db03d15 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/array.vhdl @@ -0,0 +1,4 @@ +package p is + -- Comment for :vec: + type vec is array(natural) of bit_vector(0 to 1); +end p; diff --git a/testsuite/pyunit/libghdl/examples/comments/conf_bef.vhdl b/testsuite/pyunit/libghdl/examples/comments/conf_bef.vhdl new file mode 100644 index 000000000..0dc3af77e --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/conf_bef.vhdl @@ -0,0 +1,6 @@ +-- comments before design units :cfg1: +-- might be multiline :cfg1: +configuration cfg1 of e1 is + for a1 + end for; +end configuration; diff --git a/testsuite/pyunit/libghdl/examples/comments/conf_inside.vhdl b/testsuite/pyunit/libghdl/examples/comments/conf_inside.vhdl new file mode 100644 index 000000000..6181d572a --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/conf_inside.vhdl @@ -0,0 +1,6 @@ +configuration cfg2 of e2 is + -- comments in design units (python doc-string style) :cfg2: + -- might be multi line :cfg2: + for a2 + end for; +end configuration; diff --git a/testsuite/pyunit/libghdl/examples/comments/conf_inside_fail.vhdl b/testsuite/pyunit/libghdl/examples/comments/conf_inside_fail.vhdl new file mode 100644 index 000000000..6b9b4dce3 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/conf_inside_fail.vhdl @@ -0,0 +1,6 @@ +configuration cfg2 of e2 is + -- comments in design units (python doc-string style) + -- might be multi line + for a2 + end for; +end configuration; diff --git a/testsuite/pyunit/libghdl/examples/comments/const.vhdl b/testsuite/pyunit/libghdl/examples/comments/const.vhdl new file mode 100644 index 000000000..75e22ab51 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/const.vhdl @@ -0,0 +1,4 @@ +package p is + -- Comment for the decl :c1: + constant c1 : natural := 3; +end p; diff --git a/testsuite/pyunit/libghdl/examples/comments/const_fail.vhdl b/testsuite/pyunit/libghdl/examples/comments/const_fail.vhdl new file mode 100644 index 000000000..79b37fec5 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/const_fail.vhdl @@ -0,0 +1,4 @@ +package p is + -- Comment for the decl. + constant c1 : natural := 3; +end p; diff --git a/testsuite/pyunit/libghdl/examples/comments/ctxt_bef.vhdl b/testsuite/pyunit/libghdl/examples/comments/ctxt_bef.vhdl new file mode 100644 index 000000000..f7a8fd31c --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/ctxt_bef.vhdl @@ -0,0 +1,4 @@ +-- comments before design units :ctx1: +--:ctx1: might be multiline +context ctx1 is +end context; diff --git a/testsuite/pyunit/libghdl/examples/comments/ctxt_inside.vhdl b/testsuite/pyunit/libghdl/examples/comments/ctxt_inside.vhdl new file mode 100644 index 000000000..af7fdc37b --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/ctxt_inside.vhdl @@ -0,0 +1,5 @@ +context ctx2 is + -- comments in design units (python doc-string style) :ctx2: + -- might be multi line :ctx2: +end context; + diff --git a/testsuite/pyunit/libghdl/examples/comments/ctxt_inside_fail.vhdl b/testsuite/pyunit/libghdl/examples/comments/ctxt_inside_fail.vhdl new file mode 100644 index 000000000..71dce9e40 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/ctxt_inside_fail.vhdl @@ -0,0 +1,5 @@ +context ctx2 is + -- comments in design units (python doc-string style) + -- might be multi line +end context; + diff --git a/testsuite/pyunit/libghdl/examples/comments/element_1.vhdl b/testsuite/pyunit/libghdl/examples/comments/element_1.vhdl new file mode 100644 index 000000000..f88219bec --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/element_1.vhdl @@ -0,0 +1,7 @@ +package p is + type rec is record + -- Comment for the first element :a: + a : bit; + b : bit; + end record; +end p; diff --git a/testsuite/pyunit/libghdl/examples/comments/element_2.vhdl b/testsuite/pyunit/libghdl/examples/comments/element_2.vhdl new file mode 100644 index 000000000..324dac9db --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/element_2.vhdl @@ -0,0 +1,7 @@ +package p is + type rec is record + a : bit; + -- Comment for the first element :b: + b : bit; + end record; +end p; diff --git a/testsuite/pyunit/libghdl/examples/comments/element_3.vhdl b/testsuite/pyunit/libghdl/examples/comments/element_3.vhdl new file mode 100644 index 000000000..22f20349e --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/element_3.vhdl @@ -0,0 +1,6 @@ +package p is + type rec is record + a : bit; -- Comment for :a: + b : bit; -- For :b: + end record; +end p; diff --git a/testsuite/pyunit/libghdl/examples/comments/element_4.vhdl b/testsuite/pyunit/libghdl/examples/comments/element_4.vhdl new file mode 100644 index 000000000..57f5ea16b --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/element_4.vhdl @@ -0,0 +1,7 @@ +package p is + type rec is record + a : bit; -- Comment for :a: + -- Also for :a: + b : bit; + end record; +end p; diff --git a/testsuite/pyunit/libghdl/examples/comments/elements_fail.vhdl b/testsuite/pyunit/libghdl/examples/comments/elements_fail.vhdl new file mode 100644 index 000000000..9173524f2 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/elements_fail.vhdl @@ -0,0 +1,7 @@ +package p is + type rec is record + -- Comment for the first element. + a : bit; + b : bit; + end record; +end p; diff --git a/testsuite/pyunit/libghdl/examples/comments/ent_arch.vhdl b/testsuite/pyunit/libghdl/examples/comments/ent_arch.vhdl new file mode 100644 index 000000000..2283de701 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/ent_arch.vhdl @@ -0,0 +1,10 @@ +-- :e1: comments before design units (javadoc / .net documentation style) +-- :e1: might be multiline +entity e1 is +end entity; + +-- :a1: comments before design units +-- :a1: might be multiline +architecture a1 of e1 is +begin +end architecture; diff --git a/testsuite/pyunit/libghdl/examples/comments/ent_bef.vhdl b/testsuite/pyunit/libghdl/examples/comments/ent_bef.vhdl new file mode 100644 index 000000000..0fbf61d22 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/ent_bef.vhdl @@ -0,0 +1,4 @@ +-- comments before design units (javadoc / .net documentation style) :e1: +-- might be multiline :e1: +entity e1 is +end entity; diff --git a/testsuite/pyunit/libghdl/examples/comments/ent_inside.vhdl b/testsuite/pyunit/libghdl/examples/comments/ent_inside.vhdl new file mode 100644 index 000000000..834eaa999 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/ent_inside.vhdl @@ -0,0 +1,15 @@ +library ieee; +use ieee.std_logic_1164.all; + +entity e2 is + -- comments in design units (python doc-string style) :e2: + -- might be multi line :e2: + generic ( + -- comment before a generic :frequency: + -- might be multiline :frequency: + constant FREQUENCY : positive + ); + port ( + signal Clock : in std_logic + ); +end entity; diff --git a/testsuite/pyunit/libghdl/examples/comments/enum.vhdl b/testsuite/pyunit/libghdl/examples/comments/enum.vhdl new file mode 100644 index 000000000..320f0a7dc --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/enum.vhdl @@ -0,0 +1,4 @@ +package p is + -- Comment for :state_t: + type state_t is (s1, s2, s3); +end p; diff --git a/testsuite/pyunit/libghdl/examples/comments/enum_fail.vhdl b/testsuite/pyunit/libghdl/examples/comments/enum_fail.vhdl new file mode 100644 index 000000000..51ebfac86 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/enum_fail.vhdl @@ -0,0 +1,4 @@ +package p is + -- Comment + type state_t is (s1, s2, s3); +end p; diff --git a/testsuite/pyunit/libghdl/examples/comments/enumlit_1.vhdl b/testsuite/pyunit/libghdl/examples/comments/enumlit_1.vhdl new file mode 100644 index 000000000..c9b923051 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/enumlit_1.vhdl @@ -0,0 +1,8 @@ +package p is + type state_t is + ( + -- Comment for :s1: + s1, + s2, + s3); +end p; diff --git a/testsuite/pyunit/libghdl/examples/comments/enumlit_2.vhdl b/testsuite/pyunit/libghdl/examples/comments/enumlit_2.vhdl new file mode 100644 index 000000000..44aa71d7d --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/enumlit_2.vhdl @@ -0,0 +1,8 @@ +package p is + type state_t is + ( + s1, + s2, + -- Comment for :s3: + s3); +end p; diff --git a/testsuite/pyunit/libghdl/examples/comments/enumlit_3.vhdl b/testsuite/pyunit/libghdl/examples/comments/enumlit_3.vhdl new file mode 100644 index 000000000..7f325f549 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/enumlit_3.vhdl @@ -0,0 +1,8 @@ +package p is + type state_t is + ( + s1, -- For :s1: + s2, + s3 -- For :s3: + ); +end p; diff --git a/testsuite/pyunit/libghdl/examples/comments/enumlit_fail.vhdl b/testsuite/pyunit/libghdl/examples/comments/enumlit_fail.vhdl new file mode 100644 index 000000000..36a200402 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/enumlit_fail.vhdl @@ -0,0 +1,8 @@ +package p is + type state_t is + ( + -- Comment + s1, + s2, + s3); +end p; diff --git a/testsuite/pyunit/libghdl/examples/comments/func.vhdl b/testsuite/pyunit/libghdl/examples/comments/func.vhdl new file mode 100644 index 000000000..1c6fc8741 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/func.vhdl @@ -0,0 +1,6 @@ +package p is + -- :log2: as functions are longer in definitions, it might be written before + function log2(param : positive) return natural; +end p; + + diff --git a/testsuite/pyunit/libghdl/examples/comments/func_fail.vhdl b/testsuite/pyunit/libghdl/examples/comments/func_fail.vhdl new file mode 100644 index 000000000..68ff2b80e --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/func_fail.vhdl @@ -0,0 +1,6 @@ +package p is + -- as functions are longer in definitions, it might be written before + function log2(param : positive) return natural; +end p; + + diff --git a/testsuite/pyunit/libghdl/examples/comments/func_param.vhdl b/testsuite/pyunit/libghdl/examples/comments/func_param.vhdl new file mode 100644 index 000000000..fb47687e5 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/func_param.vhdl @@ -0,0 +1,9 @@ +package p is + function log2( + -- :param1: we also want to document parameters too + param1 : integer; + param2 : boolean + ) return natural; +end p; + + diff --git a/testsuite/pyunit/libghdl/examples/comments/func_param_fail.vhdl b/testsuite/pyunit/libghdl/examples/comments/func_param_fail.vhdl new file mode 100644 index 000000000..53461fdd9 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/func_param_fail.vhdl @@ -0,0 +1,9 @@ +package p is + function log2( + -- we also want to document parameters too + param1 : integer; + param2 : boolean + ) return natural; +end p; + + diff --git a/testsuite/pyunit/libghdl/examples/comments/line1.vhdl b/testsuite/pyunit/libghdl/examples/comments/line1.vhdl new file mode 100644 index 000000000..2a4ed11bc --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/line1.vhdl @@ -0,0 +1,4 @@ +architecture arch of ent is + signal b1 : bit; -- Comment for :b1: +begin +end arch; diff --git a/testsuite/pyunit/libghdl/examples/comments/multi1.vhdl b/testsuite/pyunit/libghdl/examples/comments/multi1.vhdl new file mode 100644 index 000000000..73eebd5b5 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/multi1.vhdl @@ -0,0 +1,10 @@ +architecture arch of ent is + -- Comment for :arch: + -- Again for :arch: + + -- Also for :arch: + + -- But for :b1: + signal b1 : bit; +begin +end arch; diff --git a/testsuite/pyunit/libghdl/examples/comments/pkg_bef.vhdl b/testsuite/pyunit/libghdl/examples/comments/pkg_bef.vhdl new file mode 100644 index 000000000..1ed150346 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/pkg_bef.vhdl @@ -0,0 +1,4 @@ +-- comments before design units :p1: +-- :p1: might be multiline +package p1 is +end package; diff --git a/testsuite/pyunit/libghdl/examples/comments/pkg_inside.vhdl b/testsuite/pyunit/libghdl/examples/comments/pkg_inside.vhdl new file mode 100644 index 000000000..c9f6129d4 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/pkg_inside.vhdl @@ -0,0 +1,5 @@ +-- As packages define public elements like constants, types and sub-programs, we are intrested in such documentation too.:p2: +package p2 is + -- comments in design units (python doc-string style):p2: + -- might be multi line :p2: +end package; diff --git a/testsuite/pyunit/libghdl/examples/comments/pkg_inside_fail.vhdl b/testsuite/pyunit/libghdl/examples/comments/pkg_inside_fail.vhdl new file mode 100644 index 000000000..4b2b9e653 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/pkg_inside_fail.vhdl @@ -0,0 +1,5 @@ +package p2 is + -- comments in design units (python doc-string style) :fail: + + constant c : natural := 5; +end package; diff --git a/testsuite/pyunit/libghdl/examples/comments/pkg_inside_fail2.vhdl b/testsuite/pyunit/libghdl/examples/comments/pkg_inside_fail2.vhdl new file mode 100644 index 000000000..f5e347488 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/pkg_inside_fail2.vhdl @@ -0,0 +1,3 @@ +package p2 is + -- comments in design units (python doc-string style) :fail: +end package; diff --git a/testsuite/pyunit/libghdl/examples/comments/process.vhdl b/testsuite/pyunit/libghdl/examples/comments/process.vhdl new file mode 100644 index 000000000..c0b56fe6e --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/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/examples/comments/process_fail.vhdl b/testsuite/pyunit/libghdl/examples/comments/process_fail.vhdl new file mode 100644 index 000000000..819e5ea6e --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/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; diff --git a/testsuite/pyunit/libghdl/examples/comments/record.vhdl b/testsuite/pyunit/libghdl/examples/comments/record.vhdl new file mode 100644 index 000000000..82d5c1faa --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/record.vhdl @@ -0,0 +1,7 @@ +package p is + -- Comment for :rec: + type rec is record + a : bit; + b : bit; + end record; +end p; diff --git a/testsuite/pyunit/libghdl/examples/comments/record_fail.vhdl b/testsuite/pyunit/libghdl/examples/comments/record_fail.vhdl new file mode 100644 index 000000000..6288920f7 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/record_fail.vhdl @@ -0,0 +1,7 @@ +package p is + -- Comment for the record + type rec is record + a : bit; + b : bit; + end record; +end p; diff --git a/testsuite/pyunit/libghdl/examples/comments/sig.vhdl b/testsuite/pyunit/libghdl/examples/comments/sig.vhdl new file mode 100644 index 000000000..ee0865ae4 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/sig.vhdl @@ -0,0 +1,5 @@ +architecture arch of ent is + -- Comment for :b2: + signal b2 : bit; +begin +end arch; diff --git a/testsuite/pyunit/libghdl/examples/comments/sig_2.vhdl b/testsuite/pyunit/libghdl/examples/comments/sig_2.vhdl new file mode 100644 index 000000000..c825a41e5 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/sig_2.vhdl @@ -0,0 +1,6 @@ +architecture arch of ent is + signal s1 : bit; -- comment for :s1: + -- Also for :s1: + signal s2: natural; +begin +end arch; diff --git a/testsuite/pyunit/libghdl/examples/comments/sig_fail.vhdl b/testsuite/pyunit/libghdl/examples/comments/sig_fail.vhdl new file mode 100644 index 000000000..4630d2877 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/sig_fail.vhdl @@ -0,0 +1,5 @@ +architecture arch of ent is + -- Comment + signal b2 : bit; +begin +end arch; diff --git a/testsuite/pyunit/libghdl/examples/comments/type.vhdl b/testsuite/pyunit/libghdl/examples/comments/type.vhdl new file mode 100644 index 000000000..94818ee88 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/type.vhdl @@ -0,0 +1,4 @@ +package p is + -- Comment for :vec: + type vec is array(natural range <>) of bit_vector(0 to 1); +end p; diff --git a/testsuite/pyunit/libghdl/examples/comments/type_fail.vhdl b/testsuite/pyunit/libghdl/examples/comments/type_fail.vhdl new file mode 100644 index 000000000..bb4050103 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/type_fail.vhdl @@ -0,0 +1,4 @@ +package p is + -- Comment + type vec is array(natural range <>) of bit_vector(0 to 1); +end p; diff --git a/testsuite/pyunit/libghdl/examples/comments/var.vhdl b/testsuite/pyunit/libghdl/examples/comments/var.vhdl new file mode 100644 index 000000000..9be81044f --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/var.vhdl @@ -0,0 +1,12 @@ +architecture arch of ent is +begin + process + -- Comment for :v: + variable v : natural; + begin + while v < 10 loop + v := v + 1; + end loop; + wait; + end process; +end arch; diff --git a/testsuite/pyunit/libghdl/examples/comments/var_fail.vhdl b/testsuite/pyunit/libghdl/examples/comments/var_fail.vhdl new file mode 100644 index 000000000..71689ff59 --- /dev/null +++ b/testsuite/pyunit/libghdl/examples/comments/var_fail.vhdl @@ -0,0 +1,12 @@ +architecture arch of ent is +begin + process + -- Comment + variable v : natural; + begin + while v < 10 loop + v := v + 1; + end loop; + wait; + end process; +end arch; diff --git a/testsuite/pyunit/libghdl/func.vhdl b/testsuite/pyunit/libghdl/func.vhdl deleted file mode 100644 index 1c6fc8741..000000000 --- a/testsuite/pyunit/libghdl/func.vhdl +++ /dev/null @@ -1,6 +0,0 @@ -package p is - -- :log2: as functions are longer in definitions, it might be written before - function log2(param : positive) return natural; -end p; - - diff --git a/testsuite/pyunit/libghdl/func_fail.vhdl b/testsuite/pyunit/libghdl/func_fail.vhdl deleted file mode 100644 index 68ff2b80e..000000000 --- a/testsuite/pyunit/libghdl/func_fail.vhdl +++ /dev/null @@ -1,6 +0,0 @@ -package p is - -- as functions are longer in definitions, it might be written before - function log2(param : positive) return natural; -end p; - - diff --git a/testsuite/pyunit/libghdl/func_param.vhdl b/testsuite/pyunit/libghdl/func_param.vhdl deleted file mode 100644 index fb47687e5..000000000 --- a/testsuite/pyunit/libghdl/func_param.vhdl +++ /dev/null @@ -1,9 +0,0 @@ -package p is - function log2( - -- :param1: we also want to document parameters too - param1 : integer; - param2 : boolean - ) return natural; -end p; - - diff --git a/testsuite/pyunit/libghdl/func_param_fail.vhdl b/testsuite/pyunit/libghdl/func_param_fail.vhdl deleted file mode 100644 index 53461fdd9..000000000 --- a/testsuite/pyunit/libghdl/func_param_fail.vhdl +++ /dev/null @@ -1,9 +0,0 @@ -package p is - function log2( - -- we also want to document parameters too - param1 : integer; - param2 : boolean - ) return natural; -end p; - - diff --git a/testsuite/pyunit/libghdl/line1.vhdl b/testsuite/pyunit/libghdl/line1.vhdl deleted file mode 100644 index 2a4ed11bc..000000000 --- a/testsuite/pyunit/libghdl/line1.vhdl +++ /dev/null @@ -1,4 +0,0 @@ -architecture arch of ent is - signal b1 : bit; -- Comment for :b1: -begin -end arch; diff --git a/testsuite/pyunit/libghdl/multi1.vhdl b/testsuite/pyunit/libghdl/multi1.vhdl deleted file mode 100644 index 73eebd5b5..000000000 --- a/testsuite/pyunit/libghdl/multi1.vhdl +++ /dev/null @@ -1,10 +0,0 @@ -architecture arch of ent is - -- Comment for :arch: - -- Again for :arch: - - -- Also for :arch: - - -- But for :b1: - signal b1 : bit; -begin -end arch; diff --git a/testsuite/pyunit/libghdl/pkg_bef.vhdl b/testsuite/pyunit/libghdl/pkg_bef.vhdl deleted file mode 100644 index 1ed150346..000000000 --- a/testsuite/pyunit/libghdl/pkg_bef.vhdl +++ /dev/null @@ -1,4 +0,0 @@ --- comments before design units :p1: --- :p1: might be multiline -package p1 is -end package; diff --git a/testsuite/pyunit/libghdl/pkg_inside.vhdl b/testsuite/pyunit/libghdl/pkg_inside.vhdl deleted file mode 100644 index c9f6129d4..000000000 --- a/testsuite/pyunit/libghdl/pkg_inside.vhdl +++ /dev/null @@ -1,5 +0,0 @@ --- As packages define public elements like constants, types and sub-programs, we are intrested in such documentation too.:p2: -package p2 is - -- comments in design units (python doc-string style):p2: - -- might be multi line :p2: -end package; diff --git a/testsuite/pyunit/libghdl/pkg_inside_fail.vhdl b/testsuite/pyunit/libghdl/pkg_inside_fail.vhdl deleted file mode 100644 index 4b2b9e653..000000000 --- a/testsuite/pyunit/libghdl/pkg_inside_fail.vhdl +++ /dev/null @@ -1,5 +0,0 @@ -package p2 is - -- comments in design units (python doc-string style) :fail: - - constant c : natural := 5; -end package; diff --git a/testsuite/pyunit/libghdl/pkg_inside_fail2.vhdl b/testsuite/pyunit/libghdl/pkg_inside_fail2.vhdl deleted file mode 100644 index f5e347488..000000000 --- a/testsuite/pyunit/libghdl/pkg_inside_fail2.vhdl +++ /dev/null @@ -1,3 +0,0 @@ -package p2 is - -- comments in design units (python doc-string style) :fail: -end package; diff --git a/testsuite/pyunit/libghdl/process.vhdl b/testsuite/pyunit/libghdl/process.vhdl deleted file mode 100644 index c0b56fe6e..000000000 --- a/testsuite/pyunit/libghdl/process.vhdl +++ /dev/null @@ -1,9 +0,0 @@ -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 deleted file mode 100644 index 819e5ea6e..000000000 --- a/testsuite/pyunit/libghdl/process_fail.vhdl +++ /dev/null @@ -1,9 +0,0 @@ -architecture arch of e is - signal s, s_n : bit; -begin - -- Comment - p : process (s) - begin - s <= not s_n; - end process; -end arch; diff --git a/testsuite/pyunit/libghdl/record.vhdl b/testsuite/pyunit/libghdl/record.vhdl deleted file mode 100644 index 82d5c1faa..000000000 --- a/testsuite/pyunit/libghdl/record.vhdl +++ /dev/null @@ -1,7 +0,0 @@ -package p is - -- Comment for :rec: - type rec is record - a : bit; - b : bit; - end record; -end p; diff --git a/testsuite/pyunit/libghdl/record_fail.vhdl b/testsuite/pyunit/libghdl/record_fail.vhdl deleted file mode 100644 index 6288920f7..000000000 --- a/testsuite/pyunit/libghdl/record_fail.vhdl +++ /dev/null @@ -1,7 +0,0 @@ -package p is - -- Comment for the record - type rec is record - a : bit; - b : bit; - end record; -end p; diff --git a/testsuite/pyunit/libghdl/sig.vhdl b/testsuite/pyunit/libghdl/sig.vhdl deleted file mode 100644 index ee0865ae4..000000000 --- a/testsuite/pyunit/libghdl/sig.vhdl +++ /dev/null @@ -1,5 +0,0 @@ -architecture arch of ent is - -- Comment for :b2: - signal b2 : bit; -begin -end arch; diff --git a/testsuite/pyunit/libghdl/sig_2.vhdl b/testsuite/pyunit/libghdl/sig_2.vhdl deleted file mode 100644 index c825a41e5..000000000 --- a/testsuite/pyunit/libghdl/sig_2.vhdl +++ /dev/null @@ -1,6 +0,0 @@ -architecture arch of ent is - signal s1 : bit; -- comment for :s1: - -- Also for :s1: - signal s2: natural; -begin -end arch; diff --git a/testsuite/pyunit/libghdl/sig_fail.vhdl b/testsuite/pyunit/libghdl/sig_fail.vhdl deleted file mode 100644 index 4630d2877..000000000 --- a/testsuite/pyunit/libghdl/sig_fail.vhdl +++ /dev/null @@ -1,5 +0,0 @@ -architecture arch of ent is - -- Comment - signal b2 : bit; -begin -end arch; diff --git a/testsuite/pyunit/libghdl/type.vhdl b/testsuite/pyunit/libghdl/type.vhdl deleted file mode 100644 index 94818ee88..000000000 --- a/testsuite/pyunit/libghdl/type.vhdl +++ /dev/null @@ -1,4 +0,0 @@ -package p is - -- Comment for :vec: - type vec is array(natural range <>) of bit_vector(0 to 1); -end p; diff --git a/testsuite/pyunit/libghdl/type_fail.vhdl b/testsuite/pyunit/libghdl/type_fail.vhdl deleted file mode 100644 index bb4050103..000000000 --- a/testsuite/pyunit/libghdl/type_fail.vhdl +++ /dev/null @@ -1,4 +0,0 @@ -package p is - -- Comment - type vec is array(natural range <>) of bit_vector(0 to 1); -end p; diff --git a/testsuite/pyunit/libghdl/var.vhdl b/testsuite/pyunit/libghdl/var.vhdl deleted file mode 100644 index 9be81044f..000000000 --- a/testsuite/pyunit/libghdl/var.vhdl +++ /dev/null @@ -1,12 +0,0 @@ -architecture arch of ent is -begin - process - -- Comment for :v: - variable v : natural; - begin - while v < 10 loop - v := v + 1; - end loop; - wait; - end process; -end arch; diff --git a/testsuite/pyunit/libghdl/var_fail.vhdl b/testsuite/pyunit/libghdl/var_fail.vhdl deleted file mode 100644 index 71689ff59..000000000 --- a/testsuite/pyunit/libghdl/var_fail.vhdl +++ /dev/null @@ -1,12 +0,0 @@ -architecture arch of ent is -begin - process - -- Comment - variable v : natural; - begin - while v < 10 loop - v := v + 1; - end loop; - wait; - end process; -end arch; -- cgit v1.2.3