From: Anders Waldenborg Date: Wed, 2 May 2012 19:39:46 +0000 (+0000) Subject: [python] Add testcase for enum with specified underlaying type X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=51c8bac81e103f334f0dafb1bf2d4c335ac3a28b;p=clang [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 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')