summaryrefslogtreecommitdiff
path: root/test/source
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2019-12-06 15:17:38 +0100
committerEike Rathke <erack@redhat.com>2019-12-06 16:35:54 +0100
commit766ce853d18da813e8d435776f462470cd072538 (patch)
tree7604095430f70f29ac56c1fc106cbba18bcd9bb5 /test/source
parente749fd947c3eead198a4b702428a41ae3d6e2c9d (diff)
Swap expected and actual values
in CPPUNIT_ASSERT... the first parameter is the expected value and the second the actual value. Passing them swapped is confusing if the test is failing. Change-Id: I06f8f345d52c3743d10441aae6d8c943f9b49b41 Reviewed-on: https://gerrit.libreoffice.org/84635 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
Diffstat (limited to 'test/source')
-rw-r--r--test/source/sheet/xspreadsheets2.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/source/sheet/xspreadsheets2.cxx b/test/source/sheet/xspreadsheets2.cxx
index a65d68716c9a..fc7f1023fc1c 100644
--- a/test/source/sheet/xspreadsheets2.cxx
+++ b/test/source/sheet/xspreadsheets2.cxx
@@ -85,7 +85,7 @@ void XSpreadsheets2::testImportString()
uno::Reference< text::XTextRange > xDestTextRange(xDestCell, UNO_QUERY_THROW);
OUString aDestString = xDestTextRange->getString();
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong string imported", aDestString, aSrcString);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong string imported", aSrcString, aDestString);
}
void XSpreadsheets2::testImportValue()
@@ -119,7 +119,7 @@ void XSpreadsheets2::testImportFormulaBasicMath()
// potential problem later: formulas might be adjusted
// add some tests that the formulas are correctly adjusted
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong formula imported", aDestFormula, aSrcFormula);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong formula imported", aSrcFormula, aDestFormula);
}
void XSpreadsheets2::testImportFormulaWithNamedRange()
@@ -135,7 +135,7 @@ void XSpreadsheets2::testImportFormulaWithNamedRange()
uno::Reference< table::XCell > xDestCell = xDestSheet->getCellByPosition(3,0);
OUString aDestFormula = xDestCell->getFormula();
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong Namedrange formula imported", aDestFormula, aSrcFormula);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong Namedrange formula imported", aSrcFormula, aDestFormula);
}
void XSpreadsheets2::testImportOverExistingNamedRange()
@@ -157,7 +157,7 @@ void XSpreadsheets2::testImportOverExistingNamedRange()
OUString const aExpectedContent("$Sheet1.$B$1");
std::cout << "testImportSheet : initial1 aNrDestContent " << aNrDestContent << std::endl;
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong address for initial1", aNrDestContent, aExpectedContent);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong address for initial1", aExpectedContent, aNrDestContent);
}
@@ -182,7 +182,7 @@ void XSpreadsheets2::testImportNamedRangeDefinedInSource()
std::cout << "testImportSheet : InSheetRangeName content " << aNewInSheetNrDestContent << std::endl;
std::cout << "testImportSheet : InSheetRangeName expected " << aNewInSheetExpectedContent << std::endl;
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong address for InSheetRangeName", aNewInSheetNrDestContent, aNewInSheetExpectedContent);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong address for InSheetRangeName", aNewInSheetExpectedContent, aNewInSheetNrDestContent);
}
void XSpreadsheets2::testImportNamedRangeRedefinedInSource()
@@ -204,7 +204,7 @@ void XSpreadsheets2::testImportNamedRangeRedefinedInSource()
OUString aRedefinedInSheetNrDestContent = xDestRedefinedInSheetNamedRange->getContent();
OUString const aRedefinedInSheetExpectedContent("$Sheet1.$B$2");
std::cout << "testImportSheet : initial2 content " << aRedefinedInSheetNrDestContent << std::endl;
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong address for Redefined InSheet named range", aRedefinedInSheetNrDestContent, aRedefinedInSheetExpectedContent);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong address for Redefined InSheet named range", aRedefinedInSheetExpectedContent, aRedefinedInSheetNrDestContent);
}
void XSpreadsheets2::testImportNewNamedRange()
@@ -258,7 +258,7 @@ void XSpreadsheets2::testImportCellStyle()
OUString aDestStyleName;
CPPUNIT_ASSERT(xDestCellPropSet->getPropertyValue(aCellProperty) >>= aDestStyleName);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong imported Cell Style", aDestStyleName, aSrcStyleName);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong imported Cell Style", aSrcStyleName, aDestStyleName);
uno::Reference< style::XStyleFamiliesSupplier > xFamiliesSupplier (xDestDoc, UNO_QUERY_THROW);
uno::Reference< container::XNameAccess > xFamiliesNameAccess (xFamiliesSupplier->getStyleFamilies(), UNO_SET_THROW);
@@ -307,7 +307,7 @@ void XSpreadsheets2::importSheetToCopy()
uno::Reference< sheet::XSpreadsheets2 > xDestSheets (xDestDoc->getSheets(), UNO_QUERY_THROW);
sal_Int32 nDestPos = 0;
sal_Int32 nDestPosEffective = xDestSheets->importSheet(xDocument, gaSrcSheetName, nDestPos);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong sheet index", nDestPosEffective, nDestPos);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong sheet index", nDestPos, nDestPosEffective);
uno::Reference< container::XIndexAccess > xDestSheetIndexAccess (xDestDoc->getSheets(), UNO_QUERY_THROW);
xDestSheet.set( xDestSheetIndexAccess->getByIndex(nDestPosEffective), UNO_QUERY_THROW);