diff options
author | Eike Rathke <erack@redhat.com> | 2017-05-22 16:57:36 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-05-22 16:57:41 +0200 |
commit | a21f1c11aacde31fa190859828f257544afea818 (patch) | |
tree | 277806e5356f53531756f21e0973d390f560c20c | |
parent | fda09a666dd22aa6b2a9abfb25f7c97a3ab910fe (diff) |
Unit test for SUBTOTAL STDEV with array of references, tdf#58874
Change-Id: I27d8a0a3c03012a4575785feb32df11a76d6fcdb
-rw-r--r-- | sc/qa/unit/ucalc_formula.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx index 69f3a47962c1..da0dc34cec2c 100644 --- a/sc/qa/unit/ucalc_formula.cxx +++ b/sc/qa/unit/ucalc_formula.cxx @@ -7955,6 +7955,15 @@ void Test::testFuncRefListArraySUBTOTAL() aPos.IncRow(); CPPUNIT_ASSERT_EQUAL_MESSAGE("SUBTOTAL MAX for A4:A5 failed", 16.0, m_pDoc->GetValue(aPos)); + // Matrix in F7:F9, individual STDEV of A2:A3, A3:A4 and A4:A5 + m_pDoc->InsertMatrixFormula(5, 6, 5, 8, aMark, "=SUBTOTAL(7;OFFSET(A1;ROW(1:3);0;2))"); + aPos.Set(5,6,0); + CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("SUBTOTAL STDEV for A2:A3 failed", 1.414214, m_pDoc->GetValue(aPos), 1e-6); + aPos.IncRow(); + CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("SUBTOTAL STDEV for A3:A4 failed", 2.828427, m_pDoc->GetValue(aPos), 1e-6); + aPos.IncRow(); + CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("SUBTOTAL STDEV for A4:A5 failed", 5.656854, m_pDoc->GetValue(aPos), 1e-6); + m_pDoc->DeleteTab(0); } |