summaryrefslogtreecommitdiff
path: root/editeng/qa
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedricbosdo@openoffice.org>2011-01-07 13:40:44 +0100
committerCédric Bosdonnat <cedricbosdo@openoffice.org>2011-03-19 17:57:17 +0100
commitd674abd352080308f0d21ae1b4cf4a2cb4549979 (patch)
treec1b43b49f58b8ae5ae98d1136a9c2e36b7d218b5 /editeng/qa
parent9bd78655198ad497bef9872422a1004cfbf8698f (diff)
Switching the order of the SetLinesWidth arguments
Diffstat (limited to 'editeng/qa')
-rw-r--r--editeng/qa/items/borderline_test.cxx33
1 files changed, 28 insertions, 5 deletions
diff --git a/editeng/qa/items/borderline_test.cxx b/editeng/qa/items/borderline_test.cxx
index 22e76b8488f1..e7ea1a1deece 100644
--- a/editeng/qa/items/borderline_test.cxx
+++ b/editeng/qa/items/borderline_test.cxx
@@ -52,12 +52,16 @@ class BorderLineTest : public CppUnit::TestFixture
void testGuessWidthNoMatch();
void testGuessWidthThinthickSmallgap();
void testGuessWidthThinthickLargegap();
+ void testGuessWidthNostyleDouble();
+ void testGuessWidthNostyleSingle();
CPPUNIT_TEST_SUITE(BorderLineTest);
CPPUNIT_TEST(testGuessWidthDouble);
CPPUNIT_TEST(testGuessWidthNoMatch);
CPPUNIT_TEST(testGuessWidthThinthickSmallgap);
CPPUNIT_TEST(testGuessWidthThinthickLargegap);
+ CPPUNIT_TEST(testGuessWidthNostyleDouble);
+ CPPUNIT_TEST(testGuessWidthNostyleSingle);
CPPUNIT_TEST_SUITE_END();
};
@@ -67,7 +71,7 @@ void BorderLineTest::testGuessWidthDouble()
{
// Normal double case
SvxBorderLine line;
- line.SetLinesWidths( DOUBLE, TEST_WIDTH, TEST_WIDTH, TEST_WIDTH );
+ line.GuessLinesWidths( DOUBLE, TEST_WIDTH, TEST_WIDTH, TEST_WIDTH );
CPPUNIT_ASSERT_EQUAL( DOUBLE, line.GetStyle() );
CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, line.GetWidth() );
}
@@ -75,7 +79,7 @@ void BorderLineTest::testGuessWidthDouble()
void BorderLineTest::testGuessWidthNoMatch()
{
SvxBorderLine line;
- line.SetLinesWidths( DOUBLE,
+ line.GuessLinesWidths( DOUBLE,
1, 2, 3 );
CPPUNIT_ASSERT_EQUAL( DOUBLE, line.GetStyle() );
CPPUNIT_ASSERT_EQUAL( long( 0 ), line.GetWidth() );
@@ -84,9 +88,9 @@ void BorderLineTest::testGuessWidthNoMatch()
void BorderLineTest::testGuessWidthThinthickSmallgap()
{
SvxBorderLine line;
- line.SetLinesWidths( DOUBLE,
- THINTHICKSG_IN_WIDTH,
+ line.GuessLinesWidths( DOUBLE,
THINTHICKSG_OUT_WIDTH,
+ THINTHICKSG_IN_WIDTH,
THINTHICKSG_DIST_WIDTH );
CPPUNIT_ASSERT_EQUAL( THINTHICK_SMALLGAP, line.GetStyle() );
CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, line.GetWidth() );
@@ -95,14 +99,33 @@ void BorderLineTest::testGuessWidthThinthickSmallgap()
void BorderLineTest::testGuessWidthThinthickLargegap()
{
SvxBorderLine line;
- line.SetLinesWidths( DOUBLE,
+ line.GuessLinesWidths( DOUBLE,
+ THINTHICKLG_OUT_WIDTH,
THINTHICKLG_IN_WIDTH,
+ THINTHICKLG_DIST_WIDTH );
+ CPPUNIT_ASSERT_EQUAL( THINTHICK_LARGEGAP, line.GetStyle() );
+ CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, line.GetWidth() );
+}
+
+void BorderLineTest::testGuessWidthNostyleDouble()
+{
+ SvxBorderLine line;
+ line.GuessLinesWidths( NO_STYLE,
THINTHICKLG_OUT_WIDTH,
+ THINTHICKLG_IN_WIDTH,
THINTHICKLG_DIST_WIDTH );
CPPUNIT_ASSERT_EQUAL( THINTHICK_LARGEGAP, line.GetStyle() );
CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, line.GetWidth() );
}
+void BorderLineTest::testGuessWidthNostyleSingle()
+{
+ SvxBorderLine line;
+ line.GuessLinesWidths( NO_STYLE, TEST_WIDTH );
+ CPPUNIT_ASSERT_EQUAL( SOLID, line.GetStyle() );
+ CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, line.GetWidth() );
+}
+
}
CPPUNIT_PLUGIN_IMPLEMENT();