summaryrefslogtreecommitdiff
path: root/sc/qa
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2017-09-27 10:53:54 +0300
committerTor Lillqvist <tml@collabora.com>2017-09-27 12:03:58 +0300
commite5b76044326f8dd5d59d7b9e51fbcda706836115 (patch)
tree97a0f40f45671f486bc6d31088f7823450901236 /sc/qa
parentcc1ed7fbce20f90650f96acc2846b6f232c8ab0f (diff)
Test also SUMIFS where no row matches
Change-Id: Ifd4ab6f1760a5088744cb728a3e0c970388d8283
Diffstat (limited to 'sc/qa')
-rw-r--r--sc/qa/unit/parallelism.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/sc/qa/unit/parallelism.cxx b/sc/qa/unit/parallelism.cxx
index 1bd725ad38b1..bccae4e830b8 100644
--- a/sc/qa/unit/parallelism.cxx
+++ b/sc/qa/unit/parallelism.cxx
@@ -103,7 +103,11 @@ void ScParallelismTest::testSUMIFS()
for (auto i = 1; i < 1000; i++)
{
- /*A*/ m_pDoc->SetValue(0, i, 0, i/10 + 1000);
+ /*A*/
+ if (i%19)
+ m_pDoc->SetValue(0, i, 0, i/10 + 1000);
+ else
+ m_pDoc->SetValue(0, i, 0, 123456);
/*B*/ m_pDoc->SetValue(1, i, 0, i%10);
/*C*/ m_pDoc->SetValue(2, i, 0, i%5);
@@ -161,7 +165,10 @@ void ScParallelismTest::testSUMIFS()
for (auto i = 1; i < 1000; i++)
{
OString sMessage = "At row " + OString::number(i+1);
- CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(sMessage.getStr(), m_pDoc->GetValue(5, 10+i%10, 0), m_pDoc->GetValue(15, i, 0), 1e-10);
+ if ((10+i%10)%19)
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(sMessage.getStr(), m_pDoc->GetValue(5, 10+i%10, 0), m_pDoc->GetValue(15, i, 0), 1e-10);
+ else
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(sMessage.getStr(), 0, m_pDoc->GetValue(15, i, 0), 1e-10);
}
m_pDoc->DeleteTab(0);