aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/pyunit/libghdl/Comments.py
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-11-22 07:32:47 +0100
committerTristan Gingold <tgingold@free.fr>2022-11-22 07:44:53 +0100
commit4684c81aaa27f177931bb8ffe837e9edc8a4dca0 (patch)
treed39dd5c734d5af026f77fb3a96d83d5dd7b5af79 /testsuite/pyunit/libghdl/Comments.py
parentcc505073525dd5ffe1bd05004a2fb79917680d68 (diff)
downloadghdl-4684c81aaa27f177931bb8ffe837e9edc8a4dca0.tar.gz
ghdl-4684c81aaa27f177931bb8ffe837e9edc8a4dca0.tar.bz2
ghdl-4684c81aaa27f177931bb8ffe837e9edc8a4dca0.zip
testsuite/pyunit/libghdl: add tests for enums
Diffstat (limited to 'testsuite/pyunit/libghdl/Comments.py')
-rw-r--r--testsuite/pyunit/libghdl/Comments.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/pyunit/libghdl/Comments.py b/testsuite/pyunit/libghdl/Comments.py
index 82da89693..46b5956f4 100644
--- a/testsuite/pyunit/libghdl/Comments.py
+++ b/testsuite/pyunit/libghdl/Comments.py
@@ -61,6 +61,8 @@ class Instantiate(TestCase):
defk = nodes.Get_Kind(tdef)
if defk == nodes.Iir_Kind.Record_Type_Definition:
self.checkFlist(nodes.Get_Elements_Declaration_List(tdef))
+ elif defk == nodes.Iir_Kind.Enumeration_Type_Definition:
+ self.checkFlist(nodes.Get_Enumeration_Literal_List(tdef))
decl = nodes.Get_Chain(decl)
def checkConc(self, first) -> None:
@@ -222,4 +224,23 @@ class Instantiate(TestCase):
def test_element_2(self) -> None:
self.checkFile(self._root / "element_2.vhdl")
+ @expectedFailure
+ def test_enum_fail(self) -> None:
+ self.checkFile(self._root / "enum_fail.vhdl")
+
+ def test_enum(self) -> None:
+ self.checkFile(self._root / "enum.vhdl")
+
+ @expectedFailure
+ def test_enumlit_fail(self) -> None:
+ self.checkFile(self._root / "enumlit_fail.vhdl")
+
+ def test_enumlit_1(self) -> None:
+ self.checkFile(self._root / "enumlit_1.vhdl")
+
+ def test_enumlit_2(self) -> None:
+ self.checkFile(self._root / "enumlit_2.vhdl")
+
+# TODO: subprograms, subprogram parameters
+# TODO: first comment
# Empty line before to easy cut & put