diff options
| author | Anders Waldenborg <anders@0x63.nu> | 2012-05-02 21:28:34 +0000 |
|---|---|---|
| committer | Anders Waldenborg <anders@0x63.nu> | 2012-05-02 21:28:34 +0000 |
| commit | 750c04f1a5dec410cb3c8e0cae8bf22eac91bc92 (patch) | |
| tree | 447cea7978023b02744bd28aeff6b8007726d179 /clang/bindings/python | |
| parent | 4e639f168ca0a43867a9b755280835b9510b7ca4 (diff) | |
| download | bcm5719-llvm-750c04f1a5dec410cb3c8e0cae8bf22eac91bc92.tar.gz bcm5719-llvm-750c04f1a5dec410cb3c8e0cae8bf22eac91bc92.zip | |
[python] Add testcase for annotation cursor
llvm-svn: 156022
Diffstat (limited to 'clang/bindings/python')
| -rw-r--r-- | clang/bindings/python/tests/cindex/test_cursor.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/bindings/python/tests/cindex/test_cursor.py b/clang/bindings/python/tests/cindex/test_cursor.py index c88aec19a86..0582d2af63f 100644 --- a/clang/bindings/python/tests/cindex/test_cursor.py +++ b/clang/bindings/python/tests/cindex/test_cursor.py @@ -135,3 +135,15 @@ def test_enum_values_cpp(): assert ham.kind == CursorKind.ENUM_CONSTANT_DECL 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" |

