diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-08-02 11:33:14 +0500 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2024-08-02 11:31:00 +0200 |
commit | 8bd57009d38f7551a77566a0e782a7b371aece23 (patch) | |
tree | 609d4d28392ff542138dd8bd0d030a014f29847b /chart2 | |
parent | cfd3b14fd4e1ee889dd356523e5cdaa639786d37 (diff) |
Fix wrong / misleading uses of fTools::(more|less|equal) with literal 0
These will never compare with tolerance (the zero is a special case
in rtl_math_approxEqual used internally), so the calls like those
don't do what they appear to do in these cases.
Change-Id: I495ac92b7f45637e118e4fdc04bb6fad6fff31ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171391
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/qa/extras/chart2import.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx index 2f8777f66a29..3cef1b785fae 100644 --- a/chart2/qa/extras/chart2import.cxx +++ b/chart2/qa/extras/chart2import.cxx @@ -639,7 +639,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testBnc889755) const basegfx::BColorStops aColorStops = model::gradient::getColorStopsFromUno(aTransparence.ColorStops); CPPUNIT_ASSERT_EQUAL(size_t(3), aColorStops.size()); - CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[0].getStopOffset(), 0.0)); + CPPUNIT_ASSERT_EQUAL(0.0, aColorStops[0].getStopOffset()); CPPUNIT_ASSERT_EQUAL(Color(0x404040), Color(aColorStops[0].getStopColor())); CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[1].getStopOffset(), 0.070000000000000007)); CPPUNIT_ASSERT_EQUAL(Color(0x404040), Color(aColorStops[1].getStopColor())); @@ -683,7 +683,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testTransparencyGradientValue) // MCGR: Use the whole completely imported transparency gradient to check for correctness CPPUNIT_ASSERT_EQUAL(size_t(2), aColorStops.size()); - CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[0].getStopOffset(), 0.0)); + CPPUNIT_ASSERT_EQUAL(0.0, aColorStops[0].getStopOffset()); CPPUNIT_ASSERT_EQUAL(Color(0x4d4d4d), Color(aColorStops[0].getStopColor())); CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[1].getStopOffset(), 1.0)); CPPUNIT_ASSERT_EQUAL(Color(0x333333), Color(aColorStops[1].getStopColor())); |