diff options
author | Eike Rathke <erack@redhat.com> | 2015-01-27 15:13:59 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-01-27 15:16:36 +0100 |
commit | e5eb67781e352b5c13494f1ea1e39ea3a4dc0629 (patch) | |
tree | 744cf9a937c64112e7afe4cc6b641014738c24dd /sc/qa | |
parent | b435ca9e6f826704314f8a437c352aa799767bd4 (diff) |
add unit test for tdf#88786
Change-Id: I0cb533399a1e3ce83875f2966cb59354e92f05b5
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/unit/ucalc_formula.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx index ab23102a83f8..ca731a232bb5 100644 --- a/sc/qa/unit/ucalc_formula.cxx +++ b/sc/qa/unit/ucalc_formula.cxx @@ -4867,6 +4867,20 @@ void Test::testMatrixOp() nVal = m_pDoc->GetValue(2, 1, 0); CPPUNIT_ASSERT_EQUAL(4.0, nVal); + m_pDoc->SetString(4, 0, 0, "=SUMPRODUCT({1;2;4}+8)"); + m_pDoc->SetString(4, 1, 0, "=SUMPRODUCT(8+{1;2;4})"); + m_pDoc->SetString(4, 2, 0, "=SUMPRODUCT({1;2;4}-8)"); + m_pDoc->SetString(4, 3, 0, "=SUMPRODUCT(8-{1;2;4})"); + m_pDoc->SetString(4, 4, 0, "=SUMPRODUCT({1;2;4}+{8;16;32})"); + m_pDoc->SetString(4, 5, 0, "=SUMPRODUCT({8;16;32}+{1;2;4})"); + m_pDoc->SetString(4, 6, 0, "=SUMPRODUCT({1;2;4}-{8;16;32})"); + m_pDoc->SetString(4, 7, 0, "=SUMPRODUCT({8;16;32}-{1;2;4})"); + double fResult[8] = { 31.0, 31.0, -17.0, 17.0, 63.0, 63.0, -49.0, 49.0 }; + for (size_t i = 0; i < SAL_N_ELEMENTS(fResult); ++i) + { + CPPUNIT_ASSERT_EQUAL( fResult[i], m_pDoc->GetValue(4, i, 0)); + } + m_pDoc->DeleteTab(0); } |