xref: /aosp_15_r20/external/clang/bindings/python/tests/cindex/test_file.py (revision 67e74705e28f6214e480b399dd47ea732279e315)
1from clang.cindex import Index, File
2
3def test_file():
4  index = Index.create()
5  tu = index.parse('t.c', unsaved_files = [('t.c', "")])
6  file = File.from_name(tu, "t.c")
7  assert str(file) == "t.c"
8  assert file.name == "t.c"
9  assert repr(file) == "<File: t.c>"
10