[Libreoffice-commits] core.git: sc/qa

Tor Lillqvist tml at collabora.com
Wed Sep 27 09:04:34 UTC 2017


 sc/qa/unit/parallelism.cxx |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

New commits:
commit e5b76044326f8dd5d59d7b9e51fbcda706836115
Author: Tor Lillqvist <tml at collabora.com>
Date:   Wed Sep 27 10:53:54 2017 +0300

    Test also SUMIFS where no row matches
    
    Change-Id: Ifd4ab6f1760a5088744cb728a3e0c970388d8283

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);


More information about the Libreoffice-commits mailing list