diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-04-28 13:44:18 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-04-28 13:45:48 -0400 |
commit | 5233971396b2ed8e280ad68912e1a55e803f3856 (patch) | |
tree | 49edb716e684ceacaa859982d40c7dda2599ff95 /sc/qa/unit | |
parent | 453ea919e70fa9832f11e3ef042bb80cd86892cc (diff) |
Add a bit more test code to test the normal use cases of MIN.
Change-Id: Iad1e120dff49d569e5fb66905e5fe28462759c5a
Diffstat (limited to 'sc/qa/unit')
-rw-r--r-- | sc/qa/unit/ucalc_formula.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx index de1fd1194cb4..1ecc5d2665bc 100644 --- a/sc/qa/unit/ucalc_formula.cxx +++ b/sc/qa/unit/ucalc_formula.cxx @@ -2292,6 +2292,18 @@ void Test::testFuncMIN() CPPUNIT_ASSERT_EQUAL(0.0, m_pDoc->GetValue(ScAddress(2,0,0))); CPPUNIT_ASSERT_EQUAL(0.0, m_pDoc->GetValue(ScAddress(2,1,0))); + // Inline array input (A4). + m_pDoc->SetString(ScAddress(0,3,0), "=MIN({-2;4;3})"); + CPPUNIT_ASSERT_EQUAL(-2.0, m_pDoc->GetValue(ScAddress(0,3,0))); + + // Add more values to B3:B4. + m_pDoc->SetValue(ScAddress(1,2,0), 20.0); + m_pDoc->SetValue(ScAddress(1,3,0), -20.0); + + // Get the MIN of B1:B4. + m_pDoc->SetString(ScAddress(2,4,0), "=MIN(B1:B4)"); + CPPUNIT_ASSERT_EQUAL(-20.0, m_pDoc->GetValue(ScAddress(2,4,0))); + m_pDoc->DeleteTab(0); } |