sc/qa/unit/ucalc_formula.cxx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
New commits: commit 8e0d49e3b6f6e7146477569e635d2c30863c4cfc Author: Åukasz Hryniuk <lukasz.hryn...@wp.pl> Date: Fri Aug 14 00:48:03 2015 +0200 tdf#89387 add some strings to CHITEST test Any string in one of given matrices should result in IllegalParameter error. Change-Id: Ia08d879ec109e04021373c34e83f1873be6815c2 Reviewed-on: https://gerrit.libreoffice.org/18002 Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrh...@googlemail.com> diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx index 52ccb9a..90a267c 100644 --- a/sc/qa/unit/ucalc_formula.cxx +++ b/sc/qa/unit/ucalc_formula.cxx @@ -5658,6 +5658,23 @@ void Test::testFuncCHITEST() m_pDoc->SetValue(3, 2, 0, 3.0); // D3 m_pDoc->SetValue(4, 2, 0, 1.0); // E3 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Calculation of CHITEST failed", 0.1117, m_pDoc->GetValue(aPos), 10e-4); + + // test with strings + m_pDoc->SetString(4, 2, 0, "a"); // E3 + aVal = m_pDoc->GetString(aPos); + CPPUNIT_ASSERT_EQUAL_MESSAGE("CHITEST should return Err:502 for matrices with strings", + OUString("Err:502"), aVal); + m_pDoc->SetString(1, 2, 0, "a"); // B3 + aVal = m_pDoc->GetString(aPos); + CPPUNIT_ASSERT_EQUAL_MESSAGE("CHITEST should return Err:502 for matrices with strings", + OUString("Err:502"), aVal); + m_pDoc->SetValue(4, 2, 0, 1.0); // E3 + aVal = m_pDoc->GetString(aPos); + CPPUNIT_ASSERT_EQUAL_MESSAGE("CHITEST should return Err:502 for matrices with strings", + OUString("Err:502"), aVal); + m_pDoc->SetValue(1, 2, 0, 2.0); // B3 + CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Calculation of CHITEST failed", 0.1117, m_pDoc->GetValue(aPos), 10e-4); + m_pDoc->SetValue(4, 1, 0, 5.0); // E2 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Calculation of CHITEST failed", 0.0215, m_pDoc->GetValue(aPos), 10e-4); m_pDoc->SetValue(1, 2, 0, 1.0); // B3
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits