summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-05-31 13:20:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-06-01 09:14:25 +0200
commit23b08449736ba825a9c582ba18b7a5fdba178e47 (patch)
tree8513c824f1964f84f957a41658f6d173a008c469 /sc
parent8e63d451b2aeb646ece98c4e219f92957f4482bd (diff)
loplugin: look for CPPUNIT_ASSERT_EQUALS with params swapped
idea originally from either tml or moggi, can't remember which Change-Id: Id78d75035036d3aa1666e33469c6eeb38f9e624d Reviewed-on: https://gerrit.libreoffice.org/55126 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/filters-test.cxx2
-rw-r--r--sc/qa/unit/helper/shared_test_impl.hxx6
-rw-r--r--sc/qa/unit/rangelst_test.cxx6
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx30
-rw-r--r--sc/qa/unit/tiledrendering/tiledrendering.cxx4
-rw-r--r--sc/qa/unit/ucalc.cxx34
-rw-r--r--sc/qa/unit/ucalc_condformat.cxx2
7 files changed, 42 insertions, 42 deletions
diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx
index 2a0afb4323aa..616d11f7d845 100644
--- a/sc/qa/unit/filters-test.cxx
+++ b/sc/qa/unit/filters-test.cxx
@@ -243,7 +243,7 @@ void testContentImpl(ScDocument& rDoc, sal_Int32 nFormat ) //same code for ods,
ScAddress aAddress(7, 2, 0);
ScPostIt* pNote = rDoc.GetNote(aAddress);
CPPUNIT_ASSERT_MESSAGE("note not imported", pNote);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("note text not imported correctly", pNote->GetText(), OUString("Test"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("note text not imported correctly", OUString("Test"), pNote->GetText() );
}
//add additional checks here
diff --git a/sc/qa/unit/helper/shared_test_impl.hxx b/sc/qa/unit/helper/shared_test_impl.hxx
index 344e932b0695..114f2571f610 100644
--- a/sc/qa/unit/helper/shared_test_impl.hxx
+++ b/sc/qa/unit/helper/shared_test_impl.hxx
@@ -64,7 +64,7 @@ void testDataBar_Impl(const ScDocument& rDoc)
CPPUNIT_ASSERT_EQUAL(size_t(1), (*itr)->size());
const ScFormatEntry* pFormatEntry = (*itr)->GetEntry(0);
- CPPUNIT_ASSERT_EQUAL(pFormatEntry->GetType(), ScFormatEntry::Type::Databar);
+ CPPUNIT_ASSERT_EQUAL(ScFormatEntry::Type::Databar, pFormatEntry->GetType());
const ScDataBarFormat* pDataBar = static_cast<const ScDataBarFormat*>(pFormatEntry);
CPPUNIT_ASSERT(pDataBar);
const ScDataBarFormatData* pDataBarData = pDataBar->GetDataBarData();
@@ -101,7 +101,7 @@ void testColorScale2Entry_Impl(const ScDocument& rDoc)
CPPUNIT_ASSERT_EQUAL(size_t(1), (*itr)->size());
const ScFormatEntry* pFormatEntry = (*itr)->GetEntry(0);
- CPPUNIT_ASSERT_EQUAL(pFormatEntry->GetType(), ScFormatEntry::Type::Colorscale);
+ CPPUNIT_ASSERT_EQUAL(ScFormatEntry::Type::Colorscale, pFormatEntry->GetType());
const ScColorScaleFormat* pColFormat = static_cast<const ScColorScaleFormat*>(pFormatEntry);
CPPUNIT_ASSERT_EQUAL(size_t(2), pColFormat->size());
@@ -140,7 +140,7 @@ void testColorScale3Entry_Impl(const ScDocument& rDoc)
CPPUNIT_ASSERT_EQUAL(size_t(1), (*itr)->size());
const ScFormatEntry* pFormatEntry = (*itr)->GetEntry(0);
- CPPUNIT_ASSERT_EQUAL(pFormatEntry->GetType(), ScFormatEntry::Type::Colorscale);
+ CPPUNIT_ASSERT_EQUAL(ScFormatEntry::Type::Colorscale, pFormatEntry->GetType());
const ScColorScaleFormat* pColFormat = static_cast<const ScColorScaleFormat*>(pFormatEntry);
CPPUNIT_ASSERT_EQUAL(size_t(3), pColFormat->size());
diff --git a/sc/qa/unit/rangelst_test.cxx b/sc/qa/unit/rangelst_test.cxx
index 0858f7a358af..01e815aed24b 100644
--- a/sc/qa/unit/rangelst_test.cxx
+++ b/sc/qa/unit/rangelst_test.cxx
@@ -115,7 +115,7 @@ void Test::testDeleteArea_4Ranges()
ScRangeList aList(ScRange(0,0,0,5,5,0));
aList.DeleteArea(2,2,0,3,3,0);
- CPPUNIT_ASSERT_EQUAL(aList.size(), static_cast<size_t>(4));
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(4), aList.size());
for(SCCOL nCol = 0; nCol <= 5; ++nCol)
{
for(SCROW nRow = 0; nRow <= 5; ++nRow)
@@ -236,8 +236,8 @@ void Test::testDeleteArea_2Ranges()
aList.DeleteArea(4,4,0,6,7,0);
aList2.DeleteArea(4,4,0,6,7,0);
- CPPUNIT_ASSERT_EQUAL(aList.size(), static_cast<size_t>(2));
- CPPUNIT_ASSERT_EQUAL(aList2.size(), static_cast<size_t>(2));
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), aList.size());
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), aList2.size());
for(SCCOL nCol = 0; nCol <= 5; ++nCol)
{
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 2e876434ce49..6aa41875f61c 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -698,13 +698,13 @@ void ScFiltersTest::testCachedFormulaResultsODS()
aIsErrorFormula.append(")");
OUString aFormula = aIsErrorFormula.makeStringAndClear();
rDoc.SetString(nCol, nRow + 2, 2, aFormula);
- CPPUNIT_ASSERT_EQUAL_MESSAGE(OUStringToOString(aFormula, RTL_TEXTENCODING_UTF8).getStr(), rDoc.GetString(nCol, nRow +2, 2), OUString("TRUE"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(OUStringToOString(aFormula, RTL_TEXTENCODING_UTF8).getStr(), OUString("TRUE"), rDoc.GetString(nCol, nRow +2, 2));
OUStringBuffer aIsTextFormula("=ISTEXT(");
aIsTextFormula.append(static_cast<char>('A'+nCol)).append(OUString::number(nRow));
aIsTextFormula.append(")");
rDoc.SetString(nCol, nRow + 4, 2, aIsTextFormula.makeStringAndClear());
- CPPUNIT_ASSERT_EQUAL_MESSAGE("", rDoc.GetString(nCol, nRow +4, 2), OUString("FALSE"));
+ CPPUNIT_ASSERT_EQUAL(OUString("FALSE"), rDoc.GetString(nCol, nRow +4, 2));
}
}
@@ -2178,7 +2178,7 @@ void ScFiltersTest::testCondFormatThemeColorXLSX()
ScConditionalFormat* pFormat = rDoc.GetCondFormat(0, 0, 0);
const ScFormatEntry* pEntry = pFormat->GetEntry(0);
CPPUNIT_ASSERT(pEntry);
- CPPUNIT_ASSERT_EQUAL(pEntry->GetType(), ScFormatEntry::Type::Databar);
+ CPPUNIT_ASSERT_EQUAL(ScFormatEntry::Type::Databar, pEntry->GetType());
const ScDataBarFormat* pDataBar = static_cast<const ScDataBarFormat*>(pEntry);
const ScDataBarFormatData* pDataBarFormatData = pDataBar->GetDataBarData();
@@ -2192,7 +2192,7 @@ void ScFiltersTest::testCondFormatThemeColorXLSX()
CPPUNIT_ASSERT_EQUAL(size_t(1), pFormat->size());
pEntry = pFormat->GetEntry(0);
CPPUNIT_ASSERT(pEntry);
- CPPUNIT_ASSERT_EQUAL(pEntry->GetType(), ScFormatEntry::Type::Colorscale);
+ CPPUNIT_ASSERT_EQUAL(ScFormatEntry::Type::Colorscale, pEntry->GetType());
const ScColorScaleFormat* pColorScale = static_cast<const ScColorScaleFormat*>(pEntry);
CPPUNIT_ASSERT_EQUAL(size_t(2), pColorScale->size());
const ScColorScaleEntry* pColorScaleEntry = pColorScale->GetEntry(0);
@@ -2217,7 +2217,7 @@ void ScFiltersTest::testCondFormatThemeColor2XLSX()
CPPUNIT_ASSERT(pFormat);
const ScFormatEntry* pEntry = pFormat->GetEntry(0);
CPPUNIT_ASSERT(pEntry);
- CPPUNIT_ASSERT_EQUAL(pEntry->GetType(), ScFormatEntry::Type::Databar);
+ CPPUNIT_ASSERT_EQUAL(ScFormatEntry::Type::Databar, pEntry->GetType());
const ScDataBarFormat* pDataBar = static_cast<const ScDataBarFormat*>(pEntry);
const ScDataBarFormatData* pDataBarFormatData = pDataBar->GetDataBarData();
@@ -2236,7 +2236,7 @@ void checkDatabarPositiveColor(const ScConditionalFormat* pFormat, const Color&
CPPUNIT_ASSERT(pFormat);
const ScFormatEntry* pEntry = pFormat->GetEntry(0);
CPPUNIT_ASSERT(pEntry);
- CPPUNIT_ASSERT_EQUAL(pEntry->GetType(), ScFormatEntry::Type::Databar);
+ CPPUNIT_ASSERT_EQUAL(ScFormatEntry::Type::Databar, pEntry->GetType());
const ScDataBarFormat* pDataBar = static_cast<const ScDataBarFormat*>(pEntry);
const ScDataBarFormatData* pDataBarFormatData = pDataBar->GetDataBarData();
@@ -2256,7 +2256,7 @@ void ScFiltersTest::testCondFormatThemeColor3XLSX()
CPPUNIT_ASSERT(pFormat);
const ScFormatEntry* pEntry = pFormat->GetEntry(0);
CPPUNIT_ASSERT(pEntry);
- CPPUNIT_ASSERT_EQUAL(pEntry->GetType(), ScFormatEntry::Type::Colorscale);
+ CPPUNIT_ASSERT_EQUAL(ScFormatEntry::Type::Colorscale, pEntry->GetType());
const ScColorScaleFormat* pColorScale = static_cast<const ScColorScaleFormat*>(pEntry);
CPPUNIT_ASSERT_EQUAL(size_t(2), pColorScale->size());
@@ -2425,10 +2425,10 @@ void ScFiltersTest::testOrcusODSStyleInterface()
CPPUNIT_ASSERT_EQUAL(Color(255, 204, 18), pBoxItem->GetRight()->GetColor());
CPPUNIT_ASSERT_EQUAL(Color(255, 204, 18), pBoxItem->GetTop()->GetColor());
CPPUNIT_ASSERT_EQUAL(Color(255, 204, 18), pBoxItem->GetBottom()->GetColor());
- CPPUNIT_ASSERT_EQUAL(pBoxItem->GetLeft()->GetBorderLineStyle(), SvxBorderLineStyle::DOTTED);
- CPPUNIT_ASSERT_EQUAL(pBoxItem->GetRight()->GetBorderLineStyle(), SvxBorderLineStyle::DOTTED);
- CPPUNIT_ASSERT_EQUAL(pBoxItem->GetTop()->GetBorderLineStyle(), SvxBorderLineStyle::DOTTED);
- CPPUNIT_ASSERT_EQUAL(pBoxItem->GetBottom()->GetBorderLineStyle(), SvxBorderLineStyle::DOTTED);
+ CPPUNIT_ASSERT_EQUAL(SvxBorderLineStyle::DOTTED, pBoxItem->GetLeft()->GetBorderLineStyle());
+ CPPUNIT_ASSERT_EQUAL(SvxBorderLineStyle::DOTTED, pBoxItem->GetRight()->GetBorderLineStyle());
+ CPPUNIT_ASSERT_EQUAL(SvxBorderLineStyle::DOTTED, pBoxItem->GetTop()->GetBorderLineStyle());
+ CPPUNIT_ASSERT_EQUAL(SvxBorderLineStyle::DOTTED, pBoxItem->GetBottom()->GetBorderLineStyle());
ASSERT_DOUBLES_EQUAL_MESSAGE("Error with left width", 1, pBoxItem->GetLeft()->GetWidth());
ASSERT_DOUBLES_EQUAL_MESSAGE("Error with right width", 1, pBoxItem->GetRight()->GetWidth());
ASSERT_DOUBLES_EQUAL_MESSAGE("Error with top width", 1, pBoxItem->GetTop()->GetWidth());
@@ -2452,8 +2452,8 @@ void ScFiltersTest::testOrcusODSStyleInterface()
pBoxItem = static_cast<const SvxBoxItem*>(pItem);
CPPUNIT_ASSERT_EQUAL(Color(0, 0, 0), pBoxItem->GetLeft()->GetColor());
CPPUNIT_ASSERT_EQUAL(Color(255, 0, 0), pBoxItem->GetRight()->GetColor());
- CPPUNIT_ASSERT_EQUAL(pBoxItem->GetLeft()->GetBorderLineStyle(), SvxBorderLineStyle::SOLID);
- CPPUNIT_ASSERT_EQUAL(pBoxItem->GetRight()->GetBorderLineStyle(), SvxBorderLineStyle::DOTTED);
+ CPPUNIT_ASSERT_EQUAL(SvxBorderLineStyle::SOLID, pBoxItem->GetLeft()->GetBorderLineStyle());
+ CPPUNIT_ASSERT_EQUAL(SvxBorderLineStyle::DOTTED, pBoxItem->GetRight()->GetBorderLineStyle());
ASSERT_DOUBLES_EQUAL_MESSAGE("Error with left width", 0, pBoxItem->GetLeft()->GetWidth());
ASSERT_DOUBLES_EQUAL_MESSAGE("Error with right width", 14, pBoxItem->GetRight()->GetWidth());
@@ -2462,7 +2462,7 @@ void ScFiltersTest::testOrcusODSStyleInterface()
const SvxLineItem* pTLBR= static_cast<const SvxLineItem*>(pItem);
CPPUNIT_ASSERT_EQUAL(Color(18, 0, 0), pTLBR->GetLine()->GetColor());
- CPPUNIT_ASSERT_EQUAL(pTLBR->GetLine()->GetBorderLineStyle(), SvxBorderLineStyle::DASH_DOT);
+ CPPUNIT_ASSERT_EQUAL(SvxBorderLineStyle::DASH_DOT, pTLBR->GetLine()->GetBorderLineStyle());
ASSERT_DOUBLES_EQUAL_MESSAGE("Error with diagonal tl-br width", 14, pTLBR->GetLine()->GetWidth());
CPPUNIT_ASSERT_MESSAGE("Style Name2 : Doesn't have Attribute diagonal(bl-tr) border, but it should have.",
@@ -2470,7 +2470,7 @@ void ScFiltersTest::testOrcusODSStyleInterface()
const SvxLineItem* pBLTR= static_cast<const SvxLineItem*>(pItem);
CPPUNIT_ASSERT_EQUAL(Color(255, 204, 238), pBLTR->GetLine()->GetColor());
- CPPUNIT_ASSERT_EQUAL(pBLTR->GetLine()->GetBorderLineStyle(), SvxBorderLineStyle::DASHED);
+ CPPUNIT_ASSERT_EQUAL(SvxBorderLineStyle::DASHED, pBLTR->GetLine()->GetBorderLineStyle());
ASSERT_DOUBLES_EQUAL_MESSAGE("Error with diagonal tl-br width", 34, pBLTR->GetLine()->GetWidth());
CPPUNIT_ASSERT_MESSAGE("Style Name2 : Has Attribute background, but it shouldn't.",
diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 84c8ed3b7ed0..725561df1e16 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -388,13 +388,13 @@ void ScTiledRenderingTest::testDocumentSize()
pViewShell->SetCursor(100, 0);
// 2 seconds
osl::Condition::Result aResult = m_aDocSizeCondition.wait(std::chrono::seconds(2));
- CPPUNIT_ASSERT_EQUAL(aResult, osl::Condition::result_ok);
+ CPPUNIT_ASSERT_EQUAL(osl::Condition::result_ok, aResult);
// Set cursor row
pViewShell->SetCursor(0, 100);
// 2 seconds
aResult = m_aDocSizeCondition.wait(std::chrono::seconds(2));
- CPPUNIT_ASSERT_EQUAL(aResult, osl::Condition::result_ok);
+ CPPUNIT_ASSERT_EQUAL(osl::Condition::result_ok, aResult);
comphelper::LibreOfficeKit::setActive(false);
}
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 3eff3f0dac9a..088fef9fa036 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -4648,7 +4648,7 @@ void Test::testJumpToPrecedentsDependents()
ScRangeList aRange(aC2);
rDocFunc.DetectiveCollectAllPreds(aRange, aRefTokens);
CPPUNIT_ASSERT_EQUAL_MESSAGE("there should only be one reference token.",
- aRefTokens.size(), static_cast<size_t>(1));
+ static_cast<size_t>(1), aRefTokens.size());
CPPUNIT_ASSERT_MESSAGE("A1 should be a precedent of C1.",
hasRange(aRefTokens, ScRange(0, 0, 0), aC2));
}
@@ -4718,9 +4718,9 @@ void Test::testAutoFill()
m_pDoc->SetString( 0, 100, 0, "January" );
m_pDoc->Fill( 0, 100, 0, 100, nullptr, aMarkData, 2, FILL_TO_BOTTOM, FILL_AUTO );
OUString aTestValue = m_pDoc->GetString( 0, 101, 0 );
- CPPUNIT_ASSERT_EQUAL( aTestValue, OUString("February") );
+ CPPUNIT_ASSERT_EQUAL( OUString("February"), aTestValue );
aTestValue = m_pDoc->GetString( 0, 102, 0 );
- CPPUNIT_ASSERT_EQUAL( aTestValue, OUString("March") );
+ CPPUNIT_ASSERT_EQUAL( OUString("March"), aTestValue );
// test that two same user data list entries will not result in incremental fill
m_pDoc->SetString( 0, 101, 0, "January" );
@@ -4728,7 +4728,7 @@ void Test::testAutoFill()
for ( SCROW i = 102; i <= 103; ++i )
{
aTestValue = m_pDoc->GetString( 0, i, 0 );
- CPPUNIT_ASSERT_EQUAL( aTestValue, OUString("January") );
+ CPPUNIT_ASSERT_EQUAL( OUString("January"), aTestValue );
}
// Clear column A for a new test.
@@ -4837,15 +4837,15 @@ void Test::testCopyPasteFormulas()
ASSERT_DOUBLES_EQUAL(m_pDoc->GetValue(10,11,0), 1.0);
OUString aFormula;
m_pDoc->GetFormula(10,10,0, aFormula);
- CPPUNIT_ASSERT_EQUAL(aFormula, OUString("=COLUMN($A$1)"));
+ CPPUNIT_ASSERT_EQUAL(OUString("=COLUMN($A$1)"), aFormula);
m_pDoc->GetFormula(10,11,0, aFormula);
- CPPUNIT_ASSERT_EQUAL(aFormula, OUString("=$A$1+L12"));
+ CPPUNIT_ASSERT_EQUAL(OUString("=$A$1+L12"), aFormula);
m_pDoc->GetFormula(10,12,0, aFormula);
- CPPUNIT_ASSERT_EQUAL(aFormula, OUString("=$Sheet2.K11"));
+ CPPUNIT_ASSERT_EQUAL(OUString("=$Sheet2.K11"), aFormula);
m_pDoc->GetFormula(10,13,0, aFormula);
- CPPUNIT_ASSERT_EQUAL(aFormula, OUString("=$Sheet2.$A$1"));
+ CPPUNIT_ASSERT_EQUAL(OUString("=$Sheet2.$A$1"), aFormula);
m_pDoc->GetFormula(10,14,0, aFormula);
- CPPUNIT_ASSERT_EQUAL(aFormula, OUString("=$Sheet2.K$1"));
+ CPPUNIT_ASSERT_EQUAL(OUString("=$Sheet2.K$1"), aFormula);
}
void Test::testCopyPasteFormulasExternalDoc()
@@ -4894,19 +4894,19 @@ void Test::testCopyPasteFormulasExternalDoc()
OUString aFormula;
rExtDoc.GetFormula(1,1,1, aFormula);
//adjust absolute refs pointing to the copy area
- CPPUNIT_ASSERT_EQUAL(aFormula, OUString("=COLUMN($B$2)"));
+ CPPUNIT_ASSERT_EQUAL(OUString("=COLUMN($B$2)"), aFormula);
rExtDoc.GetFormula(1,2,1, aFormula);
//adjust absolute refs and keep relative refs
- CPPUNIT_ASSERT_EQUAL(aFormula, OUString("=$B$2+C3"));
+ CPPUNIT_ASSERT_EQUAL(OUString("=$B$2+C3"), aFormula);
rExtDoc.GetFormula(1,3,1, aFormula);
// make absolute sheet refs external refs
- CPPUNIT_ASSERT_EQUAL(aFormula, OUString("='file:///source.fake'#$Sheet2.B2"));
+ CPPUNIT_ASSERT_EQUAL(OUString("='file:///source.fake'#$Sheet2.B2"), aFormula);
rExtDoc.GetFormula(1,4,1, aFormula);
- CPPUNIT_ASSERT_EQUAL(aFormula, OUString("='file:///source.fake'#$Sheet2.$A$1"));
+ CPPUNIT_ASSERT_EQUAL(OUString("='file:///source.fake'#$Sheet2.$A$1"), aFormula);
rExtDoc.GetFormula(1,5,1, aFormula);
- CPPUNIT_ASSERT_EQUAL(aFormula, OUString("='file:///source.fake'#$Sheet2.B$1"));
+ CPPUNIT_ASSERT_EQUAL(OUString("='file:///source.fake'#$Sheet2.B$1"), aFormula);
rExtDoc.GetFormula(1,6,1, aFormula);
- CPPUNIT_ASSERT_EQUAL(aFormula, OUString("=$ExtSheet2.$B$2"));
+ CPPUNIT_ASSERT_EQUAL(OUString("=$ExtSheet2.$B$2"), aFormula);
xExtDocSh->DoClose();
}
@@ -4949,7 +4949,7 @@ void Test::testCopyPasteReferencesExternalDoc()
OUString aFormula;
rExtDoc.GetFormula(0,3,0, aFormula);
//adjust absolute refs pointing to the copy area
- CPPUNIT_ASSERT_EQUAL(aFormula, OUString("=SUM('file:///source.fake'#$Sheet1.A#REF!:A3)"));
+ CPPUNIT_ASSERT_EQUAL(OUString("=SUM('file:///source.fake'#$Sheet1.A#REF!:A3)"), aFormula);
xExtDocSh->DoClose();
}
@@ -6748,7 +6748,7 @@ void Test::checkPrecisionAsShown( OUString& rCode, double fValue, double fExpect
sal_Int32 nCheckPos = 0;
SvNumFormatType nType;
pFormatter->PutEntry( rCode, nCheckPos, nType, nFormat );
- CPPUNIT_ASSERT_EQUAL( nCheckPos, sal_Int32(0) );
+ CPPUNIT_ASSERT_EQUAL( sal_Int32(0), nCheckPos );
}
double fRoundValue = m_pDoc->RoundValueAsShown( fValue, nFormat );
rtl::OString aMessage = "Format \"";
diff --git a/sc/qa/unit/ucalc_condformat.cxx b/sc/qa/unit/ucalc_condformat.cxx
index b3d755f3a7c2..b2febe4ec136 100644
--- a/sc/qa/unit/ucalc_condformat.cxx
+++ b/sc/qa/unit/ucalc_condformat.cxx
@@ -112,7 +112,7 @@ void Test::testCondFormatINSDEL()
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"));
+ CPPUNIT_ASSERT_EQUAL(OUString("D2"), aExpr);
m_pDoc->DeleteTab(0);
}