diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-14 09:11:20 +1100 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-14 09:11:20 +1100 |
commit | 1ccece2f322eae35601bf09c57ea583f8b270574 (patch) | |
tree | 0f1eb7ac832abbc42116401863188f0a591520b5 /vcl/qa | |
parent | 71d5ffba4434538e7897b288ddfa2e0a6df03dd2 (diff) |
vcl: Create mutator for bullet offset attribute in FontMetric
Mutator created for bullet offset attribute in 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 bullet offset attribute
- check equality operator on FontMetric after setting bullet offset
attribute
Change-Id: I87a76982a8b3ed697664299cb340fa35fb514c0e
Diffstat (limited to 'vcl/qa')
-rw-r--r-- | vcl/qa/cppunit/fontmetric.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/vcl/qa/cppunit/fontmetric.cxx b/vcl/qa/cppunit/fontmetric.cxx index 28657437abe8..4f82adc61698 100644 --- a/vcl/qa/cppunit/fontmetric.cxx +++ b/vcl/qa/cppunit/fontmetric.cxx @@ -28,6 +28,7 @@ public: void testBuiltInFontFlag(); void testSpacings(); void testSlant(); + void testBulletOffset(); void testEqualityOperator(); CPPUNIT_TEST_SUITE(VclFontMetricTest); @@ -36,6 +37,7 @@ public: CPPUNIT_TEST(testBuiltInFontFlag); CPPUNIT_TEST(testSpacings); CPPUNIT_TEST(testSlant); + CPPUNIT_TEST(testBulletOffset); CPPUNIT_TEST(testEqualityOperator); CPPUNIT_TEST_SUITE_END(); }; @@ -104,7 +106,6 @@ void VclFontMetricTest::testSpacings() CPPUNIT_ASSERT_EQUAL( (long) aFontMetric.GetLineHeight(), 100L ); } - void VclFontMetricTest::testSlant() { // default constructor should set scalable flag to false @@ -116,6 +117,16 @@ void VclFontMetricTest::testSlant() CPPUNIT_ASSERT_EQUAL( (long) aFontMetric.GetSlant(), 45L ); } +void VclFontMetricTest::testBulletOffset() +{ + // default constructor should set scalable flag to false + FontMetric aFontMetric; + + CPPUNIT_ASSERT_EQUAL( (long) aFontMetric.GetBulletOffset(), 0L ); + + aFontMetric.SetBulletOffset( 45 ); + CPPUNIT_ASSERT_EQUAL( (long) aFontMetric.GetBulletOffset(), 45L ); +} void VclFontMetricTest::testEqualityOperator() { |