[Libreoffice-commits] core.git: sc/qa
Tor Lillqvist
tml at collabora.com
Mon Oct 19 04:36:40 PDT 2015
sc/qa/unit/opencl-test.cxx | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
New commits:
commit 2d2d6cd7395cb35e588a067bc92acab0d0004d4a
Author: Tor Lillqvist <tml at collabora.com>
Date: Mon Oct 19 14:21:38 2015 +0300
Seems that people prefer this to be CPPUNIT_ASSERT() instead of assert()
My thinking was that there is a slight difference in meaning; that
assert() checks that the code (or, in this case, data) in the test
*itself* is as expected while CPPUNIT_ASSERT() checks that the
functionality *somewhere else* works as expected. But whatever.
Change-Id: I93f7f8cf2b3aac9e8fc35baf2dcbad1a4003773f
diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx
index 5d839d8..237dbf6 100644
--- a/sc/qa/unit/opencl-test.cxx
+++ b/sc/qa/unit/opencl-test.cxx
@@ -768,17 +768,14 @@ void ScOpenCLTest::testSystematic()
}
}
- assert(nAVertBegin != 0);
- assert(nBVertBegin != 0);
- assert(nAVertEnd > nAVertBegin + 100);
- assert(nBVertEnd > nBVertBegin + 100);
- assert((nAVertEnd-nAVertBegin) == (nBVertEnd-nBVertBegin));
- assert(nAHorEnd > 10);
- assert(nBHorEnd > 10);
- assert(nAHorEnd == nBHorEnd);
-
- (void) nBVertEnd;
- (void) nBHorEnd;
+ CPPUNIT_ASSERT(nAVertBegin != 0);
+ CPPUNIT_ASSERT(nBVertBegin != 0);
+ CPPUNIT_ASSERT(nAVertEnd > nAVertBegin + 100);
+ CPPUNIT_ASSERT(nBVertEnd > nBVertBegin + 100);
+ CPPUNIT_ASSERT((nAVertEnd-nAVertBegin) == (nBVertEnd-nBVertBegin));
+ CPPUNIT_ASSERT(nAHorEnd > 10);
+ CPPUNIT_ASSERT(nBHorEnd > 10);
+ CPPUNIT_ASSERT(nAHorEnd == nBHorEnd);
for (SCROW i = nAVertBegin; i < nAVertEnd; ++i)
{
More information about the Libreoffice-commits
mailing list