summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-04-13 17:18:14 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-04-14 11:48:55 +0200
commitd8ff1a579ff5ac9250aa052ef1a17fce51959cb0 (patch)
treecc7dc823827f618070daeffc8a3109e7afbcdc0a /sc
parent97fe16f4dc5582be597971b6e17431b8d353b8ba (diff)
improve autofill test case
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/ucalc.cxx23
1 files changed, 22 insertions, 1 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 130ad670d0e1..78fe168476eb 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -4179,7 +4179,28 @@ void Test::testAutoFill()
for (SCROW i = 3; i< 8; ++i)
CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<double>(i-1.0), m_pDoc->GetValue(0, i, 0), 0.00000001);
-
+ m_pDoc->Fill( 0, 0, 0, 8, NULL, aMarkData, 5, FILL_TO_RIGHT );
+ for (SCCOL i = 0; i < 5; ++i)
+ {
+ for(SCROW j = 0; j < 8; ++j)
+ {
+ if (j > 2)
+ {
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<double>(j-1+i), m_pDoc->GetValue(i, j, 0), 1e-8);
+ }
+ else if (j == 0)
+ {
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<double>(i+1), m_pDoc->GetValue(i, 0, 0), 1e-8);
+ }
+ else if (j == 1 || j== 2)
+ {
+ if(i == 0)
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(10.0, m_pDoc->GetValue(0,j,0), 1e-8);
+ else
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, m_pDoc->GetValue(i,j,0), 1e-8);
+ }
+ }
+ }
m_pDoc->DeleteTab(0);