diff options
author | Jonathon Jongsma <jonathon.jongsma@collabora.co.uk> | 2008-09-10 22:47:12 -0500 |
---|---|---|
committer | Jonathon Jongsma <jonathon.jongsma@collabora.co.uk> | 2008-09-10 22:47:12 -0500 |
commit | c8592727d0c28d3d748717d0ce9dc30668da440f (patch) | |
tree | 30fbe440b84a3b8935167f9c05a74af59edef891 /tests | |
parent | 8068f0861a6012f1275918ca787c91b2cce1e688 (diff) |
Add Context::has_show_text_glyphs() + test
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-context.cc | 13 |
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; } |