summaryrefslogtreecommitdiff
path: root/sc/qa/unit
diff options
context:
space:
mode:
Diffstat (limited to 'sc/qa/unit')
-rw-r--r--sc/qa/unit/data/contentCSV/cachedValue.csv2
-rw-r--r--sc/qa/unit/data/ods/cachedValue.odsbin0 -> 9176 bytes
-rw-r--r--sc/qa/unit/helper/csv_handler.hxx4
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx52
4 files changed, 37 insertions, 21 deletions
diff --git a/sc/qa/unit/data/contentCSV/cachedValue.csv b/sc/qa/unit/data/contentCSV/cachedValue.csv
new file mode 100644
index 000000000000..183391b00d6e
--- /dev/null
+++ b/sc/qa/unit/data/contentCSV/cachedValue.csv
@@ -0,0 +1,2 @@
+1.00,200.00%,$3.00,1/3/00,00:00,6.00E+000,7 1/5,TRUE,9,1000%,01-10
+1,200.00%,$3.00,01/03/00,120:00:00,6.00E+000,7 1/5,TRUE,9,1000.00%,01/10/00
diff --git a/sc/qa/unit/data/ods/cachedValue.ods b/sc/qa/unit/data/ods/cachedValue.ods
new file mode 100644
index 000000000000..a802e2205862
--- /dev/null
+++ b/sc/qa/unit/data/ods/cachedValue.ods
Binary files differ
diff --git a/sc/qa/unit/helper/csv_handler.hxx b/sc/qa/unit/helper/csv_handler.hxx
index 8493f104992e..b621baaf3140 100644
--- a/sc/qa/unit/helper/csv_handler.hxx
+++ b/sc/qa/unit/helper/csv_handler.hxx
@@ -141,7 +141,7 @@ public:
std::cout << "result: " << (int)(aCSVString == aString) << std::endl;
#endif //DEBUG_CSV_HANDLER
- CPPUNIT_ASSERT_MESSAGE(createErrorMessage(mnCol, mnRow, mnTab, aCSVString, aString).getStr(), aString == aCSVString);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(createErrorMessage(mnCol, mnRow, mnTab, aCSVString, aString).getStr(), aString, aCSVString);
}
else
{
@@ -169,7 +169,7 @@ public:
std::cout << "result: " << (int)(aCSVString == aString) << std::endl;
#endif //DEBUG_CSV_HANDLER
- CPPUNIT_ASSERT_MESSAGE(createErrorMessage(mnCol, mnRow, mnTab, aCSVString, aString).getStr(), aString == aCSVString);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(createErrorMessage(mnCol, mnRow, mnTab, aCSVString, aString).getStr(), aString, aCSVString);
}
else
{
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index c8dcf40ddd72..a8c37cbc6189 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -188,8 +188,8 @@ public:
CPPUNIT_TEST(testHardRecalcODS);
CPPUNIT_TEST(testFunctionsODS);
CPPUNIT_TEST(testCachedFormulaResultsODS);
- //CPPUNIT_TEST(testVolatileFunctionsODS);
- //CPPUNIT_TEST(testCachedMatrixFormulaResultsODS);
+ CPPUNIT_TEST(testVolatileFunctionsODS);
+ CPPUNIT_TEST(testCachedMatrixFormulaResultsODS);
CPPUNIT_TEST(testDatabaseRangesODS);
CPPUNIT_TEST(testDatabaseRangesXLS);
CPPUNIT_TEST(testDatabaseRangesXLSX);
@@ -428,26 +428,40 @@ void ScFiltersTest::testFunctionsODS()
void ScFiltersTest::testCachedFormulaResultsODS()
{
- ScDocShellRef xDocSh = loadDoc("functions.", ODS);
- CPPUNIT_ASSERT_MESSAGE("Failed to load functions.*", xDocSh.Is());
+ {
+ ScDocShellRef xDocSh = loadDoc("functions.", ODS);
+ CPPUNIT_ASSERT_MESSAGE("Failed to load functions.*", xDocSh.Is());
- ScDocument* pDoc = xDocSh->GetDocument();
- rtl::OUString aCSVFileName;
+ ScDocument* pDoc = xDocSh->GetDocument();
+ rtl::OUString aCSVFileName;
- //test cached formula results of logical functions
- createCSVPath(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("logical-functions.")), aCSVFileName);
- testFile(aCSVFileName, pDoc, 0);
- //test cached formula results of spreadsheet functions
- createCSVPath(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("spreadsheet-functions.")), aCSVFileName);
- testFile(aCSVFileName, pDoc, 1);
- //test cached formula results of mathematical functions
- createCSVPath(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("mathematical-functions.")), aCSVFileName);
- testFile(aCSVFileName, pDoc, 2, PureString);
- //test cached formula results of informations functions
- createCSVPath(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("information-functions.")), aCSVFileName);
- testFile(aCSVFileName, pDoc, 3);
+ //test cached formula results of logical functions
+ createCSVPath(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("logical-functions.")), aCSVFileName);
+ testFile(aCSVFileName, pDoc, 0);
+ //test cached formula results of spreadsheet functions
+ createCSVPath(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("spreadsheet-functions.")), aCSVFileName);
+ testFile(aCSVFileName, pDoc, 1);
+ //test cached formula results of mathematical functions
+ createCSVPath(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("mathematical-functions.")), aCSVFileName);
+ testFile(aCSVFileName, pDoc, 2, PureString);
+ //test cached formula results of informations functions
+ createCSVPath(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("information-functions.")), aCSVFileName);
+ testFile(aCSVFileName, pDoc, 3);
- xDocSh->DoClose();
+ xDocSh->DoClose();
+ }
+
+ {
+ ScDocShellRef xDocSh = loadDoc("cachedValue.", ODS);
+ CPPUNIT_ASSERT_MESSAGE("Failed to load cachedValue.*", xDocSh.Is());
+
+ ScDocument* pDoc = xDocSh->GetDocument();
+ rtl::OUString aCSVFileName;
+ createCSVPath("cachedValue.", aCSVFileName);
+ testFile(aCSVFileName, pDoc, 0);
+
+ xDocSh->DoClose();
+ }
}
void ScFiltersTest::testVolatileFunctionsODS()