[Libreoffice-commits] core.git: 2 commits - sc/qa
Aleksas Pantechovskis
alex.pantec at gmail.com
Sat Mar 5 20:53:05 UTC 2016
sc/qa/unit/rangelst_test.cxx | 4 ++--
sc/qa/unit/ucalc_sort.cxx | 20 ++++++++++----------
2 files changed, 12 insertions(+), 12 deletions(-)
New commits:
commit 2406edd37d425a7f710667b68fa285d1df70763d
Author: Aleksas Pantechovskis <alex.pantec at gmail.com>
Date: Fri Mar 4 16:07:57 2016 +0200
tdf#98264, replace CPPUNIT_ASSERT with CPPUNIT_ASSERT_EQUAL
Change-Id: Id17cf3a1001af950fdbc09239d023bf52790710f
Reviewed-on: https://gerrit.libreoffice.org/22909
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/sc/qa/unit/rangelst_test.cxx b/sc/qa/unit/rangelst_test.cxx
index 7b13b0d..b1b1712 100644
--- a/sc/qa/unit/rangelst_test.cxx
+++ b/sc/qa/unit/rangelst_test.cxx
@@ -406,7 +406,7 @@ void Test::testJoin_Case1()
aList.Join(ScRange(4,1,0,6,3,0));
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), aList.size());
- CPPUNIT_ASSERT( ScRange(1,1,0,6,3,0) == *aList[0]);
+ CPPUNIT_ASSERT_EQUAL( ScRange(1,1,0,6,3,0), *aList[0]);
}
void Test::testJoin_Case2()
@@ -419,7 +419,7 @@ void Test::testJoin_Case2()
aList.Join(*aList[2], true);
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), aList.size());
- CPPUNIT_ASSERT(ScRange(1,1,0,9,3,0) == *aList[0]);
+ CPPUNIT_ASSERT_EQUAL(ScRange(1,1,0,9,3,0), *aList[0]);
}
void Test::testUpdateReference_DeleteRow()
commit 0355b6b5d252e10193171e86cc5edbf0ab1e9503
Author: Aleksas Pantechovskis <alex.pantec at gmail.com>
Date: Fri Mar 4 16:03:17 2016 +0200
tdf#98264, replace CPPUNIT_ASSERT with CPPUNIT_ASSERT_EQUAL
Change-Id: Ic02ed30b7135d648c8aac97f65e286c163597f86
Reviewed-on: https://gerrit.libreoffice.org/22908
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/sc/qa/unit/ucalc_sort.cxx b/sc/qa/unit/ucalc_sort.cxx
index bb8151d..e692ec8 100644
--- a/sc/qa/unit/ucalc_sort.cxx
+++ b/sc/qa/unit/ucalc_sort.cxx
@@ -43,7 +43,7 @@ void Test::testSort()
clearRange(m_pDoc, ScRange(0, 0, 0, 1, SAL_N_ELEMENTS(aData), 0));
aDataRange = insertRangeData(m_pDoc, aPos, aData, SAL_N_ELEMENTS(aData));
- CPPUNIT_ASSERT_MESSAGE("failed to insert range data at correct position", aDataRange.aStart == aPos);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("failed to insert range data at correct position", aPos, aDataRange.aStart);
}
// Insert note in cell B2.
@@ -85,7 +85,7 @@ void Test::testSort()
};
aDataRange = insertRangeData(m_pDoc, aPos, aData, SAL_N_ELEMENTS(aData));
- CPPUNIT_ASSERT_MESSAGE("failed to insert range data at correct position", aDataRange.aStart == aPos);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("failed to insert range data at correct position", aPos, aDataRange.aStart);
}
aSortData.nCol1 = aDataRange.aStart.Col();
@@ -1062,7 +1062,7 @@ void Test::testSortRefUpdate4_Impl()
ScAddress aPos(0,0,nTab);
clearRange(m_pDoc, ScRange(0, 0, nTab, 1, SAL_N_ELEMENTS(aData), nTab));
aLesson1Range = insertRangeData(m_pDoc, aPos, aData, SAL_N_ELEMENTS(aData));
- CPPUNIT_ASSERT_MESSAGE("failed to insert range data at correct position", aLesson1Range.aStart == aPos);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("failed to insert range data at correct position", aPos, aLesson1Range.aStart);
}
ScRange aLesson2Range;
@@ -1080,7 +1080,7 @@ void Test::testSortRefUpdate4_Impl()
ScAddress aPos(0,0,nTab);
clearRange(m_pDoc, ScRange(0, 0, nTab, 1, SAL_N_ELEMENTS(aData), nTab));
aLesson2Range = insertRangeData(m_pDoc, aPos, aData, SAL_N_ELEMENTS(aData));
- CPPUNIT_ASSERT_MESSAGE("failed to insert range data at correct position", aLesson2Range.aStart == aPos);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("failed to insert range data at correct position", aPos, aLesson2Range.aStart);
}
ScRange aSortRange;
@@ -1098,7 +1098,7 @@ void Test::testSortRefUpdate4_Impl()
ScAddress aPos(0,0,nTab);
clearRange(m_pDoc, ScRange(0, 0, nTab, 1, SAL_N_ELEMENTS(aData), nTab));
aSortRange = insertRangeData(m_pDoc, aPos, aData, SAL_N_ELEMENTS(aData));
- CPPUNIT_ASSERT_MESSAGE("failed to insert range data at correct position", aSortRange.aStart == aPos);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("failed to insert range data at correct position", aPos, aSortRange.aStart);
}
ScDBDocFunc aFunc(getDocShell());
@@ -1265,7 +1265,7 @@ void Test::testSortRefUpdate5()
ScAddress aPos(0,0,nTab);
clearRange(m_pDoc, ScRange(0, 0, nTab, 2, SAL_N_ELEMENTS(aData), nTab));
aSortRange = insertRangeData(m_pDoc, aPos, aData, SAL_N_ELEMENTS(aData));
- CPPUNIT_ASSERT_MESSAGE("failed to insert range data at correct position", aSortRange.aStart == aPos);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("failed to insert range data at correct position", aPos, aSortRange.aStart);
// Actual results and expected sorted results.
for (SCROW nRow=0; nRow < static_cast<SCROW>(SAL_N_ELEMENTS(aValCheck)); ++nRow)
@@ -1357,7 +1357,7 @@ void Test::testSortRefUpdate6()
ScAddress aPos(0,0,0);
ScRange aDataRange = insertRangeData(m_pDoc, aPos, aData, SAL_N_ELEMENTS(aData));
- CPPUNIT_ASSERT(aDataRange.aStart == aPos);
+ CPPUNIT_ASSERT_EQUAL(aPos, aDataRange.aStart);
{
// Expected output table content. 0 = empty cell
@@ -1497,7 +1497,7 @@ void Test::testSortBroadcaster()
ScAddress aPos(0,0,0);
ScRange aDataRange = insertRangeData(m_pDoc, aPos, aData, SAL_N_ELEMENTS(aData));
- CPPUNIT_ASSERT(aDataRange.aStart == aPos);
+ CPPUNIT_ASSERT_EQUAL(aPos, aDataRange.aStart);
{
// Expected output table content. 0 = empty cell
@@ -1597,7 +1597,7 @@ void Test::testSortBroadcaster()
ScAddress aPos(0,4,0);
ScRange aDataRange = insertRangeData(m_pDoc, aPos, aData, SAL_N_ELEMENTS(aData));
- CPPUNIT_ASSERT(aDataRange.aStart == aPos);
+ CPPUNIT_ASSERT_EQUAL(aPos, aDataRange.aStart);
{
// Expected output table content. 0 = empty cell
@@ -1799,7 +1799,7 @@ void Test::testSortPartialFormulaGroup()
const ScFormulaCell* pFC = m_pDoc->GetFormulaCell(ScAddress(1,1,0));
CPPUNIT_ASSERT(pFC);
CPPUNIT_ASSERT_MESSAGE("This formula cell should be the first in a group.", pFC->IsSharedTop());
- CPPUNIT_ASSERT_MESSAGE("Incorrect formula group length.", pFC->GetSharedLength() == 5);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Incorrect formula group length.", static_cast<SCROW>(5), pFC->GetSharedLength());
ScDBDocFunc aFunc(getDocShell());
More information about the Libreoffice-commits
mailing list