[Libreoffice-commits] .: 2 commits - sc/qa
Markus Mohrhard
mmohrhard at kemper.freedesktop.org
Sat Apr 14 02:49:06 PDT 2012
sc/qa/unit/filters-test.cxx | 21 ---------------------
sc/qa/unit/subsequent_filters-test.cxx | 21 +++++++++++++++++++++
sc/qa/unit/ucalc.cxx | 23 ++++++++++++++++++++++-
3 files changed, 43 insertions(+), 22 deletions(-)
New commits:
commit d8ff1a579ff5ac9250aa052ef1a17fce51959cb0
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Fri Apr 13 17:18:14 2012 +0200
improve autofill test case
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 130ad67..78fe168 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);
commit 97fe16f4dc5582be597971b6e17431b8d353b8ba
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Fri Apr 13 17:04:46 2012 +0200
move testCVE into slowcheck
speed up rebuild of sc
diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx
index de17ced..417b842 100644
--- a/sc/qa/unit/filters-test.cxx
+++ b/sc/qa/unit/filters-test.cxx
@@ -96,11 +96,6 @@ public:
virtual void setUp();
virtual void tearDown();
- /**
- * Ensure CVEs remain unbroken
- */
- void testCVEs();
-
//ods, xls, xlsx filter tests
void testRangeNameODS(); // only test ods here, xls and xlsx in subsequent_filters-test
void testContentODS();
@@ -117,7 +112,6 @@ public:
#endif
CPPUNIT_TEST_SUITE(ScFiltersTest);
- CPPUNIT_TEST(testCVEs);
CPPUNIT_TEST(testRangeNameODS);
CPPUNIT_TEST(testContentODS);
CPPUNIT_TEST(testContentXLS);
@@ -189,21 +183,6 @@ void ScFiltersTest::createCSVPath(const rtl::OUString& aFileBase, rtl::OUString&
rCSVPath = aBuffer.makeStringAndClear();
}
-void ScFiltersTest::testCVEs()
-{
- testDir(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Quattro Pro 6.0")),
- getURLFromSrc("/sc/qa/unit/data/qpro/"), rtl::OUString());
-
- //warning, the current "sylk filter" in sc (docsh.cxx) automatically
- //chains on failure on trying as csv, rtf, etc. so "success" may
- //not indicate that it imported as .slk.
- testDir(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SYLK")),
- getURLFromSrc("/sc/qa/unit/data/slk/"), rtl::OUString());
-
- testDir(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MS Excel 97")),
- getURLFromSrc("/sc/qa/unit/data/xls/"), rtl::OUString());
-}
-
#if TEST_BUG_FILES
void ScFiltersTest::testDir(osl::Directory& rDir, sal_uInt32 nType)
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 1d8a8b6..f2ed04b 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -93,6 +93,11 @@ public:
virtual void setUp();
virtual void tearDown();
+ /**
+ * Ensure CVEs remain unbroken
+ */
+ void testCVEs();
+
//ods, xls, xlsx filter tests
void testRangeNameXLS();
void testRangeNameXLSX();
@@ -115,6 +120,7 @@ public:
CPPUNIT_TEST_SUITE(ScFiltersTest);
+ CPPUNIT_TEST(testCVEs);
CPPUNIT_TEST(testRangeNameXLS);
CPPUNIT_TEST(testRangeNameXLSX);
CPPUNIT_TEST(testFunctionsODS);
@@ -216,6 +222,21 @@ void ScFiltersTest::createCSVPath(const rtl::OUString& aFileBase, rtl::OUString&
rCSVPath = aBuffer.makeStringAndClear();
}
+void ScFiltersTest::testCVEs()
+{
+ testDir(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Quattro Pro 6.0")),
+ getURLFromSrc("/sc/qa/unit/data/qpro/"), rtl::OUString());
+
+ //warning, the current "sylk filter" in sc (docsh.cxx) automatically
+ //chains on failure on trying as csv, rtf, etc. so "success" may
+ //not indicate that it imported as .slk.
+ testDir(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SYLK")),
+ getURLFromSrc("/sc/qa/unit/data/slk/"), rtl::OUString());
+
+ testDir(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MS Excel 97")),
+ getURLFromSrc("/sc/qa/unit/data/xls/"), rtl::OUString());
+}
+
namespace {
void testRangeNameImpl(ScDocument* pDoc)
More information about the Libreoffice-commits
mailing list