summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJonathon Jongsma <jonathon.jongsma@collabora.co.uk>2008-09-10 23:14:53 -0500
committerJonathon Jongsma <jonathon.jongsma@collabora.co.uk>2008-09-10 23:14:53 -0500
commit481ee483b6cae63e3a0d52a9b507637f56f541f8 (patch)
treeef92f5db04f808746575febfc3e63ba6b9e18196 /tests
parent2597d38d1cec6ccbaa9e00835b990753389ffaa3 (diff)
Add ScaledFont::get_scale_matrix() + test
Diffstat (limited to 'tests')
-rw-r--r--tests/test-scaled-font.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test-scaled-font.cc b/tests/test-scaled-font.cc
index 0b7aeae..2bb5e69 100644
--- a/tests/test-scaled-font.cc
+++ b/tests/test-scaled-font.cc
@@ -36,6 +36,20 @@ void test_text_to_glyphs()
BOOST_CHECK_EQUAL(3, clusters.size());
}
+void test_scale_matrix()
+{
+ RefPtr<ToyFontFace> face = ToyFontFace::create("sans", FONT_SLANT_NORMAL, FONT_WEIGHT_NORMAL);
+ Matrix m;
+ cairo_matrix_init_scale(&m, 2.0, 4.0);
+ RefPtr<ScaledFont> font = ScaledFont::create(face, m, m, FontOptions());
+ BOOST_REQUIRE(font);
+
+ Matrix result;
+ font->get_scale_matrix(result);
+ // no real test, just excercising the functionality
+}
+
+
test_suite*
init_unit_test_suite(int argc, char* argv[])
{
@@ -46,6 +60,7 @@ init_unit_test_suite(int argc, char* argv[])
test->add (BOOST_TEST_CASE (&test_construction));
test->add (BOOST_TEST_CASE (&test_text_to_glyphs));
+ test->add (BOOST_TEST_CASE (&test_scale_matrix));
return test;
}