More delinting
This commit is contained in:
@@ -25,7 +25,7 @@ protected:
|
||||
void TearDown() override
|
||||
{}
|
||||
|
||||
Part::Common* _common; // NOLINT Can't be private in a test framework
|
||||
Part::Common* _common = nullptr; // NOLINT Can't be private in a test framework
|
||||
};
|
||||
|
||||
TEST_F(FeaturePartCommonTest, testIntersecting)
|
||||
@@ -165,13 +165,13 @@ TEST_F(FeaturePartCommonTest, testHistory)
|
||||
using MapList = std::map<int, std::vector<int>>;
|
||||
using List = std::vector<int>;
|
||||
MapList compare1 = {{0, List {0}},
|
||||
{1, List {5}},
|
||||
{1, List {5}}, // NOLINT magic number
|
||||
{2, List()},
|
||||
{3, List {2}},
|
||||
{4, List {3}},
|
||||
{5, List {1}}}; // NOLINT magic number
|
||||
MapList compare2 = {{0, List {0}},
|
||||
{1, List {5}},
|
||||
{1, List {5}}, // NOLINT magic number
|
||||
{2, List {4}},
|
||||
{3, List()},
|
||||
{4, List {3}},
|
||||
|
||||
@@ -24,7 +24,7 @@ protected:
|
||||
void TearDown() override
|
||||
{}
|
||||
|
||||
Part::Cut* _cut; // NOLINT Can't be private in a test framework
|
||||
Part::Cut* _cut = nullptr; // NOLINT Can't be private in a test framework
|
||||
};
|
||||
|
||||
TEST_F(FeaturePartCutTest, testIntersecting)
|
||||
@@ -129,7 +129,7 @@ TEST_F(FeaturePartCutTest, testBarelyIntersecting)
|
||||
_cut->execute();
|
||||
Part::TopoShape ts = _cut->Shape.getValue();
|
||||
double volume = PartTestHelpers::getVolume(ts.getShape());
|
||||
double target = 6 - PartTestHelpers::minimalDistance * 3; // 3 dimensions in a Volume
|
||||
double target = 6 - PartTestHelpers::minimalDistance * 3; // NOLINT 3 dimensions in a Volume
|
||||
Base::BoundBox3d bb = ts.getBoundBox();
|
||||
|
||||
// Assert
|
||||
|
||||
@@ -25,7 +25,7 @@ protected:
|
||||
void TearDown() override
|
||||
{}
|
||||
|
||||
Part::Fuse* _fuse; // NOLINT Can't be private in a test framework
|
||||
Part::Fuse* _fuse = nullptr; // NOLINT Can't be private in a test framework
|
||||
};
|
||||
|
||||
TEST_F(FeaturePartFuseTest, testIntersecting)
|
||||
@@ -130,7 +130,7 @@ TEST_F(FeaturePartFuseTest, testBarelyIntersecting)
|
||||
_fuse->execute();
|
||||
Part::TopoShape ts = _fuse->Shape.getValue();
|
||||
double volume = PartTestHelpers::getVolume(ts.getShape());
|
||||
double target = 12 - PartTestHelpers::minimalDistance * 3; // 3 dimensions in a Volume
|
||||
double target = 12 - PartTestHelpers::minimalDistance * 3; // NOLINT 3 dimensions in a Volume
|
||||
Base::BoundBox3d bb = ts.getBoundBox();
|
||||
|
||||
// Assert
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
namespace PartTestHelpers
|
||||
{
|
||||
|
||||
double getVolume(TopoDS_Shape shape)
|
||||
double getVolume(const TopoDS_Shape shape)
|
||||
{
|
||||
GProp_GProps prop;
|
||||
BRepGProp::VolumeProperties(shape, prop);
|
||||
@@ -15,7 +15,7 @@ void PartTestHelperClass::createTestDoc()
|
||||
{
|
||||
_docName = App::GetApplication().getUniqueDocumentName("test");
|
||||
_doc = App::GetApplication().newDocument(_docName.c_str(), "testUser");
|
||||
std::array<Base::Vector3d, 6> box_origins = {
|
||||
std::array<Base::Vector3d, 6> box_origins = { // NOLINT magic number
|
||||
Base::Vector3d(), // First box at 0,0,0
|
||||
Base::Vector3d(0, 1, 0), // Overlap with first box
|
||||
Base::Vector3d(0, 3, 0), // Don't Overlap with first box
|
||||
@@ -24,7 +24,7 @@ void PartTestHelperClass::createTestDoc()
|
||||
// For the Just Inside Of Touching case, go enough that we exceed precision rounding
|
||||
Base::Vector3d(0, 2 - minimalDistance, 0)};
|
||||
|
||||
for (unsigned i = 0; i < _boxes.size(); i++) {
|
||||
for (int i = 0; i < _boxes.size(); i++) {
|
||||
auto box = _boxes[i] = static_cast<Part::Box*>(_doc->addObject("Part::Box"));
|
||||
box->Length.setValue(1);
|
||||
box->Width.setValue(2);
|
||||
|
||||
Reference in New Issue
Block a user