summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/source/container/xelementaccess.cxx2
-rw-r--r--test/source/container/xindexaccess.cxx4
-rw-r--r--test/source/sheet/cellproperties.cxx4
-rw-r--r--test/source/sheet/datapilotfield.cxx17
-rw-r--r--test/source/sheet/xdatabaserange.cxx12
-rw-r--r--test/source/sheet/xdatapilotdescriptor.cxx12
-rw-r--r--test/source/sheet/xdatapilottable.cxx6
-rw-r--r--test/source/sheet/xdatapilottable2.cxx16
-rw-r--r--test/source/sheet/xnamedrange.cxx24
-rw-r--r--test/source/sheet/xnamedranges.cxx18
-rw-r--r--test/source/sheet/xsheetannotation.cxx10
-rw-r--r--test/source/sheet/xspreadsheetdocument.cxx2
-rw-r--r--test/source/sheet/xspreadsheets2.cxx2
-rw-r--r--test/source/util/xsearchable.cxx2
14 files changed, 67 insertions, 64 deletions
diff --git a/test/source/container/xelementaccess.cxx b/test/source/container/xelementaccess.cxx
index c1281feaa796..16e9c2ff4c3c 100644
--- a/test/source/container/xelementaccess.cxx
+++ b/test/source/container/xelementaccess.cxx
@@ -19,7 +19,7 @@ namespace apitest {
void XElementAccess::testGetElementType()
{
uno::Reference< container::XElementAccess > xElementAccess(init(), UNO_QUERY_THROW);
- CPPUNIT_ASSERT(xElementAccess->getElementType()==maType);
+ CPPUNIT_ASSERT_EQUAL(maType, xElementAccess->getElementType());
}
void XElementAccess::testHasElements()
diff --git a/test/source/container/xindexaccess.cxx b/test/source/container/xindexaccess.cxx
index 773366ab5ee2..e359d88277a4 100644
--- a/test/source/container/xindexaccess.cxx
+++ b/test/source/container/xindexaccess.cxx
@@ -24,13 +24,13 @@ XIndexAccess::XIndexAccess(sal_Int32 nItems):
void XIndexAccess::testGetCount()
{
uno::Reference< container::XIndexAccess > xIndexAccess(init(), UNO_QUERY_THROW);
- CPPUNIT_ASSERT(mnItems == xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(mnItems, xIndexAccess->getCount());
}
void XIndexAccess::testGetByIndex()
{
uno::Reference< container::XIndexAccess > xIndexAccess(init(), UNO_QUERY_THROW);
- CPPUNIT_ASSERT(mnItems == xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(mnItems, xIndexAccess->getCount());
if (mnItems > 0)
{
diff --git a/test/source/sheet/cellproperties.cxx b/test/source/sheet/cellproperties.cxx
index c5a52367f34b..746ee190e1e4 100644
--- a/test/source/sheet/cellproperties.cxx
+++ b/test/source/sheet/cellproperties.cxx
@@ -35,7 +35,7 @@ void CellProperties::testVertJustify()
uno::Any aVertJustifyControllValue = xCellRangeBase->getPropertyValue(aVertJustify);
CPPUNIT_ASSERT(aVertJustifyControllValue >>= aValue);
std::cout << "New VertJustify value: " << aValue << std::endl;
- CPPUNIT_ASSERT_MESSAGE("value has not been changed", aValue == 3);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("value has not been changed", sal_Int32(3), aValue);
}
void CellProperties::testRotateReference()
@@ -53,7 +53,7 @@ void CellProperties::testRotateReference()
uno::Any aRotateReferenceControllValue = xCellRangeBase->getPropertyValue(aRotateReference);
CPPUNIT_ASSERT(aRotateReferenceControllValue >>= aValue);
std::cout << "New RotateReference value: " << aValue << std::endl;
- CPPUNIT_ASSERT_MESSAGE("value has not been changed", aValue == 3);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("value has not been changed", sal_Int32(3), aValue);
}
}
diff --git a/test/source/sheet/datapilotfield.cxx b/test/source/sheet/datapilotfield.cxx
index 2772328eef17..66c3b45ab1d4 100644
--- a/test/source/sheet/datapilotfield.cxx
+++ b/test/source/sheet/datapilotfield.cxx
@@ -46,8 +46,9 @@ void DataPilotField::testSortInfo()
sheet::DataPilotFieldSortInfo aNewSortInfoValue;
aValue = xPropSet->getPropertyValue(aSortInfo);
CPPUNIT_ASSERT( aValue >>= aNewSortInfoValue );
- CPPUNIT_ASSERT_MESSAGE("set value should be the same as got value", aNewSortInfoValue.Field == aSortInfoValue.Field
- && aNewSortInfoValue.Mode == aSortInfoValue.Mode && aNewSortInfoValue.IsAscending == aSortInfoValue.IsAscending);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("set value should be the same as got value", aSortInfoValue.Field, aNewSortInfoValue.Field);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("set value should be the same as got value", aSortInfoValue.Mode, aNewSortInfoValue.Mode);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("set value should be the same as got value", aSortInfoValue.IsAscending, aNewSortInfoValue.IsAscending);
//setting HasSortInfo only makes sense for false, for true the uno implementation does nothing
bool bHasSortInfo(false);
@@ -79,8 +80,8 @@ void DataPilotField::testLayoutInfo()
sheet::DataPilotFieldLayoutInfo aNewLayoutInfoValue;
aValue = xPropSet->getPropertyValue(aLayoutInfo);
CPPUNIT_ASSERT( aValue >>= aNewLayoutInfoValue );
- CPPUNIT_ASSERT_MESSAGE("set value should be the same as the got value", aNewLayoutInfoValue.LayoutMode == aLayoutInfoValue.LayoutMode &&
- aNewLayoutInfoValue.AddEmptyLines == aLayoutInfoValue.AddEmptyLines);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("set value should be the same as the got value", aLayoutInfoValue.LayoutMode, aNewLayoutInfoValue.LayoutMode);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("set value should be the same as the got value", aLayoutInfoValue.AddEmptyLines, aNewLayoutInfoValue.AddEmptyLines);
//setting HasLayoutInfo only makes sense for false, tor true the uno implementation does nothing
bool bHasLayoutInfo(false);
@@ -112,8 +113,8 @@ void DataPilotField::testAutoShowInfo()
sheet::DataPilotFieldAutoShowInfo aNewAutoShowInfoValue;
aValue = xPropSet->getPropertyValue(aAutoShowInfo);
CPPUNIT_ASSERT( aValue >>= aNewAutoShowInfoValue );
- CPPUNIT_ASSERT_MESSAGE("set value should be the same as the got value", aNewAutoShowInfoValue.DataField == aAutoShowInfoValue.DataField &&
- aNewAutoShowInfoValue.IsEnabled == aAutoShowInfoValue.IsEnabled);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("set value should be the same as the got value", aAutoShowInfoValue.DataField, aNewAutoShowInfoValue.DataField);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("set value should be the same as the got value", aAutoShowInfoValue.IsEnabled, aNewAutoShowInfoValue.IsEnabled);
//setting HasLayoutInfo only makes sense for false, tor true the uno implementation does nothing
bool bHasAutoShowInfo(false);
@@ -145,8 +146,8 @@ void DataPilotField::testReference()
sheet::DataPilotFieldReference aNewReferenceValue;
aValue = xPropSet->getPropertyValue(aReference);
CPPUNIT_ASSERT( aValue >>= aNewReferenceValue );
- CPPUNIT_ASSERT_MESSAGE("set value should be the same as the got value", aReferenceValue.ReferenceField == aNewReferenceValue.ReferenceField
- && aReferenceValue.ReferenceItemType == aNewReferenceValue.ReferenceItemType);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("set value should be the same as the got value", aReferenceValue.ReferenceField, aNewReferenceValue.ReferenceField);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("set value should be the same as the got value", aReferenceValue.ReferenceItemType, aNewReferenceValue.ReferenceItemType);
//setting HasReference only makes sense for false, tor true the uno implementation does nothing
bool bHasReference(false);
diff --git a/test/source/sheet/xdatabaserange.cxx b/test/source/sheet/xdatabaserange.cxx
index 45f59fc9109c..e85d0741a2f5 100644
--- a/test/source/sheet/xdatabaserange.cxx
+++ b/test/source/sheet/xdatabaserange.cxx
@@ -48,11 +48,11 @@ void XDatabaseRange::testDataArea()
xDBRange->setDataArea(aCellAddress);
table::CellRangeAddress aValue;
aValue = xDBRange->getDataArea();
- CPPUNIT_ASSERT( aCellAddress.Sheet == aValue.Sheet );
- CPPUNIT_ASSERT( aCellAddress.StartRow == aValue.StartRow );
- CPPUNIT_ASSERT( aCellAddress.EndRow == aValue.EndRow );
- CPPUNIT_ASSERT( aCellAddress.StartColumn == aValue.StartColumn );
- CPPUNIT_ASSERT( aCellAddress.EndColumn == aValue.EndColumn );
+ CPPUNIT_ASSERT_EQUAL( aCellAddress.Sheet, aValue.Sheet );
+ CPPUNIT_ASSERT_EQUAL( aCellAddress.StartRow, aValue.StartRow );
+ CPPUNIT_ASSERT_EQUAL( aCellAddress.EndRow, aValue.EndRow );
+ CPPUNIT_ASSERT_EQUAL( aCellAddress.StartColumn, aValue.StartColumn );
+ CPPUNIT_ASSERT_EQUAL( aCellAddress.EndColumn, aValue.EndColumn );
}
void XDatabaseRange::testGetSubtotalDescriptor()
@@ -121,7 +121,7 @@ void XDatabaseRange::testGetSortDescriptor()
{
sal_Int32 nUserListIndex = 1;
aProp.Value >>= nUserListIndex;
- CPPUNIT_ASSERT(nUserListIndex == 0);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nUserListIndex);
}
}
}
diff --git a/test/source/sheet/xdatapilotdescriptor.cxx b/test/source/sheet/xdatapilotdescriptor.cxx
index 7fd5b4f772ae..58f48a8bbcd5 100644
--- a/test/source/sheet/xdatapilotdescriptor.cxx
+++ b/test/source/sheet/xdatapilotdescriptor.cxx
@@ -31,7 +31,7 @@ void XDataPilotDescriptor::testTag()
uno::Reference< sheet::XDataPilotDescriptor > xDescr(init(), UNO_QUERY_THROW);
xDescr->setTag(aTag);
OUString aNewTag = xDescr->getTag();
- CPPUNIT_ASSERT( aTag == aNewTag );
+ CPPUNIT_ASSERT_EQUAL( aTag, aNewTag );
}
void XDataPilotDescriptor::testSourceRange()
@@ -50,11 +50,11 @@ void XDataPilotDescriptor::testSourceRange()
table::CellRangeAddress aReturn;
aReturn = xDescr->getSourceRange();
- CPPUNIT_ASSERT(aAddress.Sheet == aReturn.Sheet);
- CPPUNIT_ASSERT(aAddress.StartColumn == aReturn.StartColumn);
- CPPUNIT_ASSERT(aAddress.StartRow == aReturn.StartRow);
- CPPUNIT_ASSERT(aAddress.EndColumn == aReturn.EndColumn);
- CPPUNIT_ASSERT(aAddress.EndRow == aReturn.EndRow);
+ CPPUNIT_ASSERT_EQUAL(aAddress.Sheet, aReturn.Sheet);
+ CPPUNIT_ASSERT_EQUAL(aAddress.StartColumn, aReturn.StartColumn);
+ CPPUNIT_ASSERT_EQUAL(aAddress.StartRow, aReturn.StartRow);
+ CPPUNIT_ASSERT_EQUAL(aAddress.EndColumn, aReturn.EndColumn);
+ CPPUNIT_ASSERT_EQUAL(aAddress.EndRow, aReturn.EndRow);
//restore old settings
xDescr->setSourceRange(aOldAddress);
diff --git a/test/source/sheet/xdatapilottable.cxx b/test/source/sheet/xdatapilottable.cxx
index cef1550dc9d1..50d6cb80d7fb 100644
--- a/test/source/sheet/xdatapilottable.cxx
+++ b/test/source/sheet/xdatapilottable.cxx
@@ -31,9 +31,9 @@ void XDataPilotTable::testGetOutputRange()
uno::Reference< sheet::XDataPilotTable > xDPTable(init(),UNO_QUERY_THROW);
table::CellRangeAddress aRange = xDPTable->getOutputRange();
- CPPUNIT_ASSERT( aRange.Sheet == 0 );
- CPPUNIT_ASSERT( aRange.StartColumn == 7 );
- CPPUNIT_ASSERT( aRange.StartRow == 8 );
+ CPPUNIT_ASSERT_EQUAL( sal_Int16(0), aRange.Sheet );
+ CPPUNIT_ASSERT_EQUAL( sal_Int32(7), aRange.StartColumn );
+ CPPUNIT_ASSERT_EQUAL( sal_Int32(8), aRange.StartRow );
}
void XDataPilotTable::testRefresh()
diff --git a/test/source/sheet/xdatapilottable2.cxx b/test/source/sheet/xdatapilottable2.cxx
index 235fa5090878..a300704d1a2d 100644
--- a/test/source/sheet/xdatapilottable2.cxx
+++ b/test/source/sheet/xdatapilottable2.cxx
@@ -127,17 +127,17 @@ void XDataPilotTable2::testGetOutputRangeByType()
CPPUNIT_ASSERT( maRangeWhole.EndRow - maRangeWhole.StartRow > 0);
//table range must be of equal width with the whole range, and the same bottom
- CPPUNIT_ASSERT( maRangeTable.Sheet == maRangeWhole.Sheet );
- CPPUNIT_ASSERT( maRangeTable.EndRow == maRangeWhole.EndRow );
- CPPUNIT_ASSERT( maRangeTable.StartColumn == maRangeWhole.StartColumn );
- CPPUNIT_ASSERT( maRangeTable.EndColumn == maRangeWhole.EndColumn );
+ CPPUNIT_ASSERT_EQUAL( maRangeWhole.Sheet, maRangeTable.Sheet );
+ CPPUNIT_ASSERT_EQUAL( maRangeWhole.EndRow, maRangeTable.EndRow );
+ CPPUNIT_ASSERT_EQUAL( maRangeWhole.StartColumn, maRangeTable.StartColumn );
+ CPPUNIT_ASSERT_EQUAL( maRangeWhole.EndColumn, maRangeTable.EndColumn );
//result range must be smaller than the table range, and must share the same lower-right corner
- CPPUNIT_ASSERT( maRangeResult.Sheet == maRangeTable.Sheet );
+ CPPUNIT_ASSERT_EQUAL( maRangeTable.Sheet, maRangeResult.Sheet );
CPPUNIT_ASSERT( maRangeResult.StartColumn >= maRangeTable.StartColumn );
CPPUNIT_ASSERT( maRangeResult.StartRow >= maRangeTable.StartRow );
- CPPUNIT_ASSERT( maRangeResult.EndRow == maRangeTable.EndRow );
- CPPUNIT_ASSERT( maRangeResult.EndColumn == maRangeTable.EndColumn );
+ CPPUNIT_ASSERT_EQUAL( maRangeTable.EndRow, maRangeResult.EndRow );
+ CPPUNIT_ASSERT_EQUAL( maRangeTable.EndColumn, maRangeResult.EndColumn );
}
@@ -269,7 +269,7 @@ bool XDataPilotTable2::checkDrillDownSheetContent(uno::Reference< sheet::XSpread
{
Any& aCell1 = aSheetData[x][y];
const Any& aCell2 = aData[x][y];
- CPPUNIT_ASSERT(aCell1 == aCell2);
+ CPPUNIT_ASSERT_EQUAL(aCell2, aCell1);
}
}
return true;
diff --git a/test/source/sheet/xnamedrange.cxx b/test/source/sheet/xnamedrange.cxx
index 5234a9835eb4..5353b5416e82 100644
--- a/test/source/sheet/xnamedrange.cxx
+++ b/test/source/sheet/xnamedrange.cxx
@@ -71,7 +71,7 @@ void XNamedRange::testGetType()
{
OUString aTestedNamedRangeString("initial1");
uno::Reference< sheet::XNamedRange > xNamedRange = getNamedRange(aTestedNamedRangeString);
- CPPUNIT_ASSERT_MESSAGE("Wrong expected Type", xNamedRange->getType() == 0);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong expected Type", sal_Int32(0), xNamedRange->getType());
}
void XNamedRange::testSetType()
@@ -81,23 +81,23 @@ void XNamedRange::testSetType()
sal_Int32 nType = ::sheet::NamedRangeFlag::ROW_HEADER;
xNamedRange->setType(nType);
- CPPUNIT_ASSERT_MESSAGE("Wrong expected Type ROW_HEADER after setting it", xNamedRange->getType() == nType);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong expected Type ROW_HEADER after setting it", nType, xNamedRange->getType());
nType = ::sheet::NamedRangeFlag::COLUMN_HEADER;
xNamedRange->setType(nType);
- CPPUNIT_ASSERT_MESSAGE("Wrong expected Type COLUMN_HEADER after setting it", xNamedRange->getType() == nType);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong expected Type COLUMN_HEADER after setting it", nType, xNamedRange->getType());
nType = ::sheet::NamedRangeFlag::FILTER_CRITERIA;
xNamedRange->setType(nType);
- CPPUNIT_ASSERT_MESSAGE("Wrong expected Type FILTER_CRITERIA after setting it", xNamedRange->getType() == nType);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong expected Type FILTER_CRITERIA after setting it", nType, xNamedRange->getType());
nType = ::sheet::NamedRangeFlag::PRINT_AREA;
xNamedRange->setType(nType);
- CPPUNIT_ASSERT_MESSAGE("Wrong expected Type PRINT_AREA after setting it", xNamedRange->getType() == nType);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong expected Type PRINT_AREA after setting it", nType, xNamedRange->getType());
nType = 0;
xNamedRange->setType(nType);
- CPPUNIT_ASSERT_MESSAGE("Wrong expected Type 0 after setting it", xNamedRange->getType() == nType);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong expected Type 0 after setting it", nType, xNamedRange->getType());
}
void XNamedRange::testGetReferencePosition()
@@ -107,9 +107,9 @@ void XNamedRange::testGetReferencePosition()
table::CellAddress aCellAddress = xNamedRange->getReferencePosition();
// the expected address is on B1, as it was the active cell when initial2 was created
- CPPUNIT_ASSERT_MESSAGE("Wrong SHEET reference position", aCellAddress.Sheet == 0);
- CPPUNIT_ASSERT_MESSAGE("Wrong COLUMN reference position", aCellAddress.Column == 1);
- CPPUNIT_ASSERT_MESSAGE("Wrong ROW reference position", aCellAddress.Row == 0);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong SHEET reference position", sal_Int16(0), aCellAddress.Sheet);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong COLUMN reference position", sal_Int32(1), aCellAddress.Column);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong ROW reference position", sal_Int32(0), aCellAddress.Row);
}
void XNamedRange::testSetReferencePosition()
@@ -122,9 +122,9 @@ void XNamedRange::testSetReferencePosition()
xNamedRange->setReferencePosition(aBaseAddress);
table::CellAddress aCellAddress = xNamedRange->getReferencePosition();
- CPPUNIT_ASSERT_MESSAGE("Wrong SHEET reference position after setting it", aCellAddress.Sheet == 1);
- CPPUNIT_ASSERT_MESSAGE("Wrong COLUMN reference position after setting it", aCellAddress.Column == 2);
- CPPUNIT_ASSERT_MESSAGE("Wrong ROW reference position after setting it", aCellAddress.Row == 3);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong SHEET reference position after setting it", sal_Int16(1), aCellAddress.Sheet);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong COLUMN reference position after setting it", sal_Int32(2), aCellAddress.Column);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong ROW reference position after setting it", sal_Int32(3), aCellAddress.Row);
}
}
diff --git a/test/source/sheet/xnamedranges.cxx b/test/source/sheet/xnamedranges.cxx
index c31f4afe7d82..4fee1da0e23c 100644
--- a/test/source/sheet/xnamedranges.cxx
+++ b/test/source/sheet/xnamedranges.cxx
@@ -120,10 +120,11 @@ void XNamedRanges::testAddNewFromTitles()
uno::Reference< sheet::XCellRangeAddressable > xCellRangeAdr(xCellRangeRef->getReferredCells(), UNO_QUERY_THROW);
table::CellRangeAddress cellRangeAddress = xCellRangeAdr->getRangeAddress();
- CPPUNIT_ASSERT(cellRangeAddress.EndColumn == i && cellRangeAddress.StartColumn == i);
- CPPUNIT_ASSERT(cellRangeAddress.StartRow == 1);
- CPPUNIT_ASSERT(cellRangeAddress.EndRow == 3);
- CPPUNIT_ASSERT(cellRangeAddress.Sheet == 1);
+ CPPUNIT_ASSERT_EQUAL(i, cellRangeAddress.EndColumn);
+ CPPUNIT_ASSERT_EQUAL(i, cellRangeAddress.StartColumn);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), cellRangeAddress.StartRow);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), cellRangeAddress.EndRow);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(1), cellRangeAddress.Sheet);
}
xNamedRanges->addNewFromTitles(aCellRangeAddress, sheet::Border_LEFT);
@@ -145,10 +146,11 @@ void XNamedRanges::testAddNewFromTitles()
uno::Reference< sheet::XCellRangeAddressable > xCellRangeAdr(xCellRangeRef->getReferredCells(), UNO_QUERY_THROW);
table::CellRangeAddress cellRangeAddress = xCellRangeAdr->getRangeAddress();
- CPPUNIT_ASSERT(cellRangeAddress.EndRow == i && cellRangeAddress.StartRow == i);
- CPPUNIT_ASSERT(cellRangeAddress.StartColumn == 1);
- CPPUNIT_ASSERT(cellRangeAddress.EndColumn == 3);
- CPPUNIT_ASSERT(cellRangeAddress.Sheet == 1);
+ CPPUNIT_ASSERT_EQUAL(i, cellRangeAddress.EndRow);
+ CPPUNIT_ASSERT_EQUAL(i, cellRangeAddress.StartRow);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), cellRangeAddress.StartColumn);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), cellRangeAddress.EndColumn);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(1), cellRangeAddress.Sheet);
}
}
diff --git a/test/source/sheet/xsheetannotation.cxx b/test/source/sheet/xsheetannotation.cxx
index b39552603d13..6643096012f3 100644
--- a/test/source/sheet/xsheetannotation.cxx
+++ b/test/source/sheet/xsheetannotation.cxx
@@ -30,9 +30,9 @@ void XSheetAnnotation::testGetPosition()
aExpectedCellAddress.Row = 1;
aExpectedCellAddress.Column = 2;
- CPPUNIT_ASSERT_MESSAGE("Wrong SHEET reference position", aResultCellAddress.Sheet == aExpectedCellAddress.Sheet);
- CPPUNIT_ASSERT_MESSAGE("Wrong COLUMN reference position", aResultCellAddress.Column == aExpectedCellAddress.Column);
- CPPUNIT_ASSERT_MESSAGE("Wrong ROW reference position", aResultCellAddress.Row == aExpectedCellAddress.Row);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong SHEET reference position", aExpectedCellAddress.Sheet, aResultCellAddress.Sheet);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong COLUMN reference position", aExpectedCellAddress.Column, aResultCellAddress.Column);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong ROW reference position", aExpectedCellAddress.Row, aResultCellAddress.Row);
}
void XSheetAnnotation::testGetAuthor()
@@ -40,14 +40,14 @@ void XSheetAnnotation::testGetAuthor()
uno::Reference< sheet::XSheetAnnotation > aSheetAnnotation (init(), UNO_QUERY_THROW);
OUString aAuthor = aSheetAnnotation->getAuthor();
- CPPUNIT_ASSERT_MESSAGE("Wrong author", aAuthor == "LG");
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong author", OUString("LG"), aAuthor);
}
void XSheetAnnotation::testGetDate()
{
uno::Reference< sheet::XSheetAnnotation > aSheetAnnotation (init(), UNO_QUERY_THROW);
OUString aDate = aSheetAnnotation->getDate();
- CPPUNIT_ASSERT_MESSAGE("Wrong date", aDate == "01/17/2013");
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong date", OUString("01/17/2013"), aDate);
}
void XSheetAnnotation::testGetIsVisible()
{
diff --git a/test/source/sheet/xspreadsheetdocument.cxx b/test/source/sheet/xspreadsheetdocument.cxx
index 31477643cf31..cab546accb2f 100644
--- a/test/source/sheet/xspreadsheetdocument.cxx
+++ b/test/source/sheet/xspreadsheetdocument.cxx
@@ -25,7 +25,7 @@ void XSpreadsheetDocument::testGetSheets()
CPPUNIT_ASSERT(xSheets.is());
uno::Reference< container::XIndexAccess > xIA(xSheets, UNO_QUERY_THROW);
- CPPUNIT_ASSERT( xIA->getCount() == mnSheets );
+ CPPUNIT_ASSERT_EQUAL( mnSheets, xIA->getCount() );
}
}
diff --git a/test/source/sheet/xspreadsheets2.cxx b/test/source/sheet/xspreadsheets2.cxx
index 76e2a05c6fea..fb32ea3173c2 100644
--- a/test/source/sheet/xspreadsheets2.cxx
+++ b/test/source/sheet/xspreadsheets2.cxx
@@ -275,7 +275,7 @@ void XSpreadsheets2::testImportCellStyle()
sal_Int32 aVertJustify = 0;
CPPUNIT_ASSERT(xCellStyleProp->getPropertyValue(aProperty) >>= aVertJustify);
- CPPUNIT_ASSERT_MESSAGE("New style: VertJustify not set", (table::CellVertJustify)aVertJustify == table::CellVertJustify_CENTER);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("New style: VertJustify not set", table::CellVertJustify_CENTER, (table::CellVertJustify)aVertJustify);
}
uno::Reference< sheet::XSpreadsheetDocument> XSpreadsheets2::getDoc(const OUString& aFileBase, uno::Reference< lang::XComponent >& xComp)
diff --git a/test/source/util/xsearchable.cxx b/test/source/util/xsearchable.cxx
index 91006e18118a..c58be12eb971 100644
--- a/test/source/util/xsearchable.cxx
+++ b/test/source/util/xsearchable.cxx
@@ -27,7 +27,7 @@ void XSearchable::testFindAll()
uno::Reference< container::XIndexAccess > xIndex = xSearchable->findAll(xSearchDescr);
CPPUNIT_ASSERT(xIndex.is());
- CPPUNIT_ASSERT(xIndex->getCount() == mnCount);
+ CPPUNIT_ASSERT_EQUAL(mnCount, xIndex->getCount());
}
void XSearchable::testFindFirst()