diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-surface.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test-surface.cc b/tests/test-surface.cc index 865d212..c60fbcc 100644 --- a/tests/test-surface.cc +++ b/tests/test-surface.cc @@ -93,6 +93,15 @@ void test_ps_eps() BOOST_CHECK_EQUAL(ps->get_eps(), !result); } +void test_content() +{ + RefPtr<ImageSurface> surface = ImageSurface::create(FORMAT_ARGB32, 1, 1); + BOOST_CHECK_EQUAL(surface->get_content(), CONTENT_COLOR_ALPHA); + RefPtr<Surface> similar = Surface::create(surface, CONTENT_ALPHA, 1, 1); + BOOST_REQUIRE(similar); + BOOST_CHECK_EQUAL(similar->get_content(), CONTENT_ALPHA); +} + test_suite* init_unit_test_suite(int argc, char* argv[]) @@ -108,6 +117,7 @@ init_unit_test_suite(int argc, char* argv[]) test->add (BOOST_TEST_CASE (&test_svg_constructor_slot)); test->add (BOOST_TEST_CASE (&test_create_from_png)); test->add (BOOST_TEST_CASE (&test_ps_eps)); + test->add (BOOST_TEST_CASE (&test_content)); return test; } |