diff options
author | Jan-Marek Glogowski <jan-marek.glogowski@extern.cib.de> | 2019-08-14 14:53:59 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2019-08-14 23:47:12 +0200 |
commit | 80648b3580baf73b345b66d0858edcfc661005ba (patch) | |
tree | 3a7547c4417909f0b9aa48413ab51a5506e4a8db /vcl | |
parent | 21bffad6bc108f3dc5eee608bf702412a5fcb530 (diff) |
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@fbihome.de>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/qa/cppunit/timer.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
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); |