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

Kouhei Sutou commit at pdx.freedesktop.org
Thu Aug 14 05:37:53 PDT 2008


Committed by: kou

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

Modified Files:
	test_surface.rb 
Added Files:
	test_scaled_font.rb 
Log Message:
        * src/rb_cairo_scaled_font.c: support Cairo::ScaledFont#scale_matrix.

        * test/test_scaled_font.rb: add.

        * src/rb_cairo_matrix.c (cr_matrix_equal): add Cairo::Matrix#==.


--- NEW FILE: test_scaled_font.rb ---
require 'cairo'

class ScaledFontTest < Test::Unit::TestCase
  include CairoTestUtils

  def test_scale_matrix
    only_cairo_version(1, 7, 2)

    surface = Cairo::ImageSurface.new(100, 100)
    context = Cairo::Context.new(surface)
    scaled_font = context.scaled_font

    assert_equal(Cairo::Matrix.new(10.0, 0.0, 0.0,
                                   10.0, 0.0, 0.0),
                 scaled_font.scale_matrix)
  end
end

Index: test_surface.rb
===================================================================
RCS file: /cvs/cairo/rcairo/test/test_surface.rb,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- test_surface.rb	14 Aug 2008 08:21:57 -0000	1.2
+++ test_surface.rb	14 Aug 2008 12:37:51 -0000	1.3
@@ -2,6 +2,8 @@
 require 'stringio'
 
 class SurfaceTest < Test::Unit::TestCase
+  include CairoTestUtils
+
   def test_new
     output = StringIO.new
     surface = Cairo::PDFSurface.new(output, 10, 10)



More information about the cairo-commit mailing list