diff options
Diffstat (limited to 'bindings/python/tests')
-rw-r--r-- | bindings/python/tests/cindex/test_type.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/bindings/python/tests/cindex/test_type.py b/bindings/python/tests/cindex/test_type.py index cd27a4c..35c7bbb 100644 --- a/bindings/python/tests/cindex/test_type.py +++ b/bindings/python/tests/cindex/test_type.py @@ -74,3 +74,22 @@ def test_a_struct(): else: assert False, "Didn't find teststruct??" + + +constarrayInput=""" +struct teststruct { + void *A[2]; +}; +""" +def testConstantArray(): + index = Index.create() + tu = index.parse('t.c', unsaved_files = [('t.c',constarrayInput)]) + + for n in tu.cursor.get_children(): + if n.spelling == 'teststruct': + fields = list(n.get_children()) + assert fields[0].spelling == 'A' + assert fields[0].type.kind == TypeKind.CONSTANTARRAY + break + else: + assert False, "Didn't find teststruct??" |