From 00a9b3261eb6affd78922f77eb419fa3b6001e55 Mon Sep 17 00:00:00 2001 From: bgbsww Date: Mon, 25 Dec 2023 17:44:06 -0500 Subject: [PATCH] More delinting --- tests/src/Mod/Part/App/FeaturePartCommon.cpp | 6 +++--- tests/src/Mod/Part/App/FeaturePartCut.cpp | 4 ++-- tests/src/Mod/Part/App/FeaturePartFuse.cpp | 4 ++-- tests/src/Mod/Part/App/PartTestHelpers.cpp | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/src/Mod/Part/App/FeaturePartCommon.cpp b/tests/src/Mod/Part/App/FeaturePartCommon.cpp index 953f2f0dcf..be062749bb 100644 --- a/tests/src/Mod/Part/App/FeaturePartCommon.cpp +++ b/tests/src/Mod/Part/App/FeaturePartCommon.cpp @@ -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>; using List = std::vector; 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}}, diff --git a/tests/src/Mod/Part/App/FeaturePartCut.cpp b/tests/src/Mod/Part/App/FeaturePartCut.cpp index 7699a70af2..b5148d68ce 100644 --- a/tests/src/Mod/Part/App/FeaturePartCut.cpp +++ b/tests/src/Mod/Part/App/FeaturePartCut.cpp @@ -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 diff --git a/tests/src/Mod/Part/App/FeaturePartFuse.cpp b/tests/src/Mod/Part/App/FeaturePartFuse.cpp index 33ae5e5bec..9ea4b11392 100644 --- a/tests/src/Mod/Part/App/FeaturePartFuse.cpp +++ b/tests/src/Mod/Part/App/FeaturePartFuse.cpp @@ -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 diff --git a/tests/src/Mod/Part/App/PartTestHelpers.cpp b/tests/src/Mod/Part/App/PartTestHelpers.cpp index 59e63685b4..5c6d59bfd8 100644 --- a/tests/src/Mod/Part/App/PartTestHelpers.cpp +++ b/tests/src/Mod/Part/App/PartTestHelpers.cpp @@ -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 box_origins = { + std::array 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(_doc->addObject("Part::Box")); box->Length.setValue(1); box->Width.setValue(2);