summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJonathon Jongsma <jonathon.jongsma@collabora.co.uk>2008-09-10 22:47:12 -0500
committerJonathon Jongsma <jonathon.jongsma@collabora.co.uk>2008-09-10 22:47:12 -0500
commitc8592727d0c28d3d748717d0ce9dc30668da440f (patch)
tree30fbe440b84a3b8935167f9c05a74af59edef891 /tests
parent8068f0861a6012f1275918ca787c91b2cce1e688 (diff)
Add Context::has_show_text_glyphs() + test
Diffstat (limited to 'tests')
-rw-r--r--tests/test-context.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test-context.cc b/tests/test-context.cc
index 471581d..fee9565 100644
--- a/tests/test-context.cc
+++ b/tests/test-context.cc
@@ -352,6 +352,18 @@ void test_font_options()
BOOST_CHECK(options == other);
}
+void test_show_text_glyphs()
+{
+ // image surface doesn't support show_text_glyphs
+ Cairo::RefPtr<Cairo::Surface> surf = Cairo::ImageSurface::create(Cairo::FORMAT_ARGB32, 10, 10); \
+ Cairo::RefPtr<Cairo::Context> cr = Cairo::Context::create(surf);
+ BOOST_CHECK(!cr->has_show_text_glyphs());
+ // but pdf surface should
+ surf = Cairo::PdfSurface::create("test.pdf", 10.0, 10.0);
+ cr = Cairo::Context::create(surf);
+ BOOST_CHECK(cr->has_show_text_glyphs());
+}
+
test_suite*
init_unit_test_suite(int argc, char* argv[])
{
@@ -379,6 +391,7 @@ init_unit_test_suite(int argc, char* argv[])
test->add (BOOST_TEST_CASE (&test_target));
test->add (BOOST_TEST_CASE (&test_scaled_font));
test->add (BOOST_TEST_CASE (&test_font_options));
+ test->add (BOOST_TEST_CASE (&test_show_text_glyphs));
return test;
}