Files
langkit/testsuite/tests/python_api/asserts/test.py
2023-12-13 13:55:10 +00:00

28 lines
551 B
Python

"""
Regression test: check that getting the list of diagnostics and the range of
text between two tokens works when Python assertions are disabled. This used
not to work because "operational" code was in assert statements in the Python
bindings.
"""
from langkit.dsl import ASTNode
from utils import build_and_run
class FooNode(ASTNode):
pass
class Example(FooNode):
token_node = True
build_and_run(
lkt_file='expected_concrete_syntax.lkt',
py_script='main.py',
python_args=["-O"],
types_from_lkt=True,
)
print('Done')