[cfe-commits] [PATCH] Expose diagnostic category and option info to Python binding.
Tobias Grosser
tobias at grosser.es
Sun Feb 5 03:47:11 PST 2012
On 02/05/2012 01:33 AM, Gregory Szorc wrote:
> --
> bindings/python/clang/cindex.py | 37 ++++++++++++++++++++++
> bindings/python/tests/cindex/test_diagnostics.py | 34 ++++++++++++++++++--
> 2 files changed, 68 insertions(+), 3 deletions(-)
>
>
> 0001-Expose-diagnostic-category-and-option-info-to-Python.patch
Looks good except:
> +def test_diagnostic_category():
> + # Ensure that category properties work
^ Missing point.
> + index = Index.create()
> + tu = tu_from_source("""int f(int i) { return 7; }""", all_warnings=True)
> + assert len(tu.diagnostics) == 1
> + d = tu.diagnostics[0]
> +
> + assert d.severity == Diagnostic.Warning
> + assert d.location.line == 1
> + assert d.location.column == 11
> +
> + assert d.category_number == 2
> + assert d.category_name == 'Semantic Issue'
> +
> +def test_diagnostic_option():
> + # Ensure that category option properties work
^ Missing point.
I applied the trivial fix applied and committed in 149825.
Tobi
More information about the cfe-commits
mailing list