-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add testing infrastructure for the DynamicLibraryManager #155
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#include "gtest/gtest.h" | ||
|
||
#include "clang/Interpreter/CppInterOp.h" | ||
|
||
TEST(DynamicLibraryManagerTest, Sanity) { | ||
EXPECT_TRUE(Cpp::CreateInterpreter()); | ||
EXPECT_TRUE(Cpp::LoadLibrary("TestSharedLib")); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
add_llvm_library(TestSharedLib SHARED BUILDTREE_ONLY TestSharedLib.cpp) | ||
# Put TestSharedLib next to the unit test executable. | ||
set_output_directory(TestSharedLib | ||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/../ | ||
LIBRARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/../ | ||
) | ||
set_target_properties(TestSharedLib PROPERTIES FOLDER "Tests") |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#include "TestSharedLib.h" | ||
|
||
int ret_zero() { return 0; } | ||
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,6 @@ | ||||||||||||
#ifndef UNITTESTS_CPPINTEROP_TESTSHAREDLIB_TESTSHAREDLIB_H | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: header is missing header guard [llvm-header-guard]
Suggested change
unittests/CppInterOp/TestSharedLib/TestSharedLib.h:-1: +
+ #endif |
||||||||||||
#define UNITTESTS_CPPINTEROP_TESTSHAREDLIB_TESTSHAREDLIB_H | ||||||||||||
Comment on lines
+1
to
+2
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: header guard does not follow preferred style [llvm-header-guard]
Suggested change
unittests/CppInterOp/TestSharedLib/TestSharedLib.h:5: - #endif // UNITTESTS_CPPINTEROP_TESTSHAREDLIB_TESTSHAREDLIB_H
+ #endif // GITHUB_WORKSPACE_UNITTESTS_CPPINTEROP_TESTSHAREDLIB_TESTSHAREDLIB_H |
||||||||||||
|
||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: header is missing header guard [llvm-header-guard]
Suggested change
unittests/CppInterOp/TestSharedLib/TestSharedLib.h:-1: +
+ #endif |
||||||||||||
int ret_zero(); | ||||||||||||
|
||||||||||||
#endif // UNITTESTS_CPPINTEROP_TESTSHAREDLIB_TESTSHAREDLIB_H |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: 'gtest/gtest.h' file not found [clang-diagnostic-error]