add test for tdf#72240
Change-Id: Ia27b84094e21758286422921e2bd017f9874dc06 Reviewed-on: https://gerrit.libreoffice.org/24104 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
This commit is contained in:
parent
67abc250e5
commit
4a2be39af5
1 changed files with 43 additions and 0 deletions
|
@ -92,12 +92,21 @@ public:
|
|||
void testMultiMark_FourRanges();
|
||||
void testMultiMark_NegativeMarking();
|
||||
|
||||
void testInsertTabBeforeSelected();
|
||||
void testInsertTabAfterSelected();
|
||||
void testDeleteTabBeforeSelected();
|
||||
void testDeleteTabAfterSelected();
|
||||
|
||||
CPPUNIT_TEST_SUITE(Test);
|
||||
CPPUNIT_TEST(testSimpleMark_Simple);
|
||||
CPPUNIT_TEST(testSimpleMark_Column);
|
||||
CPPUNIT_TEST(testSimpleMark_Row);
|
||||
CPPUNIT_TEST(testMultiMark_FourRanges);
|
||||
CPPUNIT_TEST(testMultiMark_NegativeMarking);
|
||||
CPPUNIT_TEST(testInsertTabBeforeSelected);
|
||||
CPPUNIT_TEST(testInsertTabAfterSelected);
|
||||
CPPUNIT_TEST(testDeleteTabBeforeSelected);
|
||||
CPPUNIT_TEST(testDeleteTabAfterSelected);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
private:
|
||||
|
@ -801,7 +810,41 @@ void Test::testMultiMark_NegativeMarking()
|
|||
testMultiMark( aData );
|
||||
}
|
||||
|
||||
void Test::testInsertTabBeforeSelected()
|
||||
{
|
||||
ScMarkData aMark;
|
||||
aMark.SelectOneTable(0);
|
||||
aMark.InsertTab(0);
|
||||
CPPUNIT_ASSERT_EQUAL(SCTAB(1), aMark.GetSelectCount());
|
||||
CPPUNIT_ASSERT_EQUAL(SCTAB(1), aMark.GetFirstSelected());
|
||||
}
|
||||
|
||||
void Test::testInsertTabAfterSelected()
|
||||
{
|
||||
ScMarkData aMark;
|
||||
aMark.SelectOneTable(0);
|
||||
aMark.InsertTab(1);
|
||||
CPPUNIT_ASSERT_EQUAL(SCTAB(1), aMark.GetSelectCount());
|
||||
CPPUNIT_ASSERT_EQUAL(SCTAB(0), aMark.GetFirstSelected());
|
||||
}
|
||||
|
||||
void Test::testDeleteTabBeforeSelected()
|
||||
{
|
||||
ScMarkData aMark;
|
||||
aMark.SelectOneTable(1);
|
||||
aMark.DeleteTab(0);
|
||||
CPPUNIT_ASSERT_EQUAL(SCTAB(1), aMark.GetSelectCount());
|
||||
CPPUNIT_ASSERT_EQUAL(SCTAB(0), aMark.GetFirstSelected());
|
||||
}
|
||||
|
||||
void Test::testDeleteTabAfterSelected()
|
||||
{
|
||||
ScMarkData aMark;
|
||||
aMark.SelectOneTable(0);
|
||||
aMark.DeleteTab(1);
|
||||
CPPUNIT_ASSERT_EQUAL(SCTAB(1), aMark.GetSelectCount());
|
||||
CPPUNIT_ASSERT_EQUAL(SCTAB(0), aMark.GetFirstSelected());
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
|
||||
|
||||
|
|
Loading…
Reference in a new issue