diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-12-21 16:43:18 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-12-21 19:09:46 +0000 |
commit | 179f50f810dfa1779de5c1f212f3887031e5567d (patch) | |
tree | 5a43b12be7af1d9d87a9b22fdcd266a18e182086 /svx | |
parent | 16075474819696f920979969474aa8300f4af530 (diff) |
qa: hint about tolerance in names
As suggested by Mike in https://gerrit.libreoffice.org/c/core/+/144171
Change-Id: I653118985b781ebb1eed71587ae19efe45e1c800
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144691
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/qa/unit/customshapes.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/svx/qa/unit/customshapes.cxx b/svx/qa/unit/customshapes.cxx index 5840d636eb61..38f8159143a0 100644 --- a/svx/qa/unit/customshapes.cxx +++ b/svx/qa/unit/customshapes.cxx @@ -327,7 +327,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145245_ExtrusionPosition) static_cast<SdrObjCustomShape&>(*SdrObject::getSdrObjectFromXShape(xShape0))); tools::Rectangle aBoundRect(rSdrCustomShape.GetCurrentBoundRect()); tools::Rectangle aExpected(Point(1000, 1000), Size(6002, 5001)); - CPPUNIT_ASSERT_RECTANGLE_EQUAL(aExpected, aBoundRect, 40); + CPPUNIT_ASSERT_RECTANGLE_EQUAL_WITH_TOLERANCE(aExpected, aBoundRect, 40); } { // Second shape has half of extrusion behind the shape. @@ -337,7 +337,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145245_ExtrusionPosition) // Without the fix the height was 1 instead of 5001. tools::Rectangle aBoundRect(rSdrCustomShape.GetCurrentBoundRect()); tools::Rectangle aExpected(Point(9000, 3500), Size(6002, 5001)); - CPPUNIT_ASSERT_RECTANGLE_EQUAL(aExpected, aBoundRect, 40); + CPPUNIT_ASSERT_RECTANGLE_EQUAL_WITH_TOLERANCE(aExpected, aBoundRect, 40); } { // Third shape has extrusion before the shape. @@ -347,7 +347,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145245_ExtrusionPosition) // Without the fix the y-coordinate was 1000 instead of 6000. tools::Rectangle aBoundRect(rSdrCustomShape.GetCurrentBoundRect()); tools::Rectangle aExpected(Point(18000, 6000), Size(6002, 5001)); - CPPUNIT_ASSERT_RECTANGLE_EQUAL(aExpected, aBoundRect, 40); + CPPUNIT_ASSERT_RECTANGLE_EQUAL_WITH_TOLERANCE(aExpected, aBoundRect, 40); } } @@ -371,7 +371,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145111_Fontwork_rendering_font_siz // The expected values 1501|1777, 3941 x 1446 are only valid for 96dpi. tools::Rectangle aBoundRect(rSdrCustomShape.GetCurrentBoundRect()); tools::Rectangle aExpected(Point(1501, 1777), Size(3941, 1446)); - CPPUNIT_ASSERT_RECTANGLE_EQUAL(aExpected, aBoundRect, 5); + CPPUNIT_ASSERT_RECTANGLE_EQUAL_WITH_TOLERANCE(aExpected, aBoundRect, 5); } CPPUNIT_TEST_FIXTURE(CustomshapesTest, testTdf145111_anchor_in_Fontwork) @@ -478,7 +478,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testResizeRotatedShape) rSdrShape.NbcResize(rSdrShape.GetRelativePos(), Fraction(1.0), Fraction(-0.5)); tools::Rectangle aSnapRect(rSdrShape.GetSnapRect()); tools::Rectangle aBoundRect(rSdrShape.GetCurrentBoundRect()); - CPPUNIT_ASSERT_RECTANGLE_EQUAL(aSnapRect, aBoundRect, 3); + CPPUNIT_ASSERT_RECTANGLE_EQUAL_WITH_TOLERANCE(aSnapRect, aBoundRect, 3); } // Change height @@ -488,7 +488,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testResizeRotatedShape) rSdrShape.NbcResize(rSdrShape.GetRelativePos(), Fraction(1.0), Fraction(2.0)); tools::Rectangle aSnapRect(rSdrShape.GetSnapRect()); tools::Rectangle aBoundRect(rSdrShape.GetCurrentBoundRect()); - CPPUNIT_ASSERT_RECTANGLE_EQUAL(aSnapRect, aBoundRect, 3); + CPPUNIT_ASSERT_RECTANGLE_EQUAL_WITH_TOLERANCE(aSnapRect, aBoundRect, 3); } // Change width @@ -498,7 +498,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testResizeRotatedShape) rSdrShape.NbcResize(rSdrShape.GetRelativePos(), Fraction(2.0), Fraction(1.0)); tools::Rectangle aSnapRect(rSdrShape.GetSnapRect()); tools::Rectangle aBoundRect(rSdrShape.GetCurrentBoundRect()); - CPPUNIT_ASSERT_RECTANGLE_EQUAL(aSnapRect, aBoundRect, 3); + CPPUNIT_ASSERT_RECTANGLE_EQUAL_WITH_TOLERANCE(aSnapRect, aBoundRect, 3); } // Change width and mirror horizontal @@ -508,7 +508,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testResizeRotatedShape) rSdrShape.NbcResize(rSdrShape.GetRelativePos(), Fraction(-0.5), Fraction(1.0)); tools::Rectangle aSnapRect(rSdrShape.GetSnapRect()); tools::Rectangle aBoundRect(rSdrShape.GetCurrentBoundRect()); - CPPUNIT_ASSERT_RECTANGLE_EQUAL(aSnapRect, aBoundRect, 3); + CPPUNIT_ASSERT_RECTANGLE_EQUAL_WITH_TOLERANCE(aSnapRect, aBoundRect, 3); } } |