diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-04-28 14:20:46 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-04-28 14:20:46 +0200 |
commit | 6414f7e5333b68840537be1576ec7068f01061ba (patch) | |
tree | fbc2bf0949467e18147ed9d34232bd3ce897e8c4 /basegfx/test/basegfxtools.cxx | |
parent | cc18a06a5abca3f336d2263fc8248368c08635e4 (diff) |
loplugin:cppunitassertequals: basegfx
Change-Id: I942634a688d7728bb21c3ce9bd530e07467cb7c5
Diffstat (limited to 'basegfx/test/basegfxtools.cxx')
-rw-r--r-- | basegfx/test/basegfxtools.cxx | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/basegfx/test/basegfxtools.cxx b/basegfx/test/basegfxtools.cxx index dc0dfb9152f9..e06ee194cf00 100644 --- a/basegfx/test/basegfxtools.cxx +++ b/basegfx/test/basegfxtools.cxx @@ -55,22 +55,28 @@ public: std::ptrdiff_t nIndex; std::tie(nIndex,fAlpha) = maKeyStops.lerp(-1.0); - CPPUNIT_ASSERT_MESSAGE("-1.0", nIndex==0 && fAlpha==0.0); + CPPUNIT_ASSERT_EQUAL_MESSAGE("-1.0", std::ptrdiff_t(0), nIndex); + CPPUNIT_ASSERT_EQUAL_MESSAGE("-1.0", 0.0, fAlpha); std::tie(nIndex,fAlpha) = maKeyStops.lerp(0.1); - CPPUNIT_ASSERT_MESSAGE("0.1", nIndex==0 && fAlpha==0.0); + CPPUNIT_ASSERT_EQUAL_MESSAGE("0.1", std::ptrdiff_t(0), nIndex); + CPPUNIT_ASSERT_EQUAL_MESSAGE("0.1", 0.0, fAlpha); std::tie(nIndex,fAlpha) = maKeyStops.lerp(0.3); - CPPUNIT_ASSERT_MESSAGE("0.3", nIndex==0 && fTools::equal(fAlpha,0.5)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("0.3", std::ptrdiff_t(0), nIndex); + CPPUNIT_ASSERT_MESSAGE("0.3", fTools::equal(fAlpha,0.5)); std::tie(nIndex,fAlpha) = maKeyStops.lerp(0.5); - CPPUNIT_ASSERT_MESSAGE("0.5", nIndex==0 && fTools::equal(fAlpha,1.0)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("0.5", std::ptrdiff_t(0), nIndex); + CPPUNIT_ASSERT_MESSAGE("0.5", fTools::equal(fAlpha,1.0)); std::tie(nIndex,fAlpha) = maKeyStops.lerp(0.51); - CPPUNIT_ASSERT_MESSAGE("0.51", nIndex==1 && fTools::equal(fAlpha,0.025)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("0.51", std::ptrdiff_t(1), nIndex); + CPPUNIT_ASSERT_MESSAGE("0.51", fTools::equal(fAlpha,0.025)); std::tie(nIndex,fAlpha) = maKeyStops.lerp(0.9); - CPPUNIT_ASSERT_MESSAGE("0.51", nIndex==1 && fTools::equal(fAlpha,1.0)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("0.51", std::ptrdiff_t(1), nIndex); + CPPUNIT_ASSERT_MESSAGE("0.51", fTools::equal(fAlpha,1.0)); std::tie(nIndex,fAlpha) = maKeyStops.lerp(1.0); CPPUNIT_ASSERT_EQUAL_MESSAGE("0.51", std::ptrdiff_t(1), nIndex); |