Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GTMesh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tomáš Jakubec
GTMesh
Commits
779a1d1e
There was an error fetching the commit references. Please try again later.
Commit
779a1d1e
authored
4 years ago
by
Tomáš Jakubec
Browse files
Options
Downloads
Patches
Plain Diff
add fail test
parent
258950a9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/UnitTests/CMakeLists.txt
+5
-0
5 additions, 0 deletions
src/UnitTests/CMakeLists.txt
src/UnitTests/DummyTestFail.cpp
+22
-0
22 additions, 0 deletions
src/UnitTests/DummyTestFail.cpp
with
27 additions
and
0 deletions
src/UnitTests/CMakeLists.txt
+
5
−
0
View file @
779a1d1e
...
...
@@ -5,6 +5,10 @@ ADD_EXECUTABLE( DummyTest DummyTest.cpp )
TARGET_COMPILE_OPTIONS
(
DummyTest PRIVATE
${
CXX_TESTS_FLAGS
}
)
TARGET_LINK_LIBRARIES
(
DummyTest
${
GTEST_BOTH_LIBRARIES
}
)
ADD_EXECUTABLE
(
DummyTestFail DummyTestFail.cpp
)
TARGET_COMPILE_OPTIONS
(
DummyTestFail PRIVATE
${
CXX_TESTS_FLAGS
}
)
TARGET_LINK_LIBRARIES
(
DummyTestFail
${
GTEST_BOTH_LIBRARIES
}
)
# Specify a cuda test
# if( BUILD_CUDA )
...
...
@@ -17,6 +21,7 @@ TARGET_LINK_LIBRARIES( DummyTest ${GTEST_BOTH_LIBRARIES} )
# endif()
ADD_TEST
(
DummyTest
${
EXECUTABLE_OUTPUT_PATH
}
/DummyTest
${
CMAKE_EXECUTABLE_SUFFIX
}
)
ADD_TEST
(
DummyTestFail
${
EXECUTABLE_OUTPUT_PATH
}
/DummyTestFail
${
CMAKE_EXECUTABLE_SUFFIX
}
)
# Add the tests
...
...
This diff is collapsed.
Click to expand it.
src/UnitTests/DummyTestFail.cpp
0 → 100644
+
22
−
0
View file @
779a1d1e
#ifdef HAVE_GTEST
#include
<gtest/gtest.h>
using
namespace
TNL
;
TEST
(
DummyTest
,
basicTest
)
{
const
bool
tr
=
true
;
const
bool
fa
=
false
;
const
int
two
=
2
;
const
int
ten
=
10
;
EXPECT_EQ
(
tr
,
true
);
EXPECT_EQ
(
fa
,
false
);
EXPECT_EQ
(
two
,
2
);
EXPECT_EQ
(
ten
,
5
);
// fail expected
}
#endif
#include
"main.h"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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