diff options
author | Eike Rathke <erack@redhat.com> | 2017-05-23 13:39:12 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-05-23 13:39:18 +0200 |
commit | 28ff25934ca1442a4a7f22f0d915ed7b782ca379 (patch) | |
tree | 812a39b9f57774d00611154a640b7c2cf84ecd24 /sc | |
parent | 5e974c89c8647040f796605aeae1322303532e58 (diff) |
Unit test for COUNTBLANK with array of references, tdf#58874
Change-Id: I44c4db675b822c0456197bf019783076cb7a4b78
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/ucalc_formula.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx index 620d94bc2e38..b5c5f9f85879 100644 --- a/sc/qa/unit/ucalc_formula.cxx +++ b/sc/qa/unit/ucalc_formula.cxx @@ -7994,6 +7994,18 @@ void Test::testFuncRefListArraySUBTOTAL() aPos.IncRow(); CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("SUBTOTAL STDEV for A1:A2,A4:A5,A5:A6 failed", 11.55422, m_pDoc->GetValue(aPos), 1e-5); + // Empty two cells such that they affect two ranges. + m_pDoc->SetString(0,1,0, ""); // A2 + m_pDoc->SetString(0,2,0, ""); // A3 + // Matrix in J7:J9, individual COUNTBLANK of A2:A3, A3:A4 and A4:A5 + m_pDoc->InsertMatrixFormula(9, 6, 9, 8, aMark, "=COUNTBLANK(OFFSET(A1;ROW(1:3);0;2))"); + aPos.Set(9,6,0); + CPPUNIT_ASSERT_EQUAL_MESSAGE("COUNTBLANK for A1:A2,A2:A3,A5:A6 failed", 2.0, m_pDoc->GetValue(aPos)); + aPos.IncRow(); + CPPUNIT_ASSERT_EQUAL_MESSAGE("COUNTBLANK for A1:A2,A3:A4,A5:A6 failed", 1.0, m_pDoc->GetValue(aPos)); + aPos.IncRow(); + CPPUNIT_ASSERT_EQUAL_MESSAGE("COUNTBLANK for A1:A2,A4:A5,A5:A6 failed", 0.0, m_pDoc->GetValue(aPos)); + m_pDoc->DeleteTab(0); } |