Home | History | Annotate | Download | only in cindex
      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)
     16