Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
228d90276-1
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2022
228d90276-1
Commits
5b768ac3
Commit
5b768ac3
authored
3 years ago
by
zhanghb97
Browse files
Options
Downloads
Patches
Plain Diff
[tests] Add GoogleTest as the test framework.
parent
651e1199
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+14
-0
14 additions, 0 deletions
CMakeLists.txt
tests/CMakeLists.txt
+13
-0
13 additions, 0 deletions
tests/CMakeLists.txt
tests/container.cpp
+8
-0
8 additions, 0 deletions
tests/container.cpp
with
35 additions
and
0 deletions
CMakeLists.txt
+
14
−
0
View file @
5b768ac3
...
...
@@ -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
)
This diff is collapsed.
Click to expand it.
tests/CMakeLists.txt
0 → 100644
+
13
−
0
View file @
5b768ac3
enable_testing
()
add_executable
(
fake_test
container.cpp
)
target_link_libraries
(
fake_test
gtest_main
)
include
(
GoogleTest
)
gtest_discover_tests
(
fake_test
)
This diff is collapsed.
Click to expand it.
tests/container.cpp
0 → 100644
+
8
−
0
View file @
5b768ac3
#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!"
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment