aboutsummaryrefslogtreecommitdiff
path: root/bindings/python/tests/cindex/test_cursor.py
diff options
context:
space:
mode:
authorGregory Szorc <gregory.szorc@gmail.com>2012-05-14 03:53:29 +0000
committerGregory Szorc <gregory.szorc@gmail.com>2012-05-14 03:53:29 +0000
commit1e370ab68e5b69fc40a782ee5ce01ec2c6857879 (patch)
tree5464bbf01d50e3108d603380819649f7f2688a12 /bindings/python/tests/cindex/test_cursor.py
parent9d6ca8a6ed3526a9028e5701c10de1d38f585cf2 (diff)
[clang.py] Implement Cursor.result_type
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156752 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings/python/tests/cindex/test_cursor.py')
-rw-r--r--bindings/python/tests/cindex/test_cursor.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/bindings/python/tests/cindex/test_cursor.py b/bindings/python/tests/cindex/test_cursor.py
index eda74f0e24..206d9c8521 100644
--- a/bindings/python/tests/cindex/test_cursor.py
+++ b/bindings/python/tests/cindex/test_cursor.py
@@ -172,3 +172,11 @@ def test_annotation_attribute():
break
else:
assert False, "Couldn't find annotation"
+
+def test_result_type():
+ tu = get_tu('int foo();')
+ foo = get_cursor(tu, 'foo')
+
+ assert foo is not None
+ t = foo.result_type
+ assert t.kind == TypeKind.INT