Skip to content

Commit d799729

Browse files
committed
Minor patches to unittests
- Sets cmake environment property of CppInterOp unitests to LLVM include dir - Use cling::Declare instead of Process for include tests This hints towards a bug in cling::Process when we JIT two includes one after another like ``` std::string code = R"(#include <vector> \n #include <iostream>)" Interp->process(code);
1 parent 7c8364c commit d799729

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

unittests/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ endif()
3333
add_test(NAME cppinterop-${name} COMMAND ${name})
3434
set_tests_properties(cppinterop-${name} PROPERTIES
3535
TIMEOUT "${TIMEOUT_VALUE}"
36+
ENVIRONMENT "CPLUS_INCLUDE_PATH=${CMAKE_BINARY_DIR}/etc"
3637
LABELS
3738
DEPENDS)
3839
# FIXME: Just call gtest_add_tests this function is available.

unittests/CppInterOp/ScopeReflectionTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1022,7 +1022,7 @@ TEST(ScopeReflectionTest, IncludeVector) {
10221022
#include <vector>
10231023
#include <iostream>
10241024
)";
1025-
Interp->process(code);
1025+
Interp->declare(code);
10261026
}
10271027

10281028
TEST(ScopeReflectionTest, GetOperator) {

0 commit comments

Comments
 (0)