diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-01-24 04:09:43 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-01-24 04:09:43 +0000 |
commit | e79aba4c725f0fca2a65f29ff23d8785b9f68fdf (patch) | |
tree | 9d18998778cb49ce0101d26d7b63feb17d59b3a8 /clang/bindings/python/tests | |
parent | 3615fd27f24b2a0d08508d714bb7e69a293ad352 (diff) | |
download | bcm5719-llvm-e79aba4c725f0fca2a65f29ff23d8785b9f68fdf.tar.gz bcm5719-llvm-e79aba4c725f0fca2a65f29ff23d8785b9f68fdf.zip |
cindex/Python: Add TranslationUnit.cursor.
llvm-svn: 94355
Diffstat (limited to 'clang/bindings/python/tests')
-rw-r--r-- | clang/bindings/python/tests/cindex/test_translation_unit.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/bindings/python/tests/cindex/test_translation_unit.py b/clang/bindings/python/tests/cindex/test_translation_unit.py index e1012474606..f8d4bebc1bc 100644 --- a/clang/bindings/python/tests/cindex/test_translation_unit.py +++ b/clang/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 |