Kaydet (Commit) c3452373 authored tarafından Daniel Bankston's avatar Daniel Bankston Kaydeden (comit) Kohei Yoshida

Add test for volatile functions for ODS import

Change-Id: If2f85e32ddeb9f25b4a355ce5451dc04925bbbc9
üst 6bf50c8d
......@@ -109,6 +109,7 @@ public:
void testHardRecalcODS();
void testFunctionsODS();
void testCachedFormulaResultsODS();
void testVolatileFunctionsODS();
void testCachedMatrixFormulaResultsODS();
void testDatabaseRangesODS();
void testDatabaseRangesXLS();
......@@ -145,6 +146,7 @@ public:
CPPUNIT_TEST(testHardRecalcODS);
CPPUNIT_TEST(testFunctionsODS);
CPPUNIT_TEST(testCachedFormulaResultsODS);
CPPUNIT_TEST(testVolatileFunctionsODS);
CPPUNIT_TEST(testCachedMatrixFormulaResultsODS);
CPPUNIT_TEST(testDatabaseRangesODS);
CPPUNIT_TEST(testDatabaseRangesXLS);
......@@ -388,6 +390,28 @@ void ScFiltersTest::testCachedFormulaResultsODS()
xDocSh->DoClose();
}
void ScFiltersTest::testVolatileFunctionsODS()
{
const rtl::OUString aFileNameBase(RTL_CONSTASCII_USTRINGPARAM("volatile."));
ScDocShellRef xDocSh = loadDoc( aFileNameBase, ODS );
CPPUNIT_ASSERT_MESSAGE("Failed to load volatile.ods", xDocSh.Is());
ScDocument* pDoc = xDocSh->GetDocument();
//we want to me sure that volatile functions are always recalculated
//regardless of cached results. if you update the ods file, you must
//update the values here.
//if NOW() is recacluated, then it should never equal sTodayCache
OUString sTodayCache("07/11/12 12:28 AM");
OUString sTodayRecalc(pDoc->GetString(0,1,0));
CPPUNIT_ASSERT(sTodayCache != sTodayRecalc);
OUString sTodayRecalcRef(pDoc->GetString(2,1,0));
CPPUNIT_ASSERT(sTodayCache != sTodayRecalcRef);
xDocSh->DoClose();
}
void ScFiltersTest::testCachedMatrixFormulaResultsODS()
{
const rtl::OUString aFileNameBase(RTL_CONSTASCII_USTRINGPARAM("matrix."));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment