diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2012-01-11 22:00:50 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2012-01-11 22:01:57 -0500 |
commit | ca73d85cc813a2a95fbbba35be6de6dc5ff2967f (patch) | |
tree | 6ddc74fc53a5aced2e0c20f7360e9015f15c5233 /sc/qa | |
parent | SvStringsDtor->std::vector (diff) | |
download | core-ca73d85cc813a2a95fbbba35be6de6dc5ff2967f.tar.gz core-ca73d85cc813a2a95fbbba35be6de6dc5ff2967f.zip |
Test code for sheet source data cache relocation.
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index ac683a0e01a4..b9e3013f2133 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -1386,6 +1386,16 @@ void Test::testDataPilot() CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); } + CPPUNIT_ASSERT_MESSAGE("Cache should be here.", pDPs->GetSheetCaches().hasCache(aSrcRange)); + + // Swap the two sheets. + m_pDoc->MoveTab(1, 0); + CPPUNIT_ASSERT_MESSAGE("Cache should have moved.", !pDPs->GetSheetCaches().hasCache(aSrcRange)); + aSrcRange.aStart.SetTab(1); + aSrcRange.aEnd.SetTab(1); + CPPUNIT_ASSERT_MESSAGE("Cache should be here.", pDPs->GetSheetCaches().hasCache(aSrcRange)); + + pDPs->FreeTable(pDPObj2); CPPUNIT_ASSERT_MESSAGE("There shouldn't be any data pilot table stored with the document.", pDPs->GetCount() == 0); @@ -1671,7 +1681,7 @@ void Test::testDataPilotNamedSource() CPPUNIT_ASSERT_MESSAGE("Named source range has been altered unexpectedly!", pDesc->GetRangeName().equals(aRangeName)); - CPPUNIT_ASSERT_MESSAGE("Cache should exist.", pDPs->GetNameCaches().getCache(aRangeName) != NULL); + CPPUNIT_ASSERT_MESSAGE("Cache should exist.", pDPs->GetNameCaches().hasCache(aRangeName)); pDPs->FreeTable(pDPObj); CPPUNIT_ASSERT_MESSAGE("There should be no more tables.", pDPs->GetCount() == 0); |