[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot]
2023-12-23 10:55:15 +00:00
parent 619d2c970f
commit abf7fb0791
5 changed files with 44 additions and 37 deletions

View File

@@ -129,12 +129,14 @@ TEST_F(FeaturePartCutTest, testBarelyIntersecting)
_cut->execute();
Part::TopoShape ts = _cut->Shape.getValue();
double volume = PartTestHelpers::getVolume(ts.getShape());
double target = 6 - Base::Precision::Confusion() * 3 * 1000; // Reduce precision to 1e04 over 3 dimensions
double target =
6 - Base::Precision::Confusion() * 3 * 1000; // Reduce precision to 1e04 over 3 dimensions
Base::BoundBox3d bb = ts.getBoundBox();
// Assert
// Using FLOAT, not DOUBLE here so test library comparison is of reasonable precision 1e07 rather than 1e15
// See https://google.github.io/googletest/reference/assertions.html#floating-point
// Using FLOAT, not DOUBLE here so test library comparison is of reasonable precision 1e07
// rather than 1e15 See
// https://google.github.io/googletest/reference/assertions.html#floating-point
EXPECT_FLOAT_EQ(volume, target);
// double check using bounds:
EXPECT_DOUBLE_EQ(bb.MinX, 0.0);
@@ -172,4 +174,4 @@ TEST_F(FeaturePartCutTest, testGetProviderName)
EXPECT_STREQ(name, "PartGui::ViewProviderBoolean");
}
// See FeaturePartCommon.cpp for a history test. It would be exactly the same and redundant here.
// See FeaturePartCommon.cpp for a history test. It would be exactly the same and redundant here.