From a75799f3e904bd46cffd0bac78e3c0885ac5c447 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Fri, 5 Mar 2021 00:34:31 +0100 Subject: tdf#133260: move unittest to function test Change-Id: I602f83e1a5afd0ab05c35b848a32475cac3b21ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111982 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- .../unit/data/functions/mathematical/fods/sum.fods | 28 ++++++++++++++++++++++ sc/qa/unit/ucalc.hxx | 2 -- sc/qa/unit/ucalc_formula.cxx | 19 --------------- 3 files changed, 28 insertions(+), 21 deletions(-) (limited to 'sc/qa') diff --git a/sc/qa/unit/data/functions/mathematical/fods/sum.fods b/sc/qa/unit/data/functions/mathematical/fods/sum.fods index 1aec65bdebef..4f6ad1ccc61f 100644 --- a/sc/qa/unit/data/functions/mathematical/fods/sum.fods +++ b/sc/qa/unit/data/functions/mathematical/fods/sum.fods @@ -2101,6 +2101,34 @@ + + + 2 + + + 2 + + + PRAVDA + + + =SUM(ABS(MUNIT(2))) + + + + + 2 + + + 2 + + + PRAVDA + + + =SUM(ABS(MUNIT(2)*-1)) + + diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx index 8ee8d28868c3..9c9b381315ab 100644 --- a/sc/qa/unit/ucalc.hxx +++ b/sc/qa/unit/ucalc.hxx @@ -567,7 +567,6 @@ public: void testTdf97369(); void testTdf97587(); void testTdf93415(); - void testTdf133260(); void testTdf100818(); void testEmptyCalcDocDefaults(); @@ -878,7 +877,6 @@ public: CPPUNIT_TEST(testTdf97369); CPPUNIT_TEST(testTdf97587); CPPUNIT_TEST(testTdf93415); - CPPUNIT_TEST(testTdf133260); CPPUNIT_TEST(testTdf100818); CPPUNIT_TEST(testEmptyCalcDocDefaults); CPPUNIT_TEST(testPrecisionAsShown); diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx index 34325dd8d988..6ff96cfd4b89 100644 --- a/sc/qa/unit/ucalc_formula.cxx +++ b/sc/qa/unit/ucalc_formula.cxx @@ -8641,25 +8641,6 @@ void Test::testTdf93415() m_pDoc->DeleteTab(0); } -void Test::testTdf133260() -{ - CPPUNIT_ASSERT(m_pDoc->InsertTab (0, "Test")); - - ScAddress aPos1(0,0,0); - m_pDoc->SetString(aPos1, "=SUM(ABS(MUNIT(2)))"); - - ScAddress aPos2(0,1,0); - m_pDoc->SetString(aPos2, "=SUM(ABS(MUNIT(2)*-1))"); - - // Without the fix in place, this test would have failed with - // - Expected: 2 - // - Actual : 1 - CPPUNIT_ASSERT_EQUAL(2.0, m_pDoc->GetValue(aPos1)); - CPPUNIT_ASSERT_EQUAL(2.0, m_pDoc->GetValue(aPos2)); - - m_pDoc->DeleteTab(0); -} - void Test::testTdf100818() { CPPUNIT_ASSERT(m_pDoc->InsertTab (0, "Sheet1")); -- cgit