diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-05-17 05:01:34 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-05-17 06:48:25 +0200 |
commit | 2d09ea9537cababd3ea8d44e5b4225791beac1bc (patch) | |
tree | 7cd03ecbb797566d0c15a3ba598304f370ebda99 /sc | |
parent | 3257372f3434cca2428bfdbc57dd777135c65b34 (diff) |
also test zero position
Change-Id: I74dac1362acb04453c51d93ce9fd400a4ce22f2f
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 6114eb370d61..78e7af6cc008 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -5889,7 +5889,8 @@ struct ScDataBarLengthData void testDataBarLengthImpl(ScDocument* pDoc, ScDataBarLengthData* pData, const ScRange& rRange, double nMinVal, ScColorScaleEntryType eMinType, - double nMaxVal, ScColorScaleEntryType eMaxType) + double nMaxVal, ScColorScaleEntryType eMaxType, + double nZeroPos) { ScConditionalFormat* pFormat = new ScConditionalFormat(1, pDoc); ScRangeList aRangeList(rRange); @@ -5919,6 +5920,7 @@ void testDataBarLengthImpl(ScDocument* pDoc, ScDataBarLengthData* pData, const S ScDataBarInfo* pInfo = pDatabar->GetDataBarInfo(ScAddress(nCol, i, 0)); CPPUNIT_ASSERT(pInfo); ASSERT_DOUBLES_EQUAL(pData[i].nLength, pInfo->mnLength); + ASSERT_DOUBLES_EQUAL(nZeroPos, pInfo->mnZero); } delete pFormat; } @@ -5942,7 +5944,7 @@ void Test::testDataBarLength() }; testDataBarLengthImpl(m_pDoc, aValues, ScRange(0,0,0,0,7,0), - 3, COLORSCALE_VALUE, 7, COLORSCALE_VALUE); + 3, COLORSCALE_VALUE, 7, COLORSCALE_VALUE, 0.0); ScDataBarLengthData aValues2[] = { { -6, -100 }, @@ -5964,7 +5966,7 @@ void Test::testDataBarLength() { 0, -200 } }; testDataBarLengthImpl(m_pDoc, aValues2, ScRange(1,0,0,1,15,0), - -4, COLORSCALE_VALUE, 8, COLORSCALE_VALUE); + -4, COLORSCALE_VALUE, 8, COLORSCALE_VALUE, 1.0/3.0 * 100); m_pDoc->DeleteTab(0); } |