Commit f0c017e9 authored by Jan Möbius's avatar Jan Möbius

Split unittests into seperate files

parent 570cdcad
Pipeline #207 failed with stage
......@@ -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)
......
#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);
......
#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
#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
#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
#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_ */
Markdown is supported
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