Tests: Add test case for ReaderOBJ

This commit is contained in:
wmayer
2025-08-22 12:32:42 +02:00
committed by Yorik van Havre
parent 5d75cf8fed
commit 8747607820
2 changed files with 43 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
#include <gtest/gtest.h>
#include <Base/FileInfo.h>
#include <Mod/Mesh/App/Core/IO/Reader3MF.h>
#include <Mod/Mesh/App/Core/IO/ReaderOBJ.h>
#include <xercesc/util/PlatformUtils.hpp>
#include <zipios++/fcoll.h>
@@ -37,4 +38,17 @@ TEST_F(ImporterTest, Test3MF)
EXPECT_EQ(mesh2.CountEdges(), 1950);
EXPECT_EQ(mesh2.CountFacets(), 1300);
}
TEST_F(ImporterTest, TestOBJ)
{
std::string file(DATADIR);
file.append("/tests/mesh.obj");
MeshCore::MeshKernel kernel;
MeshCore::ReaderOBJ reader(kernel, nullptr);
EXPECT_EQ(reader.Load(file), true);
EXPECT_EQ(kernel.CountPoints(), 8);
EXPECT_EQ(kernel.CountFacets(), 12);
}
// NOLINTEND(cppcoreguidelines-*,readability-*)