diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/subsequent_export_test.cxx | 4 | ||||
-rw-r--r-- | sc/qa/unit/subsequent_filters_test.cxx | 4 | ||||
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 28 | ||||
-rw-r--r-- | sc/qa/unit/ucalc_copypaste.cxx | 14 | ||||
-rw-r--r-- | sc/qa/unit/ucalc_sort.cxx | 20 |
5 files changed, 35 insertions, 35 deletions
diff --git a/sc/qa/unit/subsequent_export_test.cxx b/sc/qa/unit/subsequent_export_test.cxx index aefd1a8eda48..d5bade09b9fa 100644 --- a/sc/qa/unit/subsequent_export_test.cxx +++ b/sc/qa/unit/subsequent_export_test.cxx @@ -318,7 +318,7 @@ void ScExportTest::test() pDoc = getScDoc(); double aVal = pDoc->GetValue(0, 0, 0); - ASSERT_DOUBLES_EQUAL(aVal, 1.0); + ASSERT_DOUBLES_EQUAL(1.0, aVal); } void ScExportTest::testDefaultFontHeight() @@ -488,7 +488,7 @@ void ScExportTest::testPasswordExport() pDoc = getScDoc(); double aVal = pDoc->GetValue(0, 0, 0); - ASSERT_DOUBLES_EQUAL(aVal, 1.0); + ASSERT_DOUBLES_EQUAL(1.0, aVal); } } diff --git a/sc/qa/unit/subsequent_filters_test.cxx b/sc/qa/unit/subsequent_filters_test.cxx index 6af0460170be..52b0a1bf527e 100644 --- a/sc/qa/unit/subsequent_filters_test.cxx +++ b/sc/qa/unit/subsequent_filters_test.cxx @@ -3112,10 +3112,10 @@ void ScFiltersTest::testFormulaDependency() // check if formula in A1 changes value double nVal = pDoc->GetValue(0, 0, 0); - CPPUNIT_ASSERT_DOUBLES_EQUAL(nVal, 1.0, 1e-10); + CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, nVal, 1e-10); pDoc->SetValue(0, 1, 0, 0.0); nVal = pDoc->GetValue(0, 0, 0); - CPPUNIT_ASSERT_DOUBLES_EQUAL(nVal, 2.0, 1e-10); + CPPUNIT_ASSERT_DOUBLES_EQUAL(2.0, nVal, 1e-10); // check that the number format is implicitly inherited // CPPUNIT_ASSERT_EQUAL(pDoc->GetString(0,4,0), rDoc.GetString(0,5,0)); diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index b94ccf7526c2..8b78c55ae005 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -4207,42 +4207,42 @@ void Test::testUpdateReference() double aValue; aValue = m_pDoc->GetValue(2,0,2); - ASSERT_DOUBLES_EQUAL_MESSAGE("formula does not return correct result", aValue, 3); + ASSERT_DOUBLES_EQUAL_MESSAGE("formula does not return correct result", 3, aValue); aValue = m_pDoc->GetValue(2,1,2); - ASSERT_DOUBLES_EQUAL_MESSAGE("formula does not return correct result", aValue, 5); + ASSERT_DOUBLES_EQUAL_MESSAGE("formula does not return correct result", 5, aValue); //test deleting both sheets: one is not directly before the sheet, the other one is m_pDoc->DeleteTab(0); aValue = m_pDoc->GetValue(2,0,1); - ASSERT_DOUBLES_EQUAL_MESSAGE("after deleting first sheet formula does not return correct result", aValue, 3); + ASSERT_DOUBLES_EQUAL_MESSAGE("after deleting first sheet formula does not return correct result", 3, aValue); aValue = m_pDoc->GetValue(2,1,1); - ASSERT_DOUBLES_EQUAL_MESSAGE("after deleting first sheet formula does not return correct result", aValue, 5); + ASSERT_DOUBLES_EQUAL_MESSAGE("after deleting first sheet formula does not return correct result", 5, aValue); m_pDoc->DeleteTab(0); aValue = m_pDoc->GetValue(2,0,0); - ASSERT_DOUBLES_EQUAL_MESSAGE("after deleting second sheet formula does not return correct result", aValue, 3); + ASSERT_DOUBLES_EQUAL_MESSAGE("after deleting second sheet formula does not return correct result", 3, aValue); aValue = m_pDoc->GetValue(2,1,0); - ASSERT_DOUBLES_EQUAL_MESSAGE("after deleting second sheet formula does not return correct result", aValue, 5); + ASSERT_DOUBLES_EQUAL_MESSAGE("after deleting second sheet formula does not return correct result", 5, aValue); //test adding two sheets m_pDoc->InsertTab(0, "Sheet2"); aValue = m_pDoc->GetValue(2,0,1); - ASSERT_DOUBLES_EQUAL_MESSAGE("after inserting first sheet formula does not return correct result", aValue, 3); + ASSERT_DOUBLES_EQUAL_MESSAGE("after inserting first sheet formula does not return correct result", 3, aValue); aValue = m_pDoc->GetValue(2,1,1); - ASSERT_DOUBLES_EQUAL_MESSAGE("after inserting first sheet formula does not return correct result", aValue, 5); + ASSERT_DOUBLES_EQUAL_MESSAGE("after inserting first sheet formula does not return correct result", 5, aValue); m_pDoc->InsertTab(0, "Sheet1"); aValue = m_pDoc->GetValue(2,0,2); - ASSERT_DOUBLES_EQUAL_MESSAGE("after inserting second sheet formula does not return correct result", aValue, 3); + ASSERT_DOUBLES_EQUAL_MESSAGE("after inserting second sheet formula does not return correct result", 3, aValue); aValue = m_pDoc->GetValue(2,1,2); - ASSERT_DOUBLES_EQUAL_MESSAGE("after inserting second sheet formula does not return correct result", aValue, 5); + ASSERT_DOUBLES_EQUAL_MESSAGE("after inserting second sheet formula does not return correct result", 5, aValue); //test new DeleteTabs/InsertTabs methods m_pDoc->DeleteTabs(0, 2); aValue = m_pDoc->GetValue(2, 0, 0); - ASSERT_DOUBLES_EQUAL_MESSAGE("after deleting sheets formula does not return correct result", aValue, 3); + ASSERT_DOUBLES_EQUAL_MESSAGE("after deleting sheets formula does not return correct result", 3, aValue); aValue = m_pDoc->GetValue(2, 1, 0); - ASSERT_DOUBLES_EQUAL_MESSAGE("after deleting sheets formula does not return correct result", aValue, 5); + ASSERT_DOUBLES_EQUAL_MESSAGE("after deleting sheets formula does not return correct result", 5, aValue); std::vector<OUString> aSheets; aSheets.emplace_back("Sheet1"); @@ -4250,9 +4250,9 @@ void Test::testUpdateReference() m_pDoc->InsertTabs(0, aSheets, true); aValue = m_pDoc->GetValue(2, 0, 2); - ASSERT_DOUBLES_EQUAL_MESSAGE("after inserting sheets formula does not return correct result", aValue, 3); + ASSERT_DOUBLES_EQUAL_MESSAGE("after inserting sheets formula does not return correct result", 3, aValue); aValue = m_pDoc->GetValue(2, 1, 2); - ASSERT_DOUBLES_EQUAL_MESSAGE("after inserting sheets formula does not return correct result", aValue, 5); + ASSERT_DOUBLES_EQUAL_MESSAGE("after inserting sheets formula does not return correct result", 5, aValue); m_pDoc->DeleteTab(3); m_pDoc->DeleteTab(2); diff --git a/sc/qa/unit/ucalc_copypaste.cxx b/sc/qa/unit/ucalc_copypaste.cxx index b6062cb04c72..5db90a4daa21 100644 --- a/sc/qa/unit/ucalc_copypaste.cxx +++ b/sc/qa/unit/ucalc_copypaste.cxx @@ -482,7 +482,7 @@ void TestCopyPaste::testCopyPaste() m_pDoc->SetString(1, 0, 0, aFormulaString); double fValue = m_pDoc->GetValue(ScAddress(1, 0, 0)); - ASSERT_DOUBLES_EQUAL_MESSAGE("formula should return 11", fValue, 11); + ASSERT_DOUBLES_EQUAL_MESSAGE("formula should return 11", 11, fValue); // add notes to A1:C1 setNote(0, 0, 0, "Hello world in A1"); // empty cell content @@ -568,7 +568,7 @@ void TestCopyPaste::testCopyPaste() //check undo and redo pUndo->Undo(); fValue = m_pDoc->GetValue(ScAddress(1, 1, 1)); - ASSERT_DOUBLES_EQUAL_MESSAGE("after undo formula should return nothing", fValue, 0); + ASSERT_DOUBLES_EQUAL_MESSAGE("after undo formula should return nothing", 0, fValue); aString = m_pDoc->GetString(2, 1, 1); CPPUNIT_ASSERT_MESSAGE("after undo, string should be removed", aString.isEmpty()); CPPUNIT_ASSERT_MESSAGE("after undo, note on A2 should be removed", !m_pDoc->HasNote(0, 1, 1)); @@ -9961,7 +9961,7 @@ void TestCopyPaste::testMoveBlock() CPPUNIT_ASSERT_EQUAL_MESSAGE("Cell C1 should contain an updated formula", OUString("=B1+1"), aString); double fValue = m_pDoc->GetValue(aAddrB1); - ASSERT_DOUBLES_EQUAL_MESSAGE("Cell B1 should contain 1", fValue, 1); + ASSERT_DOUBLES_EQUAL_MESSAGE("Cell B1 should contain 1", 1, fValue); // cell notes has been moved 1 cell right (event when overlapping) CPPUNIT_ASSERT_MESSAGE("There should be NO note on A1", !m_pDoc->HasNote(aAddrA1)); @@ -10219,16 +10219,16 @@ void TestCopyPaste::testCopyPasteFormulas() m_pDoc->SetString(0, 4, 0, "=$Sheet2.A$1"); // to prevent ScEditableTester in ScDocFunc::MoveBlock - ASSERT_DOUBLES_EQUAL(m_pDoc->GetValue(0, 0, 0), 1.0); - ASSERT_DOUBLES_EQUAL(m_pDoc->GetValue(0, 1, 0), 1.0); + ASSERT_DOUBLES_EQUAL(1.0, m_pDoc->GetValue(0, 0, 0)); + ASSERT_DOUBLES_EQUAL(1.0, m_pDoc->GetValue(0, 1, 0)); ScDocFunc& rDocFunc = m_xDocShell->GetDocFunc(); bool bMoveDone = rDocFunc.MoveBlock(ScRange(0, 0, 0, 0, 4, 0), ScAddress(10, 10, 0), false, false, false, true); // check that moving was successful, mainly for editable tester CPPUNIT_ASSERT(bMoveDone); - ASSERT_DOUBLES_EQUAL(m_pDoc->GetValue(10, 10, 0), 1.0); - ASSERT_DOUBLES_EQUAL(m_pDoc->GetValue(10, 11, 0), 1.0); + ASSERT_DOUBLES_EQUAL(1.0, m_pDoc->GetValue(10, 10, 0)); + ASSERT_DOUBLES_EQUAL(1.0, m_pDoc->GetValue(10, 11, 0)); CPPUNIT_ASSERT_EQUAL(OUString("=COLUMN($A$1)"), m_pDoc->GetFormula(10, 10, 0)); CPPUNIT_ASSERT_EQUAL(OUString("=$A$1+L12"), m_pDoc->GetFormula(10, 11, 0)); CPPUNIT_ASSERT_EQUAL(OUString("=$Sheet2.K11"), m_pDoc->GetFormula(10, 12, 0)); diff --git a/sc/qa/unit/ucalc_sort.cxx b/sc/qa/unit/ucalc_sort.cxx index f71e0d663a59..2a046adb668f 100644 --- a/sc/qa/unit/ucalc_sort.cxx +++ b/sc/qa/unit/ucalc_sort.cxx @@ -121,7 +121,7 @@ void TestSort::testSort() m_pDoc->Sort(0, aSortData, false, true, nullptr, nullptr); double nVal = m_pDoc->GetValue(1,0,0); - ASSERT_DOUBLES_EQUAL(nVal, 1.0); + ASSERT_DOUBLES_EQUAL(1.0, nVal); // check that note is also moved after sorting pNote = m_pDoc->GetNote(1, 0, 0); @@ -1683,24 +1683,24 @@ void TestSort::testSortBroadcaster() // Enter new value and check that it is broadcasted. First in empty cell. m_pDoc->SetString(1,5,0, "16"); double nVal = m_pDoc->GetValue(1,7,0); - ASSERT_DOUBLES_EQUAL(nVal, 16.0); + ASSERT_DOUBLES_EQUAL(16.0, nVal); nVal = m_pDoc->GetValue(1,8,0); - ASSERT_DOUBLES_EQUAL(nVal, 16.0); + ASSERT_DOUBLES_EQUAL(16.0, nVal); nVal = m_pDoc->GetValue(1,9,0); - ASSERT_DOUBLES_EQUAL(nVal, 17.0); + ASSERT_DOUBLES_EQUAL(17.0, nVal); nVal = m_pDoc->GetValue(1,10,0); - ASSERT_DOUBLES_EQUAL(nVal, 17.0); + ASSERT_DOUBLES_EQUAL(17.0, nVal); // Enter new value and check that it is broadcasted. Now overwriting data. m_pDoc->SetString(0,5,0, "32"); nVal = m_pDoc->GetValue(0,7,0); - ASSERT_DOUBLES_EQUAL(nVal, 32.0); + ASSERT_DOUBLES_EQUAL(32.0, nVal); nVal = m_pDoc->GetValue(0,8,0); - ASSERT_DOUBLES_EQUAL(nVal, 32.0); + ASSERT_DOUBLES_EQUAL(32.0, nVal); nVal = m_pDoc->GetValue(0,9,0); - ASSERT_DOUBLES_EQUAL(nVal, 34.0); + ASSERT_DOUBLES_EQUAL(34.0, nVal); nVal = m_pDoc->GetValue(0,10,0); - ASSERT_DOUBLES_EQUAL(nVal, 34.0); + ASSERT_DOUBLES_EQUAL(34.0, nVal); } m_pDoc->DeleteTab(0); @@ -1973,7 +1973,7 @@ void TestSort::testSortImages() m_pDoc->Sort(0, aSortData, false, true, nullptr, nullptr); double nVal = m_pDoc->GetValue(0,0,0); - ASSERT_DOUBLES_EQUAL(nVal, 1.0); + ASSERT_DOUBLES_EQUAL(1.0, nVal); // check that note is also moved after sorting aCellPos = ScAddress(1, 0, 0); |