diff options
author | dim <dim@FreeBSD.org> | 2011-12-09 18:30:42 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-12-09 18:30:42 +0000 |
commit | dc04cb328508e61aad809d9b53b12f9799a00e7d (patch) | |
tree | 81d5fcacdf8f076da7b2359bb7d62be6a453f0da /bindings/python/tests | |
parent | 3963a48221351c61c17fb3f382341ab04809a3d3 (diff) | |
download | FreeBSD-src-dc04cb328508e61aad809d9b53b12f9799a00e7d.zip FreeBSD-src-dc04cb328508e61aad809d9b53b12f9799a00e7d.tar.gz |
Vendor import of clang 3.0 final release:
http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_30/final@145349
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??" |