tdf#98264, replace CPPUNIT_ASSERT with CPPUNIT_ASSERT_EQUAL

Change-Id: Ieae48c6a2b611d853f2320e27d5836d8c5dbedfb
Reviewed-on: https://gerrit.libreoffice.org/22905
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
This commit is contained in:
Aleksas Pantechovskis
2016-03-04 15:11:00 +02:00
committed by Markus Mohrhard
parent da75a89925
commit c189b03223
4 changed files with 361 additions and 341 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -19,11 +19,11 @@ void Test::testColumnFindEditCells()
// Test the basics with real edit cells, using Column A.
SCROW nResRow = m_pDoc->GetFirstEditTextRow(ScRange(0,0,0,0,MAXROW,0));
CPPUNIT_ASSERT_MESSAGE("There should be no edit cells.", nResRow == -1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be no edit cells.", SCROW(-1), nResRow);
nResRow = m_pDoc->GetFirstEditTextRow(ScRange(0,0,0,0,0,0));
CPPUNIT_ASSERT_MESSAGE("There should be no edit cells.", nResRow == -1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be no edit cells.", SCROW(-1), nResRow);
nResRow = m_pDoc->GetFirstEditTextRow(ScRange(0,0,0,0,10,0));
CPPUNIT_ASSERT_MESSAGE("There should be no edit cells.", nResRow == -1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be no edit cells.", SCROW(-1), nResRow);
ScFieldEditEngine& rEE = m_pDoc->GetEditEngine();
rEE.SetText("Test");
@@ -33,39 +33,39 @@ void Test::testColumnFindEditCells()
ScRange aRange(0,0,0,0,0,0);
nResRow = m_pDoc->GetFirstEditTextRow(aRange);
CPPUNIT_ASSERT_MESSAGE("There is an edit cell here.", nResRow == 0);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There is an edit cell here.", SCROW(0), nResRow);
aRange.aStart.SetRow(1);
aRange.aEnd.SetRow(1);
nResRow = m_pDoc->GetFirstEditTextRow(aRange);
CPPUNIT_ASSERT_MESSAGE("There shouldn't be an edit cell in specified range.", nResRow == -1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There shouldn't be an edit cell in specified range.", SCROW(-1), nResRow);
aRange.aStart.SetRow(2);
aRange.aEnd.SetRow(4);
nResRow = m_pDoc->GetFirstEditTextRow(aRange);
CPPUNIT_ASSERT_MESSAGE("There shouldn't be an edit cell in specified range.", nResRow == -1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There shouldn't be an edit cell in specified range.", SCROW(-1), nResRow);
aRange.aStart.SetRow(0);
aRange.aEnd.SetRow(MAXROW);
nResRow = m_pDoc->GetFirstEditTextRow(aRange);
CPPUNIT_ASSERT_MESSAGE("There should be an edit cell in specified range.", nResRow == 0);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be an edit cell in specified range.", SCROW(0), nResRow);
m_pDoc->SetString(ScAddress(0,0,0), "Test");
m_pDoc->SetValue(ScAddress(0,2,0), 1.0);
ScRefCellValue aCell;
aCell.assign(*m_pDoc, ScAddress(0,0,0));
CPPUNIT_ASSERT_MESSAGE("This should be a string cell.", aCell.meType == CELLTYPE_STRING);
CPPUNIT_ASSERT_EQUAL_MESSAGE("This should be a string cell.", CELLTYPE_STRING, aCell.meType);
aCell.assign(*m_pDoc, ScAddress(0,1,0));
CPPUNIT_ASSERT_MESSAGE("This should be an empty cell.", aCell.meType == CELLTYPE_NONE);
CPPUNIT_ASSERT_EQUAL_MESSAGE("This should be an empty cell.", CELLTYPE_NONE, aCell.meType);
aCell.assign(*m_pDoc, ScAddress(0,2,0));
CPPUNIT_ASSERT_MESSAGE("This should be a numeric cell.", aCell.meType == CELLTYPE_VALUE);
CPPUNIT_ASSERT_EQUAL_MESSAGE("This should be a numeric cell.", CELLTYPE_VALUE, aCell.meType);
aCell.assign(*m_pDoc, ScAddress(0,3,0));
CPPUNIT_ASSERT_MESSAGE("This should be an empty cell.", aCell.meType == CELLTYPE_NONE);
CPPUNIT_ASSERT_EQUAL_MESSAGE("This should be an empty cell.", CELLTYPE_NONE, aCell.meType);
aRange.aStart.SetRow(1);
aRange.aEnd.SetRow(1);
nResRow = m_pDoc->GetFirstEditTextRow(aRange);
CPPUNIT_ASSERT_MESSAGE("There shouldn't be an edit cell in specified range.", nResRow == -1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There shouldn't be an edit cell in specified range.", SCROW(-1), nResRow);
// Test with non-edit cell but with ambiguous script type.

View File

@@ -106,7 +106,7 @@ void Test::testCondFormatINSDEL()
m_pDoc->InsertCol(0,0,MAXROW,0,0,2);
const ScRangeList& rRange = pFormat->GetRange();
CPPUNIT_ASSERT(rRange == ScRange(2,0,0,2,3,0));
CPPUNIT_ASSERT_EQUAL(static_cast<const ScRangeList&>(ScRange(2,0,0,2,3,0)), rRange);
OUString aExpr = pEntry->GetExpression(ScAddress(2,0,0), 0);
CPPUNIT_ASSERT_EQUAL(aExpr, OUString("D2"));
@@ -131,7 +131,7 @@ void Test::testCondFormatInsertCol()
m_pDoc->InsertCol(0,0,MAXROW,0,4,2);
const ScRangeList& rRange = pFormat->GetRange();
CPPUNIT_ASSERT_EQUAL(ScRangeList(ScRange(0,0,0,5,3,0)), rRange);
CPPUNIT_ASSERT_EQUAL(static_cast<const ScRangeList&>(ScRangeList(ScRange(0,0,0,5,3,0))), rRange);
m_pDoc->DeleteTab(0);
}
@@ -180,14 +180,14 @@ void Test::testCondFormatInsertDeleteSheets()
ScConditionalFormatList* pList = m_pDoc->GetCondFormList(0);
CPPUNIT_ASSERT(pList);
const ScConditionalFormat* pCheck = pList->GetFormat(nKey);
CPPUNIT_ASSERT_MESSAGE("Wrong conditional format instance.", pCheck == pFormat);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong conditional format instance.", pCheck, const_cast<const ScConditionalFormat*>(pFormat));
// ... and its range is B2:B4.
ScRangeList aCheckRange = pCheck->GetRange();
CPPUNIT_ASSERT_MESSAGE("This should be a single range.", aCheckRange.size() == 1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("This should be a single range.", size_t(1), aCheckRange.size());
const ScRange* pRange = aCheckRange[0];
CPPUNIT_ASSERT(pRange);
CPPUNIT_ASSERT_MESSAGE("Format should be applied to B2:B4.", *pRange == ScRange(1,1,0,1,3,0));
CPPUNIT_ASSERT_EQUAL_MESSAGE("Format should be applied to B2:B4.", ScRange(1,1,0,1,3,0), *pRange);
ScDocFunc& rFunc = getDocShell().GetDocFunc();
@@ -202,10 +202,10 @@ void Test::testCondFormatInsertDeleteSheets()
// Make sure the range also got shifted.
aCheckRange = pCheck->GetRange();
CPPUNIT_ASSERT_MESSAGE("This should be a single range.", aCheckRange.size() == 1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("This should be a single range.", size_t(1), aCheckRange.size());
pRange = aCheckRange[0];
CPPUNIT_ASSERT(pRange);
CPPUNIT_ASSERT_MESSAGE("Format should be applied to B2:B4 on the 2nd sheet after the sheet insertion.", *pRange == ScRange(1,1,1,1,3,1));
CPPUNIT_ASSERT_EQUAL_MESSAGE("Format should be applied to B2:B4 on the 2nd sheet after the sheet insertion.", ScRange(1,1,1,1,3,1), *pRange);
// Delete the sheet to the left.
bool bDeleted = rFunc.DeleteTable(0, true, true);
@@ -218,10 +218,10 @@ void Test::testCondFormatInsertDeleteSheets()
// Make sure the range got shifted back.
aCheckRange = pCheck->GetRange();
CPPUNIT_ASSERT_MESSAGE("This should be a single range.", aCheckRange.size() == 1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("This should be a single range.", size_t(1), aCheckRange.size());
pRange = aCheckRange[0];
CPPUNIT_ASSERT(pRange);
CPPUNIT_ASSERT_MESSAGE("Format should be applied to B2:B4 on the 1st sheet after the sheet removal.", *pRange == ScRange(1,1,0,1,3,0));
CPPUNIT_ASSERT_EQUAL_MESSAGE("Format should be applied to B2:B4 on the 1st sheet after the sheet removal.", ScRange(1,1,0,1,3,0), *pRange);
SfxUndoManager* pUndoMgr = m_pDoc->GetUndoManager();
CPPUNIT_ASSERT(pUndoMgr);
@@ -235,10 +235,10 @@ void Test::testCondFormatInsertDeleteSheets()
CPPUNIT_ASSERT(pCheck);
aCheckRange = pCheck->GetRange();
CPPUNIT_ASSERT_MESSAGE("This should be a single range.", aCheckRange.size() == 1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("This should be a single range.", size_t(1), aCheckRange.size());
pRange = aCheckRange[0];
CPPUNIT_ASSERT(pRange);
CPPUNIT_ASSERT_MESSAGE("Format should be applied to B2:B4 on the 2nd sheet after the undo of the sheet removal.", *pRange == ScRange(1,1,1,1,3,1));
CPPUNIT_ASSERT_EQUAL_MESSAGE("Format should be applied to B2:B4 on the 2nd sheet after the undo of the sheet removal.", ScRange(1,1,1,1,3,1), *pRange);
#if 0 // TODO : Undo of sheet insertion currently depends on the presence of
// view shell, and crashes when executed during cppunit run.
@@ -423,7 +423,7 @@ void Test::testCondCopyPasteSheet()
CPPUNIT_ASSERT(pCondFormatItem);
CPPUNIT_ASSERT_EQUAL(size_t(1), pCondFormatItem->GetCondFormatData().size());
CPPUNIT_ASSERT( nKey == pCondFormatItem->GetCondFormatData().at(0) );
CPPUNIT_ASSERT_EQUAL( nKey, pCondFormatItem->GetCondFormatData().at(0) );
m_pDoc->DeleteTab(1);
m_pDoc->DeleteTab(0);

View File

@@ -176,7 +176,7 @@ ScRange refreshGroups(ScDPCollection* pDPs, ScDPObject* pDPObj)
std::set<ScDPObject*> aRefs;
bool bSuccess = pDPs->ReloadGroupsInCache(pDPObj, aRefs);
CPPUNIT_ASSERT_MESSAGE("Failed to reload group data in cache.", bSuccess);
CPPUNIT_ASSERT_MESSAGE("There should be only one table linked to this cache.", aRefs.size() == 1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be only one table linked to this cache.", size_t(1), aRefs.size());
pDPObj->ReloadGroupTableData();
return refresh(pDPObj);
@@ -219,8 +219,8 @@ void Test::testPivotTable()
ScDPCollection* pDPs = m_pDoc->GetDPCollection();
bool bSuccess = pDPs->InsertNewTable(pDPObj);
CPPUNIT_ASSERT_MESSAGE("failed to insert a new datapilot object into document", bSuccess);
CPPUNIT_ASSERT_MESSAGE("there should be only one data pilot table.",
pDPs->GetCount() == 1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.",
size_t(1), pDPs->GetCount());
pDPObj->SetName(pDPs->CreateNewName());
bool bOverflow = false;
@@ -246,7 +246,7 @@ void Test::testPivotTable()
bSuccess = checkDPTableOutput<5>(m_pDoc, aOutRange, aOutputCheck, "DataPilot table output");
CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess);
}
CPPUNIT_ASSERT_MESSAGE("There should be only one data cache.", pDPs->GetSheetCaches().size() == 1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be only one data cache.", size_t(1), pDPs->GetSheetCaches().size());
// Update the cell values.
double aData2[] = { 100, 200, 300, 400, 500, 600 };
@@ -285,21 +285,21 @@ void Test::testPivotTable()
CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess);
}
CPPUNIT_ASSERT_MESSAGE("There should be only one data cache.", pDPs->GetSheetCaches().size() == 1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be only one data cache.", size_t(1), pDPs->GetSheetCaches().size());
// Free the first datapilot object after the 2nd one gets reloaded, to
// prevent the data cache from being deleted before the reload.
pDPs->FreeTable(pDPObj);
CPPUNIT_ASSERT_MESSAGE("There should be only one data cache.", pDPs->GetSheetCaches().size() == 1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be only one data cache.", size_t(1), pDPs->GetSheetCaches().size());
// This time clear the cache to refresh the data from the source range.
CPPUNIT_ASSERT_MESSAGE("This datapilot should be based on sheet data.", pDPObj2->IsSheetData());
std::set<ScDPObject*> aRefs;
sal_uLong nErrId = pDPs->ReloadCache(pDPObj2, aRefs);
CPPUNIT_ASSERT_MESSAGE("Cache reload failed.", nErrId == 0);
CPPUNIT_ASSERT_MESSAGE("Reloading a cache shouldn't remove any cache.",
pDPs->GetSheetCaches().size() == 1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Cache reload failed.", sal_uLong(0), nErrId);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Reloading a cache shouldn't remove any cache.",
static_cast<size_t>(1), pDPs->GetSheetCaches().size());
pDPObj2->ClearTableData();
pDPObj2->Output(aOutRange.aStart);
@@ -326,19 +326,19 @@ void Test::testPivotTable()
// Swap the two sheets.
m_pDoc->MoveTab(1, 0);
CPPUNIT_ASSERT_MESSAGE("Swapping the sheets shouldn't remove the cache.",
pDPs->GetSheetCaches().size() == 1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Swapping the sheets shouldn't remove the cache.",
size_t(1), pDPs->GetSheetCaches().size());
CPPUNIT_ASSERT_MESSAGE("Cache should have moved.", !pDPs->GetSheetCaches().hasCache(aSrcRange));
aSrcRange.aStart.SetTab(1);
aSrcRange.aEnd.SetTab(1);
CPPUNIT_ASSERT_MESSAGE("Cache should be here.", pDPs->GetSheetCaches().hasCache(aSrcRange));
pDPs->FreeTable(pDPObj2);
CPPUNIT_ASSERT_MESSAGE("There shouldn't be any data pilot table stored with the document.",
pDPs->GetCount() == 0);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There shouldn't be any data pilot table stored with the document.",
size_t(0), pDPs->GetCount());
CPPUNIT_ASSERT_MESSAGE("There shouldn't be any more data cache.",
pDPs->GetSheetCaches().size() == 0);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There shouldn't be any more data cache.",
size_t(0), pDPs->GetSheetCaches().size());
// Insert a brand new pivot table object once again, but this time, don't
// create the output to avoid creating a data cache.
@@ -349,11 +349,11 @@ void Test::testPivotTable()
m_pDoc, ScRange(nCol1, nRow1, 0, nCol2, nRow2, 0), aFields, nFieldCount, false);
bSuccess = pDPs->InsertNewTable(pDPObj);
CPPUNIT_ASSERT_MESSAGE("failed to insert a new datapilot object into document", bSuccess);
CPPUNIT_ASSERT_MESSAGE("there should be only one data pilot table.",
pDPs->GetCount() == 1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.",
size_t(1), pDPs->GetCount());
pDPObj->SetName(pDPs->CreateNewName());
CPPUNIT_ASSERT_MESSAGE("Data cache shouldn't exist yet before creating the table output.",
pDPs->GetSheetCaches().size() == 0);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Data cache shouldn't exist yet before creating the table output.",
size_t(0), pDPs->GetSheetCaches().size());
// Now, "refresh" the table. This should still return a reference to self
// even with the absence of data cache.
@@ -400,8 +400,8 @@ void Test::testPivotTableLabels()
ScDPCollection* pDPs = m_pDoc->GetDPCollection();
bool bSuccess = pDPs->InsertNewTable(pDPObj);
CPPUNIT_ASSERT_MESSAGE("failed to insert a new datapilot object into document", bSuccess);
CPPUNIT_ASSERT_MESSAGE("there should be only one data pilot table.",
pDPs->GetCount() == 1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.",
size_t(1), pDPs->GetCount());
pDPObj->SetName(pDPs->CreateNewName());
ScRange aOutRange = refresh(pDPObj);
@@ -456,8 +456,8 @@ void Test::testPivotTableDateLabels()
ScDPCollection* pDPs = m_pDoc->GetDPCollection();
bool bSuccess = pDPs->InsertNewTable(pDPObj);
CPPUNIT_ASSERT_MESSAGE("failed to insert a new datapilot object into document", bSuccess);
CPPUNIT_ASSERT_MESSAGE("there should be only one data pilot table.",
pDPs->GetCount() == 1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.",
size_t(1), pDPs->GetCount());
pDPObj->SetName(pDPs->CreateNewName());
ScRange aOutRange = refresh(pDPObj);
@@ -539,8 +539,8 @@ void Test::testPivotTableFilters()
ScDPCollection* pDPs = m_pDoc->GetDPCollection();
bool bSuccess = pDPs->InsertNewTable(pDPObj);
CPPUNIT_ASSERT_MESSAGE("failed to insert a new datapilot object into document", bSuccess);
CPPUNIT_ASSERT_MESSAGE("there should be only one data pilot table.",
pDPs->GetCount() == 1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.",
size_t(1), pDPs->GetCount());
pDPObj->SetName(pDPs->CreateNewName());
ScRange aOutRange = refresh(pDPObj);
@@ -566,7 +566,7 @@ void Test::testPivotTableFilters()
m_pDoc->SetString(aFormulaAddr.Col(), aFormulaAddr.Row(), aFormulaAddr.Tab(),
"=B6");
double fTest = m_pDoc->GetValue(aFormulaAddr);
CPPUNIT_ASSERT_MESSAGE("Incorrect formula value that references a cell in the pivot table output.", fTest == 80.0);
ASSERT_DOUBLES_EQUAL_MESSAGE("Incorrect formula value that references a cell in the pivot table output.", 80.0, fTest);
// Set current page of 'Group2' to 'A'.
pDPObj->BuildAllDimensionMembers();
@@ -594,7 +594,7 @@ void Test::testPivotTableFilters()
}
fTest = m_pDoc->GetValue(aFormulaAddr);
CPPUNIT_ASSERT_MESSAGE("Incorrect formula value that references a cell in the pivot table output.", fTest == 40.0);
ASSERT_DOUBLES_EQUAL_MESSAGE("Incorrect formula value that references a cell in the pivot table output.", 40.0, fTest);
// Set query filter.
ScSheetSourceDesc aDesc(*pDPObj->GetSheetDesc());
@@ -623,7 +623,7 @@ void Test::testPivotTableFilters()
}
fTest = m_pDoc->GetValue(aFormulaAddr);
CPPUNIT_ASSERT_MESSAGE("Incorrect formula value that references a cell in the pivot table output.", fTest == 20.0);
ASSERT_DOUBLES_EQUAL_MESSAGE("Incorrect formula value that references a cell in the pivot table output.", 20.0, fTest);
// Set the current page of 'Group2' back to '- all -'. The query filter
// should still be in effect.
@@ -646,8 +646,8 @@ void Test::testPivotTableFilters()
}
pDPs->FreeTable(pDPObj);
CPPUNIT_ASSERT_MESSAGE("There shouldn't be any data pilot table stored with the document.",
pDPs->GetCount() == 0);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There shouldn't be any data pilot table stored with the document.",
size_t(0), pDPs->GetCount());
m_pDoc->DeleteTab(1);
m_pDoc->DeleteTab(0);
@@ -699,8 +699,8 @@ void Test::testPivotTableNamedSource()
ScDPCollection* pDPs = m_pDoc->GetDPCollection();
bSuccess = pDPs->InsertNewTable(pDPObj);
CPPUNIT_ASSERT_MESSAGE("failed to insert a new pivot table object into document.", bSuccess);
CPPUNIT_ASSERT_MESSAGE("there should be only one data pilot table.",
pDPs->GetCount() == 1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.",
size_t(1), pDPs->GetCount());
pDPObj->SetName(pDPs->CreateNewName());
ScRange aOutRange = refresh(pDPObj);
@@ -729,7 +729,7 @@ void Test::testPivotTableNamedSource()
m_pDoc->MoveTab(1, 0);
OUString aTabName;
m_pDoc->GetName(0, aTabName);
CPPUNIT_ASSERT_MESSAGE( "Wrong sheet name.", aTabName == "Table" );
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Wrong sheet name.", OUString("Table"), aTabName);
CPPUNIT_ASSERT_MESSAGE("Pivot table output is on the wrong sheet!",
pDPObj->GetOutRange().aStart.Tab() == 0);
@@ -744,9 +744,9 @@ void Test::testPivotTableNamedSource()
CPPUNIT_ASSERT_MESSAGE("Cache should exist.", pDPs->GetNameCaches().hasCache(aRangeName));
pDPs->FreeTable(pDPObj);
CPPUNIT_ASSERT_MESSAGE("There should be no more tables.", pDPs->GetCount() == 0);
CPPUNIT_ASSERT_MESSAGE("There shouldn't be any more cache stored.",
pDPs->GetNameCaches().size() == 0);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be no more tables.", size_t(0), pDPs->GetCount());
CPPUNIT_ASSERT_EQUAL_MESSAGE("There shouldn't be any more cache stored.",
size_t(0), pDPs->GetNameCaches().size());
pNames->clear();
m_pDoc->DeleteTab(1);
@@ -770,18 +770,18 @@ void Test::testPivotTableCache()
ScAddress aPos(1,1,0);
ScRange 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);
ScDPCache aCache(m_pDoc);
aCache.InitFromDoc(m_pDoc, aDataRange);
long nDimCount = aCache.GetColumnCount();
CPPUNIT_ASSERT_MESSAGE("wrong dimension count.", nDimCount == 3);
CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension count.", 3L, nDimCount);
OUString aDimName = aCache.GetDimensionName(0);
CPPUNIT_ASSERT_MESSAGE("wrong dimension name", aDimName == "F1");
CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension name", OUString("F1"), aDimName);
aDimName = aCache.GetDimensionName(1);
CPPUNIT_ASSERT_MESSAGE("wrong dimension name", aDimName == "F2");
CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension name", OUString("F2"), aDimName);
aDimName = aCache.GetDimensionName(2);
CPPUNIT_ASSERT_MESSAGE("wrong dimension name", aDimName == "F3");
CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension name", OUString("F3"), aDimName);
// In each dimension, member ID values also represent their sort order (in
// source dimensions only, not in group dimensions). Value items are
@@ -790,7 +790,7 @@ void Test::testPivotTableCache()
// Dimension 0 - a mix of strings and values.
long nMemCount = aCache.GetDimMemberCount(0);
CPPUNIT_ASSERT_MESSAGE("wrong dimension member count", nMemCount == 6);
CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension member count", 6L, nMemCount);
const ScDPItemData* pItem = aCache.GetItemDataById(0, 0);
CPPUNIT_ASSERT_MESSAGE("wrong item value", pItem &&
pItem->GetType() == ScDPItemData::Value &&
@@ -820,7 +820,7 @@ void Test::testPivotTableCache()
// Dimension 1 - duplicate values in source.
nMemCount = aCache.GetDimMemberCount(1);
CPPUNIT_ASSERT_MESSAGE("wrong dimension member count", nMemCount == 3);
CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension member count", 3L, nMemCount);
pItem = aCache.GetItemDataById(1, 0);
CPPUNIT_ASSERT_MESSAGE("wrong item value", pItem &&
pItem->GetType() == ScDPItemData::String &&
@@ -838,7 +838,7 @@ void Test::testPivotTableCache()
// Dimension 2 - values only.
nMemCount = aCache.GetDimMemberCount(2);
CPPUNIT_ASSERT_MESSAGE("wrong dimension member count", nMemCount == 6);
CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong dimension member count", 6L, nMemCount);
pItem = aCache.GetItemDataById(2, 0);
CPPUNIT_ASSERT_MESSAGE("wrong item value", pItem &&
pItem->GetType() == ScDPItemData::Value &&
@@ -967,7 +967,7 @@ void Test::testPivotTableDuplicateDataFields()
ScAddress aPos(2,2,0);
ScRange 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);
ScDPObject* pDPObj = createDPFromRange(
m_pDoc, aDataRange, aFields, SAL_N_ELEMENTS(aFields), false);
@@ -977,7 +977,7 @@ void Test::testPivotTableDuplicateDataFields()
CPPUNIT_ASSERT_MESSAGE("failed to insert a new pivot table object into document.", bSuccess);
CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.",
pDPs->GetCount(), static_cast<size_t>(1));
size_t(1), pDPs->GetCount());
pDPObj->SetName(pDPs->CreateNewName());
ScRange aOutRange = refresh(pDPObj);
@@ -1024,12 +1024,12 @@ void Test::testPivotTableDuplicateDataFields()
ScPivotParam aParam;
pDPObj->FillLabelData(aParam);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be exactly 4 labels (2 original, 1 data layout, and 1 duplicate dimensions).",
aParam.maLabelArray.size(), static_cast<size_t>(4));
size_t(4), aParam.maLabelArray.size());
pDPs->FreeTable(pDPObj);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be no more tables.", pDPs->GetCount(), static_cast<size_t>(0));
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be no more tables.", size_t(0), pDPs->GetCount());
CPPUNIT_ASSERT_EQUAL_MESSAGE("There shouldn't be any more cache stored.",
pDPs->GetSheetCaches().size(), static_cast<size_t>(0));
size_t(0), pDPs->GetSheetCaches().size());
m_pDoc->DeleteTab(1);
m_pDoc->DeleteTab(0);
@@ -1060,7 +1060,7 @@ void Test::testPivotTableNormalGrouping()
ScAddress aPos(1,1,0);
ScRange 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);
ScDPObject* pDPObj = createDPFromRange(
m_pDoc, aDataRange, aFields, SAL_N_ELEMENTS(aFields), false);
@@ -1070,7 +1070,7 @@ void Test::testPivotTableNormalGrouping()
CPPUNIT_ASSERT_MESSAGE("failed to insert a new pivot table object into document.", bSuccess);
CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.",
pDPs->GetCount(), static_cast<size_t>(1));
size_t(1), pDPs->GetCount());
pDPObj->SetName(pDPs->CreateNewName());
ScRange aOutRange = refresh(pDPObj);
@@ -1106,7 +1106,7 @@ void Test::testPivotTableNormalGrouping()
// Group A, B and C together.
ScDPSaveGroupDimension aGroupDim(aBaseDimName, aGroupDimName);
OUString aGroupName = aGroupDim.CreateGroupName(aGroupPrefix);
CPPUNIT_ASSERT_MESSAGE("Unexpected group name", aGroupName == "Group1");
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unexpected group name", OUString("Group1"), aGroupName);
ScDPSaveGroupItem aGroup(aGroupName);
aGroup.AddElement("A");
@@ -1148,7 +1148,7 @@ void Test::testPivotTableNormalGrouping()
ScDPSaveGroupDimension* pGroupDim = pDimData->GetGroupDimAccForBase(aBaseDimName);
CPPUNIT_ASSERT_MESSAGE("There should be an existing group dimension.", pGroupDim);
OUString aGroupName = pGroupDim->CreateGroupName(aGroupPrefix);
CPPUNIT_ASSERT_MESSAGE("Unexpected group name", aGroupName == "Group2");
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unexpected group name", OUString("Group2"), aGroupName);
ScDPSaveGroupItem aGroup(aGroupName);
aGroup.AddElement("D");
@@ -1178,9 +1178,9 @@ void Test::testPivotTableNormalGrouping()
}
pDPs->FreeTable(pDPObj);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be no more tables.", pDPs->GetCount(), static_cast<size_t>(0));
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be no more tables.", size_t(0), pDPs->GetCount());
CPPUNIT_ASSERT_EQUAL_MESSAGE("There shouldn't be any more cache stored.",
pDPs->GetSheetCaches().size(), static_cast<size_t>(0));
size_t(0), pDPs->GetSheetCaches().size());
m_pDoc->DeleteTab(1);
m_pDoc->DeleteTab(0);
@@ -1222,7 +1222,7 @@ void Test::testPivotTableNumberGrouping()
ScAddress aPos(1,1,0);
ScRange 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);
ScDPObject* pDPObj = createDPFromRange(
m_pDoc, aDataRange, aFields, SAL_N_ELEMENTS(aFields), false);
@@ -1232,7 +1232,7 @@ void Test::testPivotTableNumberGrouping()
CPPUNIT_ASSERT_MESSAGE("failed to insert a new pivot table object into document.", bSuccess);
CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.",
pDPs->GetCount(), static_cast<size_t>(1));
size_t(1), pDPs->GetCount());
pDPObj->SetName(pDPs->CreateNewName());
ScDPSaveData* pSaveData = pDPObj->GetSaveData();
@@ -1273,9 +1273,9 @@ void Test::testPivotTableNumberGrouping()
}
pDPs->FreeTable(pDPObj);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be no more tables.", pDPs->GetCount(), static_cast<size_t>(0));
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be no more tables.", size_t(0), pDPs->GetCount());
CPPUNIT_ASSERT_EQUAL_MESSAGE("There shouldn't be any more cache stored.",
pDPs->GetSheetCaches().size(), static_cast<size_t>(0));
size_t(0), pDPs->GetSheetCaches().size());
m_pDoc->DeleteTab(1);
m_pDoc->DeleteTab(0);
@@ -1307,7 +1307,7 @@ void Test::testPivotTableDateGrouping()
ScAddress aPos(1,1,0);
ScRange 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);
ScDPObject* pDPObj = createDPFromRange(
m_pDoc, aDataRange, aFields, SAL_N_ELEMENTS(aFields), false);
@@ -1316,8 +1316,8 @@ void Test::testPivotTableDateGrouping()
bool bSuccess = pDPs->InsertNewTable(pDPObj);
CPPUNIT_ASSERT_MESSAGE("failed to insert a new pivot table object into document.", bSuccess);
CPPUNIT_ASSERT_MESSAGE("there should be only one data pilot table.",
pDPs->GetCount() == 1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.",
size_t(1), pDPs->GetCount());
pDPObj->SetName(pDPs->CreateNewName());
ScDPSaveData* pSaveData = pDPObj->GetSaveData();
@@ -1447,9 +1447,9 @@ void Test::testPivotTableDateGrouping()
}
pDPs->FreeTable(pDPObj);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be no more tables.", pDPs->GetCount(), static_cast<size_t>(0));
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be no more tables.", size_t(0), pDPs->GetCount());
CPPUNIT_ASSERT_EQUAL_MESSAGE("There shouldn't be any more cache stored.",
pDPs->GetSheetCaches().size(), static_cast<size_t>(0));
size_t(0), pDPs->GetSheetCaches().size());
m_pDoc->DeleteTab(1);
m_pDoc->DeleteTab(0);
@@ -1477,7 +1477,7 @@ void Test::testPivotTableEmptyRows()
ScAddress aPos(1,1,0);
ScRange 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);
// Extend the range downward to include some trailing empty rows.
aDataRange.aEnd.IncRow(2);
@@ -1489,8 +1489,8 @@ void Test::testPivotTableEmptyRows()
bool bSuccess = pDPs->InsertNewTable(pDPObj);
CPPUNIT_ASSERT_MESSAGE("failed to insert a new pivot table object into document.", bSuccess);
CPPUNIT_ASSERT_MESSAGE("there should be only one data pilot table.",
pDPs->GetCount() == 1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.",
size_t(1), pDPs->GetCount());
pDPObj->SetName(pDPs->CreateNewName());
ScRange aOutRange = refresh(pDPObj);
@@ -1560,9 +1560,9 @@ void Test::testPivotTableEmptyRows()
}
pDPs->FreeTable(pDPObj);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be no more tables.", pDPs->GetCount(), static_cast<size_t>(0));
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be no more tables.", size_t(0), pDPs->GetCount());
CPPUNIT_ASSERT_EQUAL_MESSAGE("There shouldn't be any more cache stored.",
pDPs->GetSheetCaches().size(), static_cast<size_t>(0));
size_t(0), pDPs->GetSheetCaches().size());
m_pDoc->DeleteTab(1);
m_pDoc->DeleteTab(0);
@@ -1617,8 +1617,8 @@ void Test::testPivotTableTextNumber()
bool bSuccess = pDPs->InsertNewTable(pDPObj);
CPPUNIT_ASSERT_MESSAGE("failed to insert a new pivot table object into document.", bSuccess);
CPPUNIT_ASSERT_MESSAGE("there should be only one data pilot table.",
pDPs->GetCount() == 1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.",
size_t(1), pDPs->GetCount());
pDPObj->SetName(pDPs->CreateNewName());
ScRange aOutRange = refresh(pDPObj);
@@ -1664,9 +1664,9 @@ void Test::testPivotTableTextNumber()
}
pDPs->FreeTable(pDPObj);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be no more tables.", pDPs->GetCount(), static_cast<size_t>(0));
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be no more tables.", size_t(0), pDPs->GetCount());
CPPUNIT_ASSERT_EQUAL_MESSAGE("There shouldn't be any more cache stored.",
pDPs->GetSheetCaches().size(), static_cast<size_t>(0));
size_t(0), pDPs->GetSheetCaches().size());
m_pDoc->DeleteTab(1);
m_pDoc->DeleteTab(0);
@@ -1692,7 +1692,7 @@ void Test::testPivotTableCaseInsensitiveStrings()
ScAddress aPos(1,1,0);
ScRange 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);
ScDPObject* pDPObj = createDPFromRange(
m_pDoc, aDataRange, aFields, SAL_N_ELEMENTS(aFields), false);
@@ -1701,8 +1701,8 @@ void Test::testPivotTableCaseInsensitiveStrings()
bool bSuccess = pDPs->InsertNewTable(pDPObj);
CPPUNIT_ASSERT_MESSAGE("failed to insert a new pivot table object into document.", bSuccess);
CPPUNIT_ASSERT_MESSAGE("there should be only one data pilot table.",
pDPs->GetCount() == 1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.",
size_t(1), pDPs->GetCount());
pDPObj->SetName(pDPs->CreateNewName());
ScRange aOutRange = refresh(pDPObj);
@@ -1720,9 +1720,9 @@ void Test::testPivotTableCaseInsensitiveStrings()
}
pDPs->FreeTable(pDPObj);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be no more tables.", pDPs->GetCount(), static_cast<size_t>(0));
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be no more tables.", size_t(0), pDPs->GetCount());
CPPUNIT_ASSERT_EQUAL_MESSAGE("There shouldn't be any more cache stored.",
pDPs->GetSheetCaches().size(), static_cast<size_t>(0));
size_t(0), pDPs->GetSheetCaches().size());
m_pDoc->DeleteTab(1);
m_pDoc->DeleteTab(0);
@@ -1793,7 +1793,7 @@ void Test::testPivotTableNumStability()
CPPUNIT_ASSERT_MESSAGE("failed to insert a new pivot table object into document.", bSuccess);
CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.",
pDPs->GetCount(), static_cast<size_t>(1));
size_t(1), pDPs->GetCount());
pDPObj->SetName(pDPs->CreateNewName());
ScRange aOutRange = refresh(pDPObj);
@@ -1825,9 +1825,9 @@ void Test::testPivotTableNumStability()
CPPUNIT_ASSERT_MESSAGE("Incorrect value for Sam.", rtl::math::approxEqual(fTest, fSamTotal));
pDPs->FreeTable(pDPObj);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be no more tables.", pDPs->GetCount(), static_cast<size_t>(0));
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be no more tables.", size_t(0), pDPs->GetCount());
CPPUNIT_ASSERT_EQUAL_MESSAGE("There shouldn't be any more cache stored.",
pDPs->GetSheetCaches().size(), static_cast<size_t>(0));
size_t(0), pDPs->GetSheetCaches().size());
m_pDoc->DeleteTab(1);
m_pDoc->DeleteTab(0);
@@ -1855,7 +1855,7 @@ void Test::testPivotTableFieldReference()
ScAddress aPos(1,1,0);
ScRange 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);
ScDPObject* pDPObj = createDPFromRange(
m_pDoc, aDataRange, aFields, SAL_N_ELEMENTS(aFields), false);
@@ -1864,8 +1864,8 @@ void Test::testPivotTableFieldReference()
bool bSuccess = pDPs->InsertNewTable(pDPObj);
CPPUNIT_ASSERT_MESSAGE("failed to insert a new pivot table object into document.", bSuccess);
CPPUNIT_ASSERT_MESSAGE("there should be only one data pilot table.",
pDPs->GetCount() == 1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.",
size_t(1), pDPs->GetCount());
pDPObj->SetName(pDPs->CreateNewName());
ScRange aOutRange = refresh(pDPObj);
@@ -1993,9 +1993,9 @@ void Test::testPivotTableFieldReference()
}
pDPs->FreeTable(pDPObj);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be no more tables.", pDPs->GetCount(), static_cast<size_t>(0));
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be no more tables.", size_t(0), pDPs->GetCount());
CPPUNIT_ASSERT_EQUAL_MESSAGE("There shouldn't be any more cache stored.",
pDPs->GetSheetCaches().size(), static_cast<size_t>(0));
size_t(0), pDPs->GetSheetCaches().size());
m_pDoc->DeleteTab(1);
m_pDoc->DeleteTab(0);
@@ -2025,7 +2025,7 @@ void Test::testPivotTableDocFunc()
ScAddress aPos(1,1,0);
ScRange 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);
ScDPObject* pDPObj = createDPFromRange(
m_pDoc, aDataRange, aFields, SAL_N_ELEMENTS(aFields), false);
@@ -2087,7 +2087,7 @@ void Test::testFuncGETPIVOTDATA()
ScAddress aPos(1,1,0);
ScRange 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);
ScDPObject* pDPObj = nullptr;
@@ -2105,8 +2105,8 @@ void Test::testFuncGETPIVOTDATA()
bool bSuccess = pDPs->InsertNewTable(pDPObj);
CPPUNIT_ASSERT_MESSAGE("failed to insert a new pivot table object into document.", bSuccess);
CPPUNIT_ASSERT_MESSAGE("there should be only one data pilot table.",
pDPs->GetCount() == 1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.",
size_t(1), pDPs->GetCount());
pDPObj->SetName(pDPs->CreateNewName());
ScRange aOutRange = refresh(pDPObj);
@@ -2222,9 +2222,9 @@ void Test::testFuncGETPIVOTDATA()
pDPs->FreeTable(pDPObj);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be no more tables.", pDPs->GetCount(), static_cast<size_t>(0));
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be no more tables.", size_t(0), pDPs->GetCount());
CPPUNIT_ASSERT_EQUAL_MESSAGE("There shouldn't be any more cache stored.",
pDPs->GetSheetCaches().size(), static_cast<size_t>(0));
size_t(0), pDPs->GetSheetCaches().size());
m_pDoc->DeleteTab(1);
m_pDoc->DeleteTab(0);
@@ -2246,7 +2246,7 @@ void Test::testFuncGETPIVOTDATALeafAccess()
ScAddress aPos(1,1,0);
ScRange 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);
ScDPObject* pDPObj = nullptr;
@@ -2264,8 +2264,8 @@ void Test::testFuncGETPIVOTDATALeafAccess()
bool bSuccess = pDPs->InsertNewTable(pDPObj);
CPPUNIT_ASSERT_MESSAGE("failed to insert a new pivot table object into document.", bSuccess);
CPPUNIT_ASSERT_MESSAGE("there should be only one data pilot table.",
pDPs->GetCount() == 1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.",
size_t(1), pDPs->GetCount());
pDPObj->SetName(pDPs->CreateNewName());
ScRange aOutRange = refresh(pDPObj);
@@ -2315,9 +2315,9 @@ void Test::testFuncGETPIVOTDATALeafAccess()
pDPs->FreeTable(pDPObj);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be no more tables.", pDPs->GetCount(), static_cast<size_t>(0));
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be no more tables.", size_t(0), pDPs->GetCount());
CPPUNIT_ASSERT_EQUAL_MESSAGE("There shouldn't be any more cache stored.",
pDPs->GetSheetCaches().size(), static_cast<size_t>(0));
size_t(0), pDPs->GetSheetCaches().size());
m_pDoc->DeleteTab(1);
m_pDoc->DeleteTab(0);
@@ -2361,8 +2361,8 @@ void Test::testPivotTableRepeatItemLabels()
ScDPCollection* pDPs = m_pDoc->GetDPCollection();
bool bSuccess = pDPs->InsertNewTable(pDPObj);
CPPUNIT_ASSERT_MESSAGE("failed to insert a new datapilot object into document", bSuccess);
CPPUNIT_ASSERT_MESSAGE("there should be only one data pilot table.",
pDPs->GetCount() == 1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.",
size_t(1), pDPs->GetCount());
pDPObj->SetName(pDPs->CreateNewName());
bool bOverflow = false;
@@ -2390,12 +2390,12 @@ void Test::testPivotTableRepeatItemLabels()
CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess);
}
CPPUNIT_ASSERT_MESSAGE("There should be only one data cache.", pDPs->GetSheetCaches().size() == 1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be only one data cache.", size_t(1), pDPs->GetSheetCaches().size());
pDPs->FreeTable(pDPObj);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be no more tables.", pDPs->GetCount(), static_cast<size_t>(0));
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be no more tables.", size_t(0), pDPs->GetCount());
CPPUNIT_ASSERT_EQUAL_MESSAGE("There shouldn't be any more cache stored.",
pDPs->GetSheetCaches().size(), static_cast<size_t>(0));
size_t(0), pDPs->GetSheetCaches().size());
m_pDoc->DeleteTab(1);
m_pDoc->DeleteTab(0);