diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-02 12:46:48 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-02 12:46:48 +0000 |
| commit | b5ea630dfd1a0d3e5c08d8959158608dd213d9aa (patch) | |
| tree | 414ded0ca2d2732345c4d423b8f3cd326d9097e8 /bindings/python/tests | |
| parent | 4bc3002fe03f32a9d85720bece65eeda40c75742 (diff) | |
Notes
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 |
