summaryrefslogtreecommitdiffstats
path: root/bindings/python/tests
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-01-24 04:09:43 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-01-24 04:09:43 +0000
commit1b945a7455e17fd792ef3bd3790dc88beea5faad (patch)
tree86bf1939a3ee2f056cee01b13b47be9cd1ba8dc6 /bindings/python/tests
parent7b48b3519a792c010da104f0c4e554b47bf774da (diff)
cindex/Python: Add TranslationUnit.cursor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94355 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings/python/tests')
-rw-r--r--bindings/python/tests/cindex/test_translation_unit.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/bindings/python/tests/cindex/test_translation_unit.py b/bindings/python/tests/cindex/test_translation_unit.py
index e101247460..f8d4bebc1b 100644
--- a/bindings/python/tests/cindex/test_translation_unit.py
+++ b/bindings/python/tests/cindex/test_translation_unit.py
@@ -8,3 +8,11 @@ def test_spelling():
index = Index.create()
tu = index.parse(path)
assert str(tu.spelling) == path
+
+def test_cursor():
+ path = os.path.join(kInputsDir, 'hello.cpp')
+ index = Index.create()
+ tu = index.parse(path)
+ c = tu.cursor
+ assert isinstance(c, Cursor)
+ assert c.is_translation_unit