Mesh: add unit tests

This commit is contained in:
wmayer
2023-08-27 17:59:40 +02:00
committed by wwmayer
parent cdd5248721
commit 0ae4ef2d2f
8 changed files with 139 additions and 2 deletions

View File

@@ -0,0 +1,21 @@
#include "gtest/gtest.h"
#include <Mod/Mesh/App/Mesh.h>
// NOLINTBEGIN(cppcoreguidelines-*,readability-*)
TEST(MeshTest, TestDefault)
{
MeshCore::MeshKernel kernel;
Base::Vector3f p1 {
0,
0,
0,
};
Base::Vector3f p2 {0, 0, 1};
Base::Vector3f p3 {0, 1, 0};
kernel.AddFacet(MeshCore::MeshGeomFacet(p1, p2, p3));
EXPECT_EQ(kernel.CountPoints(), 3);
EXPECT_EQ(kernel.CountEdges(), 3);
EXPECT_EQ(kernel.CountFacets(), 1);
}
// NOLINTEND(cppcoreguidelines-*,readability-*)