summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Marek Glogowski <jan-marek.glogowski@extern.cib.de>2019-08-14 14:53:59 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2019-08-14 23:47:12 +0200
commit80648b3580baf73b345b66d0858edcfc661005ba (patch)
tree3a7547c4417909f0b9aa48413ab51a5506e4a8db
parent21bffad6bc108f3dc5eee608bf702412a5fcb530 (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>
-rw-r--r--vcl/qa/cppunit/timer.cxx4
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);