diff options
Diffstat (limited to 'bindings/python/tests/cindex/test_cursor.py')
-rw-r--r-- | bindings/python/tests/cindex/test_cursor.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bindings/python/tests/cindex/test_cursor.py b/bindings/python/tests/cindex/test_cursor.py index a653ba7bf28ef..3dde891a9c264 100644 --- a/bindings/python/tests/cindex/test_cursor.py +++ b/bindings/python/tests/cindex/test_cursor.py @@ -1,4 +1,4 @@ -from clang.cindex import Index, CursorKind +from clang.cindex import Index, CursorKind, TypeKind kInput = """\ // FIXME: Find nicer way to drop builtins and other cruft. @@ -47,13 +47,17 @@ def test_get_children(): assert len(s0_nodes) == 2 assert s0_nodes[0].kind == CursorKind.FIELD_DECL assert s0_nodes[0].spelling == 'a' + assert s0_nodes[0].type.kind == TypeKind.INT assert s0_nodes[1].kind == CursorKind.FIELD_DECL assert s0_nodes[1].spelling == 'b' + assert s0_nodes[1].type.kind == TypeKind.INT assert tu_nodes[1].kind == CursorKind.STRUCT_DECL assert tu_nodes[1].spelling == 's1' + assert tu_nodes[1].displayname == 's1' assert tu_nodes[1].is_definition() == False assert tu_nodes[2].kind == CursorKind.FUNCTION_DECL assert tu_nodes[2].spelling == 'f0' + assert tu_nodes[2].displayname == 'f0(int, int)' assert tu_nodes[2].is_definition() == True |