Binding Google Test into CMake.
This commit is contained in:
parent
3740624176
commit
4bd4015f9d
|
|
@ -4,5 +4,6 @@ project(arduino_midi_library)
|
|||
set(ROOT_SOURCE_DIR ${PROJECT_SOURCE_DIR})
|
||||
include_directories(${ROOT_SOURCE_DIR})
|
||||
|
||||
add_subdirectory(external)
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(test)
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
add_subdirectory(google-test)
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
project(test-runner)
|
||||
|
||||
include_directories(${gtest_SOURCE_DIR}/include)
|
||||
|
||||
add_executable(test-runner
|
||||
test-runner.cpp
|
||||
test-runner.h
|
||||
|
|
@ -7,3 +9,7 @@ add_executable(test-runner
|
|||
test-runner_Main.cpp
|
||||
test-runner_Main.h
|
||||
)
|
||||
target_link_libraries(test-runner
|
||||
test-mocks
|
||||
gtest
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,15 +1,7 @@
|
|||
#include "test-runner_Main.h"
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
BEGIN_TEST_RUNNER_NAMESPACE
|
||||
|
||||
bool run()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
END_TEST_RUNNER_NAMESPACE
|
||||
|
||||
int main()
|
||||
{
|
||||
return TEST_RUNNER_NAMESPACE::run() ? 0 : 1;
|
||||
int main(int argc, char **argv) {
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,4 +6,4 @@ BEGIN_TEST_RUNNER_NAMESPACE
|
|||
|
||||
END_TEST_RUNNER_NAMESPACE
|
||||
|
||||
int main();
|
||||
int main(int argc, char **argv);
|
||||
|
|
|
|||
Loading…
Reference in New Issue