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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Aug 24 09:46:19 UTC 2018


 sc/qa/unit/ucalc_formula.cxx |   10 ++++++++++
 1 file changed, 10 insertions(+)

New commits:
commit 4f35cb303583a66de3b5df548bcad9c24f126f34
Author:     Eike Rathke <erack at redhat.com>
AuthorDate: Fri Aug 24 09:55:29 2018 +0200
Commit:     Eike Rathke <erack at redhat.com>
CommitDate: Fri Aug 24 11:45:52 2018 +0200

    tdf#117016 unit test for LOOKUP() interim array omitted errors
    
    Change-Id: I764e39876dd0a870cbe88054311899f0cc2a3181
    Reviewed-on: https://gerrit.libreoffice.org/59541
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Jenkins

diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 5be2404d484f..342ef56f2ce1 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -5135,6 +5135,16 @@ void Test::testFuncLOOKUParrayWithError()
     m_pDoc->SetString(4,1,0, "");                                   // E2
     CPPUNIT_ASSERT_EQUAL_MESSAGE("Should find match for second last column.", OUString("b"), m_pDoc->GetString(0,0,0));
 
+    m_pDoc->SetString(6,1,0, "one");                                // G2
+    m_pDoc->SetString(6,5,0, "two");                                // G6
+    // Creates an interim array {1,#DIV/0!,#DIV/0!,#DIV/0!,1,#DIV/0!,#DIV/0!,#DIV/0!}
+    m_pDoc->SetString(7,8,0, "=LOOKUP(2;1/(NOT(ISBLANK(G2:G9)));G2:G9)"); // H9
+    CPPUNIT_ASSERT_EQUAL_MESSAGE("Should find match for last row.", OUString("two"), m_pDoc->GetString(7,8,0));
+
+    // Lookup on empty range.
+    m_pDoc->SetString(9,8,0, "=LOOKUP(2;1/(NOT(ISBLANK(I2:I9)));I2:I9)"); // J9
+    CPPUNIT_ASSERT_EQUAL_MESSAGE("Should find no match.", OUString("#N/A"), m_pDoc->GetString(9,8,0));
+
     m_pDoc->DeleteTab(0);
 }
 


More information about the Libreoffice-commits mailing list