xref: /aosp_15_r20/external/clang/bindings/python/tests/cindex/test_index.py (revision 67e74705e28f6214e480b399dd47ea732279e315)
1from clang.cindex import *
2import os
3
4kInputsDir = os.path.join(os.path.dirname(__file__), 'INPUTS')
5
6def test_create():
7    index = Index.create()
8
9# FIXME: test Index.read
10
11def test_parse():
12    index = Index.create()
13    assert isinstance(index, Index)
14    tu = index.parse(os.path.join(kInputsDir, 'hello.cpp'))
15    assert isinstance(tu, TranslationUnit)
16