]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - bindings/python/tests/cindex/test_index.py
Update clang to r96341.
[FreeBSD/FreeBSD.git] / bindings / python / tests / cindex / test_index.py
1 from clang.cindex import *
2 import os
3
4 kInputsDir = os.path.join(os.path.dirname(__file__), 'INPUTS')
5
6 def test_create():
7     index = Index.create()
8
9 # FIXME: test Index.read
10
11 def 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)