[cfe-commits] [PATCH] [clang.py] Refactor get_tu and get_cursor test helper functions into util.py

Gregory Szorc gregory.szorc at gmail.com
Mon Feb 20 15:54:28 PST 2012


There was a lot of repeated code around TU instantiation and obtaining
cursors in the test code. So, I factored out the recently-implemented
helper methods into a shared module. Ideally, I'd convert the test
suite to classes and have these methods hang off a base class.
However, that would bit rot a lot of work in my Python feature branch
and I don't want to go through the pain of rebasing right now.

---
 bindings/python/tests/cindex/test_cursor.py      |   32 ++++------
 bindings/python/tests/cindex/test_diagnostics.py |   33 +++-------
 bindings/python/tests/cindex/test_location.py    |   78 ++++++++++++----------
 bindings/python/tests/cindex/test_type.py        |   32 +--------
 bindings/python/tests/cindex/util.py             |   65 ++++++++++++++++++
 5 files changed, 130 insertions(+), 110 deletions(-)
 create mode 100644 bindings/python/tests/cindex/util.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-clang.py-Refactor-get_tu-and-get_cursor-test-helper-.patch
Type: text/x-patch
Size: 15783 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120220/33960083/attachment.bin>


More information about the cfe-commits mailing list