summaryrefslogtreecommitdiffstats
path: root/bindings/python
diff options
context:
space:
mode:
authorAnders Waldenborg <anders@0x63.nu>2012-05-02 19:39:46 +0000
committerAnders Waldenborg <anders@0x63.nu>2012-05-02 19:39:46 +0000
commit51c8bac81e103f334f0dafb1bf2d4c335ac3a28b (patch)
tree93c1e1cf6c453a94346b6848c188e487f8cdeb2f /bindings/python
parent5b82b9606d9e36134724d5638efbc9d60fc8be90 (diff)
[python] Add testcase for enum with specified underlaying type
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156009 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings/python')
-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 9f02bb2a76..5e8d1dc5db 100644
--- a/bindings/python/tests/cindex/test_cursor.py
+++ b/bindings/python/tests/cindex/test_cursor.py
@@ -84,6 +84,14 @@ def test_enum_type():
enum_type = enum.enum_type
assert enum_type.kind == TypeKind.UINT
+def test_enum_type_cpp():
+ tu = get_tu('enum TEST : long long { FOO=1, BAR=2 };', lang="cpp")
+ enum = get_cursor(tu, 'TEST')
+ assert enum is not None
+
+ assert enum.kind == CursorKind.ENUM_DECL
+ assert enum.enum_type.kind == TypeKind.LONGLONG
+
def test_objc_type_encoding():
tu = get_tu('int i;', lang='objc')
i = get_cursor(tu, 'i')