summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2014-06-13 18:53:35 +0200
committerEike Rathke <erack@redhat.com>2014-06-13 18:57:34 +0200
commit5a320d1ae20b58e839bb9f8a7deef0c837d0cce5 (patch)
treee92ea84f7015d103c0fc6b654c1b209a0dce651d
parent66d40a1fcc554e528f89e1732c26ff587cfd4bd1 (diff)
unit test for ForcedArray matrix error propagation, fdo#79978
Change-Id: Ie57d1104785bd2c4f090c9872d93d4f82dc6b2d1
-rw-r--r--sc/qa/unit/ucalc_formula.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index b1ef5614d9c1..95836004bda9 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -2563,6 +2563,11 @@ void Test::testFuncSUMPRODUCT()
m_pDoc->SetValue(ScAddress(1,2,0), 5.0); // B3
CPPUNIT_ASSERT_EQUAL(-3.0, m_pDoc->GetValue(aPos));
+ // Force an error in C2 and test ForcedArray matrix error propagation.
+ m_pDoc->SetString( 2, 1, 0, "=1/0");
+ sal_uInt16 nError = m_pDoc->GetErrCode(aPos);
+ CPPUNIT_ASSERT_MESSAGE("Formula result should be a propagated error", nError);
+
m_pDoc->DeleteTab(0);
}