Kaydet (Commit) 3ed834ae authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Unit test for ScRangeList. For now it's very basic. May expand later.

Change-Id: Ib7454253df250ddc991aed0dd5cd5b0f90476dd8
üst 0cc52217
......@@ -108,6 +108,7 @@ public:
virtual void tearDown();
void testCollator();
void testRangeList();
void testInput();
void testCellFunctions();
......@@ -226,6 +227,7 @@ public:
CPPUNIT_TEST_SUITE(Test);
CPPUNIT_TEST(testCollator);
CPPUNIT_TEST(testRangeList);
CPPUNIT_TEST(testInput);
CPPUNIT_TEST(testCellFunctions);
CPPUNIT_TEST(testSheetsFunc);
......@@ -357,6 +359,22 @@ void Test::testCollator()
CPPUNIT_ASSERT_MESSAGE("these strings are supposed to be different!", nRes != 0);
}
void Test::testRangeList()
{
m_pDoc->InsertTab(0, "foo");
ScRangeList aRL;
aRL.Append(ScRange(1,1,0,3,10,0));
CPPUNIT_ASSERT_MESSAGE("List should have one range.", aRL.size() == 1);
const ScRange* p = aRL[0];
CPPUNIT_ASSERT_MESSAGE("Failed to get the range object.", p);
CPPUNIT_ASSERT_MESSAGE("Wrong range.", p->aStart == ScAddress(1,1,0) && p->aEnd == ScAddress(3,10,0));
// TODO: Add more tests here.
m_pDoc->DeleteTab(0);
}
void Test::testInput()
{
rtl::OUString aTabName("foo");
......
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