summaryrefslogtreecommitdiff
path: root/vcl/qa
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2016-01-14 08:15:40 +1100
committerChris Sherlock <chris.sherlock79@gmail.com>2016-01-14 08:15:40 +1100
commita5bc28e073c2dd1eb8ad733687dc827e6bac31bd (patch)
treed9e35aa7471acbc4fc449e94d0b4f14fe21059c9 /vcl/qa
parent23acda53f70857cac41fc2c877441f91e592d2d0 (diff)
vcl: Create mutator for line height attribute in FontMetric
Mutator created for line height in attribute FontMetric. See commit description in 8bfccd3a71d911b6d ("vcl: Create accessor and mutator for font scaling in FontMetric") for reasoning behind patch. Unit tests - check to ensure that can get and set line height attribute - check equality operator on FontMetric after setting line height attribute Change-Id: I86dff217fa24850b5f9d04a17ddda464dfb0156a
Diffstat (limited to 'vcl/qa')
-rw-r--r--vcl/qa/cppunit/fontmetric.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/vcl/qa/cppunit/fontmetric.cxx b/vcl/qa/cppunit/fontmetric.cxx
index 07fc0e6d170f..3093783d3c8b 100644
--- a/vcl/qa/cppunit/fontmetric.cxx
+++ b/vcl/qa/cppunit/fontmetric.cxx
@@ -33,8 +33,8 @@ public:
CPPUNIT_TEST(testScalableFlag);
CPPUNIT_TEST(testFullstopCenteredFlag);
CPPUNIT_TEST(testBuiltInFontFlag);
- CPPUNIT_TEST(testEqualityOperator);
CPPUNIT_TEST(testSpacings);
+ CPPUNIT_TEST(testEqualityOperator);
CPPUNIT_TEST_SUITE_END();
};
@@ -83,6 +83,8 @@ void VclFontMetricTest::testSpacings()
CPPUNIT_ASSERT_EQUAL( (long) aFontMetric.GetDescent(), 0L );
CPPUNIT_ASSERT_EQUAL( (long) aFontMetric.GetExternalLeading(), 0L );
CPPUNIT_ASSERT_EQUAL( (long) aFontMetric.GetInternalLeading(), 0L );
+ CPPUNIT_ASSERT_EQUAL( (long) aFontMetric.GetLineHeight(), 0L );
+
aFontMetric.SetAscent( 100 );
CPPUNIT_ASSERT_EQUAL( (long) aFontMetric.GetAscent(), 100L );
@@ -95,6 +97,9 @@ void VclFontMetricTest::testSpacings()
aFontMetric.SetInternalLeading( 100L );
CPPUNIT_ASSERT_EQUAL( (long) aFontMetric.GetInternalLeading(), 100L );
+
+ aFontMetric.SetLineHeight( 100L );
+ CPPUNIT_ASSERT_EQUAL( (long) aFontMetric.GetLineHeight(), 100L );
}