diff options
Diffstat (limited to 'sc/qa/unit/ucalc.cxx')
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 3c21c990cf44..ae28aadeae31 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -534,22 +534,14 @@ void Test::testDataEntries() m_pDoc->SetString(ScAddress(0,5,0), "Andy"); m_pDoc->SetString(ScAddress(0,6,0), "Bruce"); m_pDoc->SetString(ScAddress(0,7,0), "Charlie"); - m_pDoc->SetValue(ScAddress(0,8,0), 100); - m_pDoc->SetValue(ScAddress(0,9,0), 200); m_pDoc->SetString(ScAddress(0,10,0), "Andy"); - m_pDoc->SetValue(ScAddress(0,11,0), 1000); std::vector<ScTypedStrData> aEntries; - m_pDoc->GetDataEntries(0, 0, 0, aEntries); // Try at the top. - std::vector<ScTypedStrData>::const_iterator it = aEntries.begin(); - CPPUNIT_ASSERT_MESSAGE("The entries should be empty.", bool(it == aEntries.end())); - - aEntries.clear(); - m_pDoc->GetDataEntries(0, 4, 0, aEntries); // Try at A5. + m_pDoc->GetDataEntries(0, 0, 0, aEntries); // Try at the very top. // Entries are supposed to be sorted in ascending order, and are all unique. CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), aEntries.size()); - it = aEntries.begin(); + std::vector<ScTypedStrData>::const_iterator it = aEntries.begin(); CPPUNIT_ASSERT_EQUAL(OUString("Andy"), it->GetString()); ++it; CPPUNIT_ASSERT_EQUAL(OUString("Bruce"), it->GetString()); @@ -559,7 +551,7 @@ void Test::testDataEntries() CPPUNIT_ASSERT_MESSAGE("The entries should have ended here.", bool(it == aEntries.end())); aEntries.clear(); - m_pDoc->GetDataEntries(0, 12, 0, aEntries); // Try at A13. + m_pDoc->GetDataEntries(0, MAXROW, 0, aEntries); // Try at the very bottom. CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), aEntries.size()); // Make sure we get the same set of suggestions. @@ -572,11 +564,6 @@ void Test::testDataEntries() ++it; CPPUNIT_ASSERT_MESSAGE("The entries should have ended here.", bool(it == aEntries.end())); - aEntries.clear(); - m_pDoc->GetDataEntries(0, MAXROW, 0, aEntries); // Try at the bottom. - it = aEntries.begin(); - CPPUNIT_ASSERT_MESSAGE("The entries should be empty.", bool(it == aEntries.end())); - m_pDoc->DeleteTab(0); } |