[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
diff --git a/bindings/python/tests/cindex/test_cursor.py b/bindings/python/tests/cindex/test_cursor.py
index 9f02bb2..5e8d1dc 100644
--- a/bindings/python/tests/cindex/test_cursor.py
+++ b/bindings/python/tests/cindex/test_cursor.py
@@ -84,6 +84,14 @@
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')