Adding additional TNP tests (#11829)

* Initial tests for Chamfer, Fillet, Compound

* Lint cleanup, new tests

* Outline of Extrusion and Revolution

* Use python to define a 2d object to extrude and test

* Refactor; start filling in revolution tests

* Example of parameterized tests in Extrusion, cleanups

* Use gtest framework for parameterised tests

* Rearrange for clarity

* WIP with TEST_P use for posterity

* Switch from parameters to individual tests

* Guess at test failures on other platforms

* Cleanups and Revolution Tests

* Remove temp code

* Switch Revolutions to boundbox test; add Compound subshape count test

* Calculate test volume correctly; lint fixes

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
This commit is contained in:
bgbsww
2024-01-06 19:25:44 -05:00
committed by GitHub
parent 365c5f4777
commit e166c8ccfd
9 changed files with 971 additions and 7 deletions

View File

@@ -0,0 +1,33 @@
// SPDX-License-Identifier: LGPL-2.1-or-later
#include "gtest/gtest.h"
#include "Mod/Part/App/FeaturePartBoolean.h"
#include <src/App/InitApplication.h>
#include "PartTestHelpers.h"
class FeaturePartBooleanTest: public ::testing::Test, public PartTestHelpers::PartTestHelperClass
{
protected:
static void SetUpTestSuite()
{
tests::initApplication();
}
void SetUp() override
{
// createTestDoc();
// _boolean = dynamic_cast<Part::Boolean*>(_doc->addObject("Part::Boolean"));
}
void TearDown() override
{}
Part::Boolean* _boolean; // NOLINT Can't be private in a test framework
};
// This is completely tested in the FeaturePartCommon, FeaturePartCut, and FeaturePartFuse
// subclasses. This class is unfortunately not usable unless initialized in one of those
// forms, so no testing at this level.