aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/pyunit
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-12-20 06:58:20 +0100
committerTristan Gingold <tgingold@free.fr>2022-12-20 06:58:20 +0100
commitc8c2832177c69a1cc65b9521b07843108ea8ef4e (patch)
treeb7d94a20202944419a69831fdc57b97eac35ccdd /testsuite/pyunit
parentb52f313eda78ff0edb29d9898e48e9e032d4b9b5 (diff)
downloadghdl-c8c2832177c69a1cc65b9521b07843108ea8ef4e.tar.gz
ghdl-c8c2832177c69a1cc65b9521b07843108ea8ef4e.tar.bz2
ghdl-c8c2832177c69a1cc65b9521b07843108ea8ef4e.zip
testsuite/pyunit: check with source identifier
adjust baseline
Diffstat (limited to 'testsuite/pyunit')
-rw-r--r--testsuite/pyunit/libghdl/Comments.py6
-rw-r--r--testsuite/pyunit/libghdl/examples/comments/ent_inside.vhdl4
2 files changed, 5 insertions, 5 deletions
diff --git a/testsuite/pyunit/libghdl/Comments.py b/testsuite/pyunit/libghdl/Comments.py
index 4106e7e61..172673b2d 100644
--- a/testsuite/pyunit/libghdl/Comments.py
+++ b/testsuite/pyunit/libghdl/Comments.py
@@ -4,7 +4,7 @@ from unittest import TestCase, expectedFailure
import pyGHDL.libghdl as libghdl
from pyGHDL.libghdl import name_table, files_map, errorout_console, flags
from pyGHDL.libghdl import file_comments
-from pyGHDL.libghdl.vhdl import nodes, flists, sem_lib
+from pyGHDL.libghdl.vhdl import nodes, flists, sem_lib, utils
if __name__ == "__main__":
@@ -18,7 +18,7 @@ class Base(TestCase):
@staticmethod
def getIdentifier(node) -> str:
"""Return the Python string from node :obj:`node` identifier."""
- return name_table.Get_Name_Ptr(nodes.Get_Identifier(node))
+ return utils.Get_Source_Identifier_Str(node)
@classmethod
def setUpClass(cls):
@@ -76,7 +76,7 @@ class Base(TestCase):
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))
+ self.checkComments(stmt, self.getIdentifier(stmt))
stmt = nodes.Get_Chain(stmt)
def checkFile(self, filename) -> None:
diff --git a/testsuite/pyunit/libghdl/examples/comments/ent_inside.vhdl b/testsuite/pyunit/libghdl/examples/comments/ent_inside.vhdl
index 834eaa999..d64421a35 100644
--- a/testsuite/pyunit/libghdl/examples/comments/ent_inside.vhdl
+++ b/testsuite/pyunit/libghdl/examples/comments/ent_inside.vhdl
@@ -5,8 +5,8 @@ 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:
+ -- comment before a generic :FREQUENCY:
+ -- might be multiline :FREQUENCY:
constant FREQUENCY : positive
);
port (