Kaydet (Commit) 311b5b69 authored tarafından Eike Rathke's avatar Eike Rathke

unit test for tdf#95670

Change-Id: I5874a7fea97311b0e69dbeae8923517a08b63c9a
üst 49257e1d
...@@ -3431,6 +3431,14 @@ void Test::testFuncSUMPRODUCT() ...@@ -3431,6 +3431,14 @@ void Test::testFuncSUMPRODUCT()
sal_uInt16 nError = m_pDoc->GetErrCode(aPos); sal_uInt16 nError = m_pDoc->GetErrCode(aPos);
CPPUNIT_ASSERT_MESSAGE("Formula result should be a propagated error", nError); CPPUNIT_ASSERT_MESSAGE("Formula result should be a propagated error", nError);
// Test ForceArray propagation of SUMPRODUCT parameters to ABS and + operator.
// => ABS({-3,4})*({-3,4}+{-3,4}) => {3,4}*{-6,8} => {-18,32} => 14
m_pDoc->SetValue(ScAddress(4,0,0), -3.0); // E1
m_pDoc->SetValue(ScAddress(4,1,0), 4.0); // E2
// Non-intersecting formula in F3.
m_pDoc->SetString(ScAddress(5,2,0), "=SUMPRODUCT(ABS(E1:E2);E1:E2+E1:E2)");
CPPUNIT_ASSERT_EQUAL(14.0, m_pDoc->GetValue(ScAddress(5,2,0)));
m_pDoc->DeleteTab(0); m_pDoc->DeleteTab(0);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment