diff options
| author | 2018-04-06 14:26:03 +0000 | |
|---|---|---|
| committer | 2018-04-06 14:26:03 +0000 | |
| commit | bdabc2f19ffb9e20600dad6e8a300842a7bda50e (patch) | |
| tree | c50e7b2e5449b074651bb82a58517a8ebc4a8cf7 /gnu/llvm/tools/clang/bindings/python/tests/cindex/test_index.py | |
| parent | Print a 'p' flag for file descriptors that were opened after pledge(2). (diff) | |
| download | wireguard-openbsd-bdabc2f19ffb9e20600dad6e8a300842a7bda50e.tar.xz wireguard-openbsd-bdabc2f19ffb9e20600dad6e8a300842a7bda50e.zip | |
Import LLVM 6.0.1 release including clang, lld and lldb.
"where is the kaboom?" deraadt@
Diffstat (limited to 'gnu/llvm/tools/clang/bindings/python/tests/cindex/test_index.py')
| -rw-r--r-- | gnu/llvm/tools/clang/bindings/python/tests/cindex/test_index.py | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/gnu/llvm/tools/clang/bindings/python/tests/cindex/test_index.py b/gnu/llvm/tools/clang/bindings/python/tests/cindex/test_index.py index dc173f04d21..cfdf98e628a 100644 --- a/gnu/llvm/tools/clang/bindings/python/tests/cindex/test_index.py +++ b/gnu/llvm/tools/clang/bindings/python/tests/cindex/test_index.py @@ -1,15 +1,21 @@ from clang.cindex import * import os +import unittest + kInputsDir = os.path.join(os.path.dirname(__file__), 'INPUTS') -def test_create(): - index = Index.create() -# FIXME: test Index.read +class TestIndex(unittest.TestCase): + def test_create(self): + index = Index.create() + + # FIXME: test Index.read -def test_parse(): - index = Index.create() - assert isinstance(index, Index) - tu = index.parse(os.path.join(kInputsDir, 'hello.cpp')) - assert isinstance(tu, TranslationUnit) + def test_parse(self): + index = Index.create() + self.assertIsInstance(index, Index) + tu = index.parse(os.path.join(kInputsDir, 'hello.cpp')) + self.assertIsInstance(tu, TranslationUnit) + tu = index.parse(None, ['-c', os.path.join(kInputsDir, 'hello.cpp')]) + self.assertIsInstance(tu, TranslationUnit) |
