diff options
author | Gregory Szorc <gregory.szorc@gmail.com> | 2012-02-05 19:42:06 +0000 |
---|---|---|
committer | Gregory Szorc <gregory.szorc@gmail.com> | 2012-02-05 19:42:06 +0000 |
commit | 96ad633771182c54b5b62fa4be23f866ed0beb15 (patch) | |
tree | 93abb3fc5edc103c64b038c50067c958401bfa01 /bindings/python/tests | |
parent | 2d10680fe173c21c33367a04bb0969f65a43434c (diff) |
[clang.py] Implement Type.is_pod
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149842 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings/python/tests')
-rw-r--r-- | bindings/python/tests/cindex/test_type.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/bindings/python/tests/cindex/test_type.py b/bindings/python/tests/cindex/test_type.py index 2a35f6e756..26ed79553e 100644 --- a/bindings/python/tests/cindex/test_type.py +++ b/bindings/python/tests/cindex/test_type.py @@ -97,3 +97,21 @@ def testConstantArray(): break else: assert False, "Didn't find teststruct??" + +def test_is_pod(): + index = Index.create() + tu = index.parse('t.c', unsaved_files=[('t.c', 'int i; void f();')]) + assert tu is not None + i, f = None, None + + for cursor in tu.cursor.get_children(): + if cursor.spelling == 'i': + i = cursor + elif cursor.spelling == 'f': + f = cursor + + assert i is not None + assert f is not None + + assert i.type.is_pod() + assert not f.type.is_pod() |