sc/qa/unit/ucalc_formula.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+)
New commits: commit 6e7e8af8ed2ee873a5c8a8b7b42fe3b99797be90 Author: Eike Rathke <[email protected]> Date: Thu Mar 3 13:31:19 2016 +0100 unit test for tdf#98297, exclude/include error values with COUNT/COUNTA Change-Id: I2cc7d6ebdcb9411060462d7afa704f9e100c6c5e diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx index ad40ccc..63aa7d9 100644 --- a/sc/qa/unit/ucalc_formula.cxx +++ b/sc/qa/unit/ucalc_formula.cxx @@ -3383,6 +3383,18 @@ void Test::testFuncCOUNT() m_pDoc->SetString(aPos, "=COUNT(A1:A3;2;4;6)"); CPPUNIT_ASSERT_EQUAL(6.0, m_pDoc->GetValue(aPos)); + // Matrix in C1. + ScMarkData aMark; + aMark.SelectOneTable(0); + m_pDoc->InsertMatrixFormula(2, 0, 2, 0, aMark, "=COUNT(SEARCH(\"a\";{\"a\";\"b\";\"a\"}))"); + // Check that the #VALUE! error of "a" not found in "b" is not counted. + CPPUNIT_ASSERT_EQUAL(2.0, m_pDoc->GetValue(ScAddress(2,0,0))); + + // Matrix in C3. + m_pDoc->InsertMatrixFormula(2, 2, 2, 2, aMark, "=COUNTA(SEARCH(\"a\";{\"a\";\"b\";\"a\"}))"); + // Check that the #VALUE! error of "a" not found in "b" is counted. + CPPUNIT_ASSERT_EQUAL(3.0, m_pDoc->GetValue(ScAddress(2,2,0))); + m_pDoc->DeleteTab(0); } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
