summaryrefslogtreecommitdiff
path: root/include/basegfx/tuple
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2023-06-21 14:42:03 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2023-06-21 22:03:47 +0200
commitf3db857905437d4ce3b41fd75bd591e2f7801c5f (patch)
tree5662647eff8428f91f2fa51c306320ce06957929 /include/basegfx/tuple
parent2ff1d94ba28b6c3c7e7d1599c5de0333426d5e2c (diff)
tdf#155735: Add tests in basegfx
Add tests for BColorModifier_luminance_to_alpha and BColorModifier_saturate Use basegfx::fTools::equal in B3DTuple::operator==, otherwise some asserts fail with - Expected: [0.3575, 0.8575, 0.3575] - Actual : [0.3575, 0.8575, 0.3575] Although they are equal Change-Id: Iad6d9ff78a390f5ee2a3e33e479e34d98e751b2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153394 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'include/basegfx/tuple')
-rw-r--r--include/basegfx/tuple/b3dtuple.hxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/basegfx/tuple/b3dtuple.hxx b/include/basegfx/tuple/b3dtuple.hxx
index 7ac6a774bad5..15777b7f9f32 100644
--- a/include/basegfx/tuple/b3dtuple.hxx
+++ b/include/basegfx/tuple/b3dtuple.hxx
@@ -112,7 +112,9 @@ namespace basegfx
bool operator==(const B3DTuple& rTup) const
{
- return mfX == rTup.mfX && mfY == rTup.mfY && mfZ == rTup.mfZ;
+ return ::basegfx::fTools::equal(mfX, rTup.mfX) &&
+ ::basegfx::fTools::equal(mfY, rTup.mfY) &&
+ ::basegfx::fTools::equal(mfZ, rTup.mfZ);
}
bool operator!=(const B3DTuple& rTup) const { return !operator==(rTup); }