[NFC][Coroutines] Use structured binding with llvm::enumerate in CoroSplit (#116879)
[llvm-project.git] / clang / bindings / python / tests / cindex / test_file.py
blob14a3084ee2b47a12d060e2ab6503147686ec34ac
1 import os
3 from clang.cindex import Config, File, Index
5 if "CLANG_LIBRARY_PATH" in os.environ:
6 Config.set_library_path(os.environ["CLANG_LIBRARY_PATH"])
8 import unittest
11 class TestFile(unittest.TestCase):
12 def test_file(self):
13 index = Index.create()
14 tu = index.parse("t.c", unsaved_files=[("t.c", "")])
15 file = File.from_name(tu, "t.c")
16 self.assertEqual(str(file), "t.c")
17 self.assertEqual(file.name, "t.c")
18 self.assertEqual(repr(file), "<File: t.c>")