summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJonathon Jongsma <jonathon.jongsma@collabora.co.uk>2008-09-10 23:34:22 -0500
committerJonathon Jongsma <jonathon.jongsma@collabora.co.uk>2008-09-10 23:34:22 -0500
commit4a51ecef0ad9196d340835f51c698dcdf0204510 (patch)
tree722001e77a6d145a9601672e6a8d8b9e6f3e0f04 /tests
parent9dd1d4f2ca9db9b748ec09f73a9e76d710ddd801 (diff)
Added Surface::get_fallback_resolution() + test
Diffstat (limited to 'tests')
-rw-r--r--tests/test-surface.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test-surface.cc b/tests/test-surface.cc
index c60fbcc..7700baf 100644
--- a/tests/test-surface.cc
+++ b/tests/test-surface.cc
@@ -102,6 +102,18 @@ void test_content()
BOOST_CHECK_EQUAL(similar->get_content(), CONTENT_ALPHA);
}
+void test_fallback_resolution()
+{
+ RefPtr<ImageSurface> surface = ImageSurface::create(FORMAT_ARGB32, 1, 1);
+ double x, y;
+ surface->get_fallback_resolution(x, y);
+ const double new_x = 94, new_y = 123;
+ surface->set_fallback_resolution(new_x, new_y);
+ surface->get_fallback_resolution(x, y);
+ BOOST_CHECK_EQUAL(x, new_x);
+ BOOST_CHECK_EQUAL(y, new_y);
+}
+
test_suite*
init_unit_test_suite(int argc, char* argv[])