Skip to content
Snippets Groups Projects
Commit 228e5703 authored by Anders Waldenborg's avatar Anders Waldenborg
Browse files

[python] Add testcase for annotation cursor

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156022 91177308-0d34-0410-b5e6-96231b3b80d8
parent bbc2e090
No related branches found
No related tags found
No related merge requests found
...@@ -135,3 +135,15 @@ def test_enum_values_cpp(): ...@@ -135,3 +135,15 @@ def test_enum_values_cpp():
assert ham.kind == CursorKind.ENUM_CONSTANT_DECL assert ham.kind == CursorKind.ENUM_CONSTANT_DECL
assert ham.enum_value == 0x10000000000 assert ham.enum_value == 0x10000000000
def test_annotation_attribute():
tu = get_tu('int foo (void) __attribute__ ((annotate("here be annotation attribute")));')
foo = get_cursor(tu, 'foo')
assert foo is not None
for c in foo.get_children():
if c.kind == CursorKind.ANNOTATE_ATTR:
assert c.displayname == "here be annotation attribute"
break
else:
assert False, "Couldn't find annotation"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment