Skip to content

Commit 5619845

Browse files
committed
Add test for clang_interpreter_dispose
1 parent e29df37 commit 5619845

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

unittests/CppInterOp/InterpreterTest.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
#include "clang/Interpreter/CppInterOp.h"
44
#include "clang/Basic/Version.h"
55

6+
#include "clang-c/CXCppInterOp.h"
7+
68
#include "llvm/ADT/SmallString.h"
79
#include "llvm/Support/Path.h"
810

@@ -92,6 +94,12 @@ TEST(InterpreterTest, CreateInterpreter) {
9294
"#endif");
9395
EXPECT_TRUE(Cpp::GetNamed("cpp17"));
9496
EXPECT_FALSE(Cpp::GetNamed("cppUnknown"));
97+
98+
// C API
99+
const char* args[] = {"-std=c++14"};
100+
auto CXI = clang_createInterpreter(args, 1);
101+
EXPECT_TRUE(CXI);
102+
clang_interpreter_dispose(CXI);
95103
}
96104

97105
#ifdef LLVM_BINARY_DIR

0 commit comments

Comments
 (0)