Points: add unit tests
This commit is contained in:
5
tests/src/Mod/Points/App/CMakeLists.txt
Normal file
5
tests/src/Mod/Points/App/CMakeLists.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
target_sources(
|
||||
Points_tests_run
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Points.cpp
|
||||
)
|
||||
12
tests/src/Mod/Points/App/Points.cpp
Normal file
12
tests/src/Mod/Points/App/Points.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#include "gtest/gtest.h"
|
||||
#include <Mod/Points/App/Points.h>
|
||||
|
||||
// NOLINTBEGIN(cppcoreguidelines-*,readability-*)
|
||||
TEST(Points, TestDefault)
|
||||
{
|
||||
Points::PointKernel kernel;
|
||||
std::vector<Points::PointKernel::value_type> points;
|
||||
kernel.setBasicPoints(points);
|
||||
EXPECT_EQ(kernel.size(), 0);
|
||||
}
|
||||
// NOLINTEND(cppcoreguidelines-*,readability-*)
|
||||
15
tests/src/Mod/Points/CMakeLists.txt
Normal file
15
tests/src/Mod/Points/CMakeLists.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
target_include_directories(Points_tests_run PUBLIC
|
||||
${EIGEN3_INCLUDE_DIR}
|
||||
${OCC_INCLUDE_DIR}
|
||||
${Python3_INCLUDE_DIRS}
|
||||
${XercesC_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
target_link_libraries(Points_tests_run
|
||||
gtest_main
|
||||
${Google_Tests_LIBS}
|
||||
Points
|
||||
)
|
||||
|
||||
add_subdirectory(App)
|
||||
Reference in New Issue
Block a user