[Libreoffice-commits] .: Branch 'feature/gsoc_test_improvements3' - 2 commits - sc/qa
Artur Dorda
adorda at kemper.freedesktop.org
Thu Aug 2 07:33:16 PDT 2012
sc/qa/unit/subsequent_filters-test.cxx | 79 +++++++++++++++++++++++++--------
1 file changed, 60 insertions(+), 19 deletions(-)
New commits:
commit af1ec680e3710576245f85ce0fb80c1cd677bce4
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date: Thu Aug 2 16:32:53 2012 +0200
Border test in Calc now checks also style in all borders
Change-Id: Idfb9f035b9940a0e52706bde7d7f4e19c9c9fd6d
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 050017d..f21babb 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -672,34 +672,39 @@ struct Border
sal_uInt16 bOutWidth;
sal_uInt16 bInWidth;
sal_uInt16 bDistance;
+ sal_Int32 lStyle;
+ sal_Int32 tStyle;
+ sal_Int32 rStyle;
+ sal_Int32 bStyle;
// that's a monstrum
Border(sal_Int16 col, sal_Int32 r, sal_Int32 lW, sal_Int32 tW, sal_Int32 rW, sal_Int32 bW, sal_uInt16 lOutW, sal_uInt16 lInW,
sal_uInt16 lDist, sal_uInt16 tOutW, sal_uInt16 tInW, sal_uInt16 tDist, sal_uInt16 rOutW, sal_uInt16 rInW, sal_uInt16 rDist,
- sal_uInt16 bOutW, sal_uInt16 bInW, sal_uInt16 bDist):
+ sal_uInt16 bOutW, sal_uInt16 bInW, sal_uInt16 bDist, sal_Int32 lSt, sal_Int32 tSt, sal_Int32 rSt, sal_Int32 bSt):
column(col), row(r), leftWidth(lW), topWidth(tW), rightWidth(rW), bottomWidth(bW), lOutWidth(lOutW), lInWidth(lInW), lDistance(lDist),
- tOutWidth(tOutW), tInWidth(tInW), tDistance(tDist), rOutWidth(rOutW), rInWidth(rInW), rDistance(rDist), bOutWidth(bOutW), bInWidth(bInW), bDistance(bDist) {};
+ tOutWidth(tOutW), tInWidth(tInW), tDistance(tDist), rOutWidth(rOutW), rInWidth(rInW), rDistance(rDist), bOutWidth(bOutW), bInWidth(bInW),
+ bDistance(bDist), lStyle(lSt), tStyle(tSt), rStyle(rSt), bStyle(bSt) {};
};
void ScFiltersTest::testBordersOoo33()
{
std::vector<Border> borders;
- borders.push_back(Border(1, 1, 22, 22, 22, 22, 1, 1, 20, 1, 1, 20, 1, 1, 20, 1, 1, 20));
- borders.push_back(Border(1, 3, 52, 52, 52, 52, 1, 1, 50, 1, 1, 50, 1, 1, 50, 1, 1, 50));
- borders.push_back(Border(1, 5, 60, 60, 60, 60, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20));
- borders.push_back(Border(1, 7, 150, 150, 150, 150, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50));
- borders.push_back(Border(1, 9, 71, 71, 71, 71, 20, 1, 50, 20, 1, 50, 20, 1, 50, 20, 1, 50));
- borders.push_back(Border(1, 11, 101, 101, 101, 101, 50, 1, 50, 50, 1, 50, 50, 1, 50, 50, 1, 50));
- borders.push_back(Border(1, 13, 131, 131, 131, 131, 80, 1, 50, 80, 1, 50, 80, 1, 50, 80, 1, 50));
- borders.push_back(Border(1, 15, 120, 120, 120, 120, 50, 20, 50, 50, 20, 50, 50, 20, 50, 50, 20, 50));
- borders.push_back(Border(1, 17, 90, 90, 90, 90, 20, 50, 20, 20, 50, 20, 20, 50, 20, 20, 50, 20));
- borders.push_back(Border(1, 19, 180, 180, 180, 180, 80, 50, 50, 80, 50, 50, 80, 50, 50, 80, 50, 50));
- borders.push_back(Border(1, 21, 180, 180, 180, 180, 50, 80, 50, 50, 80, 50, 50, 80, 50, 50, 80, 50));
- borders.push_back(Border(4, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0));
- borders.push_back(Border(4, 3, 10, 10, 10, 10, 10, 0, 0, 10, 0, 0, 10, 0, 0, 10, 0, 0));
- borders.push_back(Border(4, 5, 20, 20, 20, 20, 20, 0, 0, 20, 0, 0, 20, 0, 0, 20, 0, 0));
- borders.push_back(Border(4, 7, 50, 50, 50, 50, 50, 0, 0, 50, 0, 0, 50, 0, 0, 50, 0, 0));
- borders.push_back(Border(4, 9, 80, 80, 80, 80, 80, 0, 0, 80, 0, 0, 80, 0, 0, 80, 0, 0));
- borders.push_back(Border(4, 11, 100, 100, 100, 100, 100, 0, 0, 100, 0, 0, 100, 0, 0, 100, 0, 0));
+ borders.push_back(Border(1, 1, 22, 22, 22, 22, 1, 1, 20, 1, 1, 20, 1, 1, 20, 1, 1, 20, 3, 3, 3, 3));
+ borders.push_back(Border(1, 3, 52, 52, 52, 52, 1, 1, 50, 1, 1, 50, 1, 1, 50, 1, 1, 50, 3, 3, 3, 3));
+ borders.push_back(Border(1, 5, 60, 60, 60, 60, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 3, 3, 3, 3));
+ borders.push_back(Border(1, 7, 150, 150, 150, 150, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 3, 3, 3, 3));
+ borders.push_back(Border(1, 9, 71, 71, 71, 71, 20, 1, 50, 20, 1, 50, 20, 1, 50, 20, 1, 50, 3, 3, 3, 3));
+ borders.push_back(Border(1, 11, 101, 101, 101, 101, 50, 1, 50, 50, 1, 50, 50, 1, 50, 50, 1, 50, 3, 3, 3, 3));
+ borders.push_back(Border(1, 13, 131, 131, 131, 131, 80, 1, 50, 80, 1, 50, 80, 1, 50, 80, 1, 50, 3, 3, 3, 3));
+ borders.push_back(Border(1, 15, 120, 120, 120, 120, 50, 20, 50, 50, 20, 50, 50, 20, 50, 50, 20, 50, 3, 3, 3, 3));
+ borders.push_back(Border(1, 17, 90, 90, 90, 90, 20, 50, 20, 20, 50, 20, 20, 50, 20, 20, 50, 20, 3, 3, 3, 3));
+ borders.push_back(Border(1, 19, 180, 180, 180, 180, 80, 50, 50, 80, 50, 50, 80, 50, 50, 80, 50, 50, 3, 3, 3, 3));
+ borders.push_back(Border(1, 21, 180, 180, 180, 180, 50, 80, 50, 50, 80, 50, 50, 80, 50, 50, 80, 50, 3, 3, 3, 3));
+ borders.push_back(Border(4, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0));
+ borders.push_back(Border(4, 3, 10, 10, 10, 10, 10, 0, 0, 10, 0, 0, 10, 0, 0, 10, 0, 0, 0, 0, 0, 0));
+ borders.push_back(Border(4, 5, 20, 20, 20, 20, 20, 0, 0, 20, 0, 0, 20, 0, 0, 20, 0, 0, 0, 0, 0, 0));
+ borders.push_back(Border(4, 7, 50, 50, 50, 50, 50, 0, 0, 50, 0, 0, 50, 0, 0, 50, 0, 0, 0, 0, 0, 0));
+ borders.push_back(Border(4, 9, 80, 80, 80, 80, 80, 0, 0, 80, 0, 0, 80, 0, 0, 80, 0, 0, 0, 0, 0, 0));
+ borders.push_back(Border(4, 11, 100, 100, 100, 100, 100, 0, 0, 100, 0, 0, 100, 0, 0, 100, 0, 0, 0, 0, 0, 0));
const rtl::OUString aFileNameBase(RTL_CONSTASCII_USTRINGPARAM("borders_ooo33."));
ScDocShellRef xDocSh = loadDoc( aFileNameBase, 0);
@@ -737,6 +742,14 @@ void ScFiltersTest::testBordersOoo33()
CPPUNIT_ASSERT_EQUAL(borders[temp].bOutWidth, pBottom->GetOutWidth());
CPPUNIT_ASSERT_EQUAL(borders[temp].bInWidth, pBottom->GetInWidth());
CPPUNIT_ASSERT_EQUAL(borders[temp].bDistance, pBottom->GetDistance());
+ sal_Int32 tempStyle = pLeft->GetBorderLineStyle();
+ CPPUNIT_ASSERT_EQUAL(borders[temp].lStyle, tempStyle);
+ tempStyle = pTop->GetBorderLineStyle();
+ CPPUNIT_ASSERT_EQUAL(borders[temp].tStyle, tempStyle);
+ tempStyle = pRight->GetBorderLineStyle();
+ CPPUNIT_ASSERT_EQUAL(borders[temp].rStyle, tempStyle);
+ tempStyle = pBottom->GetBorderLineStyle();
+ CPPUNIT_ASSERT_EQUAL(borders[temp].bStyle, tempStyle);
++temp;
}
}
commit ef047c02716d52d7182e95eb4cc86afdbb6ea89c
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date: Thu Aug 2 16:13:57 2012 +0200
Border test in Calc now also checks distance, out- and inWidth in all borders
Change-Id: I196b87fb6e59e182ff1f674dc79428cb53612b94
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 5d5203d..050017d 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -660,30 +660,46 @@ struct Border
sal_Int32 topWidth;
sal_Int32 rightWidth;
sal_Int32 bottomWidth;
- Border(sal_Int16 col, sal_Int32 r, sal_Int32 lW, sal_Int32 tW, sal_Int32 rW, sal_Int32 bW):
- column(col), row(r), leftWidth(lW), topWidth(tW), rightWidth(rW), bottomWidth(bW) {};
+ sal_uInt16 lOutWidth;
+ sal_uInt16 lInWidth;
+ sal_uInt16 lDistance;
+ sal_uInt16 tOutWidth;
+ sal_uInt16 tInWidth;
+ sal_uInt16 tDistance;
+ sal_uInt16 rOutWidth;
+ sal_uInt16 rInWidth;
+ sal_uInt16 rDistance;
+ sal_uInt16 bOutWidth;
+ sal_uInt16 bInWidth;
+ sal_uInt16 bDistance;
+ // that's a monstrum
+ Border(sal_Int16 col, sal_Int32 r, sal_Int32 lW, sal_Int32 tW, sal_Int32 rW, sal_Int32 bW, sal_uInt16 lOutW, sal_uInt16 lInW,
+ sal_uInt16 lDist, sal_uInt16 tOutW, sal_uInt16 tInW, sal_uInt16 tDist, sal_uInt16 rOutW, sal_uInt16 rInW, sal_uInt16 rDist,
+ sal_uInt16 bOutW, sal_uInt16 bInW, sal_uInt16 bDist):
+ column(col), row(r), leftWidth(lW), topWidth(tW), rightWidth(rW), bottomWidth(bW), lOutWidth(lOutW), lInWidth(lInW), lDistance(lDist),
+ tOutWidth(tOutW), tInWidth(tInW), tDistance(tDist), rOutWidth(rOutW), rInWidth(rInW), rDistance(rDist), bOutWidth(bOutW), bInWidth(bInW), bDistance(bDist) {};
};
void ScFiltersTest::testBordersOoo33()
{
std::vector<Border> borders;
- borders.push_back(Border(1, 1, 22, 22, 22, 22));
- borders.push_back(Border(1, 3, 52, 52, 52, 52));
- borders.push_back(Border(1, 5, 60, 60, 60, 60));
- borders.push_back(Border(1, 7, 150, 150, 150, 150));
- borders.push_back(Border(1, 9, 71, 71, 71, 71));
- borders.push_back(Border(1, 11, 101, 101, 101, 101));
- borders.push_back(Border(1, 13, 131, 131, 131, 131));
- borders.push_back(Border(1, 15, 120, 120, 120, 120));
- borders.push_back(Border(1, 17, 90, 90, 90, 90));
- borders.push_back(Border(1, 19, 180, 180, 180, 180));
- borders.push_back(Border(1, 21, 180, 180, 180, 180));
- borders.push_back(Border(4, 1, 1, 1, 1, 1));
- borders.push_back(Border(4, 3, 10, 10, 10, 10));
- borders.push_back(Border(4, 5, 20, 20, 20, 20));
- borders.push_back(Border(4, 7, 50, 50, 50, 50));
- borders.push_back(Border(4, 9, 80, 80, 80, 80));
- borders.push_back(Border(4, 11, 100, 100, 100, 100));
+ borders.push_back(Border(1, 1, 22, 22, 22, 22, 1, 1, 20, 1, 1, 20, 1, 1, 20, 1, 1, 20));
+ borders.push_back(Border(1, 3, 52, 52, 52, 52, 1, 1, 50, 1, 1, 50, 1, 1, 50, 1, 1, 50));
+ borders.push_back(Border(1, 5, 60, 60, 60, 60, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20));
+ borders.push_back(Border(1, 7, 150, 150, 150, 150, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50));
+ borders.push_back(Border(1, 9, 71, 71, 71, 71, 20, 1, 50, 20, 1, 50, 20, 1, 50, 20, 1, 50));
+ borders.push_back(Border(1, 11, 101, 101, 101, 101, 50, 1, 50, 50, 1, 50, 50, 1, 50, 50, 1, 50));
+ borders.push_back(Border(1, 13, 131, 131, 131, 131, 80, 1, 50, 80, 1, 50, 80, 1, 50, 80, 1, 50));
+ borders.push_back(Border(1, 15, 120, 120, 120, 120, 50, 20, 50, 50, 20, 50, 50, 20, 50, 50, 20, 50));
+ borders.push_back(Border(1, 17, 90, 90, 90, 90, 20, 50, 20, 20, 50, 20, 20, 50, 20, 20, 50, 20));
+ borders.push_back(Border(1, 19, 180, 180, 180, 180, 80, 50, 50, 80, 50, 50, 80, 50, 50, 80, 50, 50));
+ borders.push_back(Border(1, 21, 180, 180, 180, 180, 50, 80, 50, 50, 80, 50, 50, 80, 50, 50, 80, 50));
+ borders.push_back(Border(4, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0));
+ borders.push_back(Border(4, 3, 10, 10, 10, 10, 10, 0, 0, 10, 0, 0, 10, 0, 0, 10, 0, 0));
+ borders.push_back(Border(4, 5, 20, 20, 20, 20, 20, 0, 0, 20, 0, 0, 20, 0, 0, 20, 0, 0));
+ borders.push_back(Border(4, 7, 50, 50, 50, 50, 50, 0, 0, 50, 0, 0, 50, 0, 0, 50, 0, 0));
+ borders.push_back(Border(4, 9, 80, 80, 80, 80, 80, 0, 0, 80, 0, 0, 80, 0, 0, 80, 0, 0));
+ borders.push_back(Border(4, 11, 100, 100, 100, 100, 100, 0, 0, 100, 0, 0, 100, 0, 0, 100, 0, 0));
const rtl::OUString aFileNameBase(RTL_CONSTASCII_USTRINGPARAM("borders_ooo33."));
ScDocShellRef xDocSh = loadDoc( aFileNameBase, 0);
@@ -709,6 +725,18 @@ void ScFiltersTest::testBordersOoo33()
CPPUNIT_ASSERT_EQUAL(borders[temp].topWidth, pTop->GetWidth());
CPPUNIT_ASSERT_EQUAL(borders[temp].rightWidth, pRight->GetWidth());
CPPUNIT_ASSERT_EQUAL(borders[temp].bottomWidth, pBottom->GetWidth());
+ CPPUNIT_ASSERT_EQUAL(borders[temp].lOutWidth, pLeft->GetOutWidth());
+ CPPUNIT_ASSERT_EQUAL(borders[temp].lInWidth, pLeft->GetInWidth());
+ CPPUNIT_ASSERT_EQUAL(borders[temp].lDistance, pLeft->GetDistance());
+ CPPUNIT_ASSERT_EQUAL(borders[temp].tOutWidth, pTop->GetOutWidth());
+ CPPUNIT_ASSERT_EQUAL(borders[temp].tInWidth, pTop->GetInWidth());
+ CPPUNIT_ASSERT_EQUAL(borders[temp].tDistance, pTop->GetDistance());
+ CPPUNIT_ASSERT_EQUAL(borders[temp].rOutWidth, pRight->GetOutWidth());
+ CPPUNIT_ASSERT_EQUAL(borders[temp].rInWidth, pRight->GetInWidth());
+ CPPUNIT_ASSERT_EQUAL(borders[temp].rDistance, pRight->GetDistance());
+ CPPUNIT_ASSERT_EQUAL(borders[temp].bOutWidth, pBottom->GetOutWidth());
+ CPPUNIT_ASSERT_EQUAL(borders[temp].bInWidth, pBottom->GetInWidth());
+ CPPUNIT_ASSERT_EQUAL(borders[temp].bDistance, pBottom->GetDistance());
++temp;
}
}
More information about the Libreoffice-commits
mailing list