diff options
Diffstat (limited to 'bindings/python/tests')
| -rw-r--r-- | bindings/python/tests/cindex/test_diagnostics.py | 8 | ||||
| -rw-r--r-- | bindings/python/tests/cindex/test_exception_specification_kind.py (renamed from bindings/python/tests/test_exception_specification_kind.py) | 0 |
2 files changed, 8 insertions, 0 deletions
diff --git a/bindings/python/tests/cindex/test_diagnostics.py b/bindings/python/tests/cindex/test_diagnostics.py index ba6e545e8b1a..23cbe89f6581 100644 --- a/bindings/python/tests/cindex/test_diagnostics.py +++ b/bindings/python/tests/cindex/test_diagnostics.py @@ -92,3 +92,11 @@ def test_diagnostic_children(): assert children[0].spelling.endswith('declared here') assert children[0].location.line == 1 assert children[0].location.column == 1 + +def test_diagnostic_string_repr(): + tu = get_tu('struct MissingSemicolon{}') + assert len(tu.diagnostics) == 1 + d = tu.diagnostics[0] + + assert repr(d) == '<Diagnostic severity 3, location <SourceLocation file \'t.c\', line 1, column 26>, spelling "expected \';\' after struct">' + diff --git a/bindings/python/tests/test_exception_specification_kind.py b/bindings/python/tests/cindex/test_exception_specification_kind.py index 543d47f7db97..543d47f7db97 100644 --- a/bindings/python/tests/test_exception_specification_kind.py +++ b/bindings/python/tests/cindex/test_exception_specification_kind.py |
