summaryrefslogtreecommitdiff
path: root/tests/test_domain_cpp.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_domain_cpp.py')
-rw-r--r--tests/test_domain_cpp.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/test_domain_cpp.py b/tests/test_domain_cpp.py
index 0b757139a..ae3e1fa1e 100644
--- a/tests/test_domain_cpp.py
+++ b/tests/test_domain_cpp.py
@@ -33,10 +33,8 @@ def parse(name, string):
return ast
-def check(name, input, idDict, output=None):
+def _check(name, input, idDict, output):
# first a simple check of the AST
- if output is None:
- output = input
ast = parse(name, input)
res = str(ast)
if res != output:
@@ -83,6 +81,15 @@ def check(name, input, idDict, output=None):
raise DefinitionError("")
+def check(name, input, idDict, output=None):
+ if output is None:
+ output = input
+ # First, check without semicolon
+ _check(name, input, idDict, output)
+ # Second, check with semicolon
+ _check(name, input + ';', idDict, output + ';')
+
+
def test_fundamental_types():
# see https://en.cppreference.com/w/cpp/language/types
for t, id_v2 in cppDomain._id_fundamental_v2.items():