[Libreoffice-commits] core.git: vcl/qa
Jan-Marek Glogowski (via logerrit)
logerrit at kemper.freedesktop.org
Wed Aug 14 21:48:21 UTC 2019
vcl/qa/cppunit/timer.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 80648b3580baf73b345b66d0858edcfc661005ba
Author: Jan-Marek Glogowski <jan-marek.glogowski at extern.cib.de>
AuthorDate: Wed Aug 14 14:53:59 2019 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Wed Aug 14 23:47:12 2019 +0200
Add some margin to the Stopwatch test
The test works with system ticks, so generally isn't that stable.
So add a little margin by comparing the values as doubles.
Change-Id: I1c6e582c7d0755f165f00a669911265b1d960acd
Reviewed-on: https://gerrit.libreoffice.org/77460
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>
diff --git a/vcl/qa/cppunit/timer.cxx b/vcl/qa/cppunit/timer.cxx
index d0cfca5c1088..39734ae18b85 100644
--- a/vcl/qa/cppunit/timer.cxx
+++ b/vcl/qa/cppunit/timer.cxx
@@ -601,8 +601,8 @@ void TimerTest::testStopwatch()
break;
}
- CPPUNIT_ASSERT_EQUAL(sal_uInt32(10), n1Iter);
- CPPUNIT_ASSERT_EQUAL(sal_uInt32(10), n2Iter);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(10.0, double(n1Iter), 1.1);
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(10.0, double(n2Iter), 1.1);
}
CPPUNIT_TEST_SUITE_REGISTRATION(TimerTest);
More information about the Libreoffice-commits
mailing list