Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenVolumeMesh
OpenVolumeMesh
Commits
e06b982c
Commit
e06b982c
authored
Dec 01, 2015
by
Jan Möbius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Split unittests into seperate files
parent
c3a35d1e
Pipeline
#205
passed with stage
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
24 deletions
+12
-24
src/Unittests/CMakeLists.txt
src/Unittests/CMakeLists.txt
+7
-3
src/Unittests/unittests.cc
src/Unittests/unittests.cc
+0
-6
src/Unittests/unittests_basics.cc
src/Unittests/unittests_basics.cc
+0
-4
src/Unittests/unittests_files.cc
src/Unittests/unittests_files.cc
+2
-4
src/Unittests/unittests_iterators.cc
src/Unittests/unittests_iterators.cc
+3
-4
src/Unittests/unittests_properties.cc
src/Unittests/unittests_properties.cc
+0
-3
No files found.
src/Unittests/CMakeLists.txt
View file @
e06b982c
...
...
@@ -14,10 +14,14 @@ if(GTEST_FOUND)
include_directories
(
${
GTEST_INCLUDE_DIRS
}
)
# set additional link directories
link_directories
(
${
GTEST_LIBRARY_DIR
}
)
# Create new target named unittests_hexmeshing
add_executable
(
unittests EXCLUDE_FROM_ALL unittests.cc unittests_common.cc
)
# Create executable for all unittests
FILE
(
GLOB UNITTEST_SRC *.cc
)
add_executable
(
unittests
${
UNITTEST_SRC
}
)
if
(
NOT WIN32
)
if
(
NOT WIN32
)
# Link against all necessary libraries
target_link_libraries
(
unittests OpenVolumeMesh
${
GTEST_LIBRARIES
}
${
GTEST_MAIN_LIBRARIES
}
pthread
)
...
...
src/Unittests/unittests.cc
View file @
e06b982c
#include <gtest/gtest.h>
#include "unittests_common.hh"
#include "unittests_basics.hh"
#include "unittests_iterators.hh"
#include "unittests_properties.hh"
#include "unittests_files.hh"
int
main
(
int
_argc
,
char
**
_argv
)
{
testing
::
InitGoogleTest
(
&
_argc
,
_argv
);
...
...
src/Unittests/unittests_basics.
hh
→
src/Unittests/unittests_basics.
cc
View file @
e06b982c
#ifndef INCLUDE_UNITTESTS_BASICS_HH
#define INCLUDE_UNITTESTS_BASICS_HH
#include <gtest/gtest.h>
#include <Unittests/unittests_common.hh>
...
...
@@ -2004,4 +2001,3 @@ TEST_F(PolyhedralMeshBase, SwapVertices) {
EXPECT_EQ
(
12u
,
mesh_
.
n_vertices
());
}
#endif // INCLUDE GUARD
src/Unittests/unittests_files.
hh
→
src/Unittests/unittests_files.
cc
View file @
e06b982c
#ifndef INCLUDE_UNITTESTS_FILES_HH
#define INCLUDE_UNITTESTS_FILES_HH
#include <gtest/gtest.h>
#include <Unittests/unittests_common.hh>
#include <OpenVolumeMesh/FileManager/FileManager.hh>
using
namespace
OpenVolumeMesh
;
TEST_F
(
PolyhedralMeshBase
,
LoadFile
)
{
OpenVolumeMesh
::
IO
::
FileManager
fileManager
;
...
...
@@ -293,4 +292,3 @@ TEST_F(PolyhedralMeshBase, SaveFileWithProps2) {
EXPECT_EQ
(
0u
,
mesh_
.
n_cell_props
());
}
#endif // INCLUDE GUARD
src/Unittests/unittests_iterators.
hh
→
src/Unittests/unittests_iterators.
cc
View file @
e06b982c
#ifndef INCLUDE_UNITTESTS_ITERATORS_HH
#define INCLUDE_UNITTESTS_ITERATORS_HH
#include <gtest/gtest.h>
#include <Unittests/unittests_common.hh>
using
namespace
OpenVolumeMesh
;
TEST_F
(
HexahedralMeshBase
,
HexVertexIterTest
)
{
generateHexahedralMesh
(
mesh_
);
...
...
@@ -22,4 +22,3 @@ TEST_F(HexahedralMeshBase, HexVertexIterTest) {
EXPECT_EQ
(
VertexHandle
(
5
),
*
hv_it
);
}
#endif // INCLUDE GUARD
src/Unittests/unittests_properties.
hh
→
src/Unittests/unittests_properties.
cc
View file @
e06b982c
#ifndef UNITTESTS_BASICS_HH_
#define UNITTESTS_BASICS_HH_
#include <iostream>
...
...
@@ -162,4 +160,3 @@ TEST_F(PolyhedralMeshBase, StatusTest) {
StatusAttrib
status
(
mesh_
);
}
#endif
/* UNITTESTS_BASICS_HH_ */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment