[cairo-commit] rcairo/test test_surface.rb,1.1,1.2

Kouhei Sutou commit at pdx.freedesktop.org
Thu Aug 14 01:21:59 PDT 2008


Committed by: kou

Update of /cvs/cairo/rcairo/test
In directory kemper:/tmp/cvs-serv22951/test

Modified Files:
	test_surface.rb 
Log Message:
        * src/rb_cairo_surface.c: support Cairo::Surface#fallback_resolution.

        * test/test_surface.rb (SurfaceTest#test_fallback_resolution): add
        a test for Cairo::Surface#fallback_resolution.


Index: test_surface.rb
===================================================================
RCS file: /cvs/cairo/rcairo/test/test_surface.rb,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- test_surface.rb	20 Jun 2008 02:08:47 -0000	1.1
+++ test_surface.rb	14 Aug 2008 08:21:57 -0000	1.2
@@ -25,4 +25,14 @@
       end
     end
   end
+
+  def test_fallback_resolution
+    surface = Cairo::ImageSurface.new(100, 100)
+
+    assert_equal([300.0, 300.0], surface.fallback_resolution)
+
+    only_cairo_version(1, 7, 2)
+    surface.set_fallback_resolution(95, 95)
+    assert_equal([95.0, 95.0], surface.fallback_resolution)
+  end
 end



More information about the cairo-commit mailing list