Skip to content
Snippets Groups Projects
Commit 5b768ac3 authored by zhanghb97's avatar zhanghb97
Browse files

[tests] Add GoogleTest as the test framework.

parent 651e1199
No related branches found
No related tags found
No related merge requests found
......@@ -73,6 +73,19 @@ add_dependencies(GoogleBenchmark project_googlebenchmark)
find_package(Threads)
target_link_libraries(GoogleBenchmark INTERFACE Threads::Threads)
#-------------------------------------------------------------------------------
# Deploy GoogleTest
#-------------------------------------------------------------------------------
include(FetchContent)
FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/609281088cfefc76f9d0ce82e1ff6c30cc3591e5.zip
)
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)
#-------------------------------------------------------------------------------
# Find OpenCV
#-------------------------------------------------------------------------------
......@@ -86,3 +99,4 @@ include_directories(${OpenCV_INCLUDE_DIRS})
add_subdirectory(lib)
add_subdirectory(benchmarks)
add_subdirectory(tests)
enable_testing()
add_executable(
fake_test
container.cpp
)
target_link_libraries(
fake_test
gtest_main
)
include(GoogleTest)
gtest_discover_tests(fake_test)
#include "Utils/Container.h"
#include <gtest/gtest.h>
// Use fake test for the initial version.
TEST(FakeTest, BasicAssertions) {
EXPECT_STRNE("after landing the improvements of memref descriptor",
"please remove this!");
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment