[cfe-commits] r156009 - /cfe/trunk/bindings/python/tests/cindex/test_cursor.py

Anders Waldenborg anders at 0x63.nu
Wed May 2 12:39:46 PDT 2012


Author: andersg
Date: Wed May  2 14:39:46 2012
New Revision: 156009

URL: http://llvm.org/viewvc/llvm-project?rev=156009&view=rev
Log:
[python] Add testcase for enum with specified underlaying type

Modified:
    cfe/trunk/bindings/python/tests/cindex/test_cursor.py

Modified: cfe/trunk/bindings/python/tests/cindex/test_cursor.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/bindings/python/tests/cindex/test_cursor.py?rev=156009&r1=156008&r2=156009&view=diff
==============================================================================
--- cfe/trunk/bindings/python/tests/cindex/test_cursor.py (original)
+++ cfe/trunk/bindings/python/tests/cindex/test_cursor.py Wed May  2 14:39:46 2012
@@ -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')





More information about the cfe-commits mailing list