sc/qa/unit/ucalc.hxx | 2 ++ sc/qa/unit/ucalc_formula.cxx | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+)
New commits: commit 7ca9a8e9cfbf5d38ac37b74198325493f9236554 Author: Åukasz Hryniuk <lukasz.hryn...@wp.pl> Date: Mon Aug 10 17:14:31 2015 +0200 Test with a bug in ScInterpreter::FTest() Change-Id: If6874f3ccefed4e1e6e43479cd5fdd6f4c7d341c Reviewed-on: https://gerrit.libreoffice.org/17629 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Eike Rathke <er...@redhat.com> Tested-by: Eike Rathke <er...@redhat.com> diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx index 3e03b5f..4bfd789 100644 --- a/sc/qa/unit/ucalc.hxx +++ b/sc/qa/unit/ucalc.hxx @@ -185,6 +185,7 @@ public: void testFuncFORMULA(); void testFuncTableRef(); void testFuncFTEST(); + void testFuncFTESTBug(); void testExternalRef(); void testExternalRefFunctions(); @@ -516,6 +517,7 @@ public: CPPUNIT_TEST(testFuncFORMULA); CPPUNIT_TEST(testFuncTableRef); CPPUNIT_TEST(testFuncFTEST); + CPPUNIT_TEST_FAIL(testFuncFTESTBug); CPPUNIT_TEST(testExternalRef); CPPUNIT_TEST(testExternalRefFunctions); CPPUNIT_TEST(testCopyToDocument); diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx index 5b6d402..c6f4acd 100644 --- a/sc/qa/unit/ucalc_formula.cxx +++ b/sc/qa/unit/ucalc_formula.cxx @@ -5576,4 +5576,24 @@ void Test::testFuncFTEST() m_pDoc->DeleteTab(0); } +void Test::testFuncFTESTBug() +{ + sc::AutoCalcSwitch aACSwitch(*m_pDoc, true); // turn auto calc on. + + m_pDoc->InsertTab(0, "FTest"); + + ScAddress aPos(9,0,0); + m_pDoc->SetString(aPos, "=FTEST(H1:H3;I1:I3)"); + + m_pDoc->SetValue(7, 0, 0, 9.0); // H1 + m_pDoc->SetValue(7, 1, 0, 8.0); // H2 + m_pDoc->SetValue(7, 2, 0, 6.0); // H3 + m_pDoc->SetValue(8, 0, 0, 5.0); // I1 + m_pDoc->SetValue(8, 1, 0, 7.0); // I2 + // FTest returns a wrong value: 1.09544512 + CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Calculation of FTEST failed", 0.9046, m_pDoc->GetValue(aPos), 10e-4); + + m_pDoc->DeleteTab(0); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits