[cairo-commit] rcairo/test test_constants.rb,NONE,1.1

Kouhei Sutou commit at pdx.freedesktop.org
Wed Aug 13 05:05:32 PDT 2008


Committed by: kou

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

Added Files:
	test_constants.rb 
Log Message:
        * src/rb_cairo.h, src/cairo.def, src/rb_cairo_constants.c
        (Cairo::LCDFilter): add.

        * test/test_constants.rb: add.


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

class ConstantsTest < Test::Unit::TestCase
  def test_lcd_filter
    constant_name = "LCDFilter"
    unless Cairo.satisfied_version?(1, 7, 2)
      assert_false(Cairo.const_defined?(constant_name))
      return
    end

    assert_true(Cairo.const_defined?(constant_name))
    assert_equal((0..4).to_a,
                 [Cairo::LCDFilter::DEFAULT,
                  Cairo::LCDFilter::NONE,
                  Cairo::LCDFilter::INTRA_PIXEL,
                  Cairo::LCDFilter::FIR3,
                  Cairo::LCDFilter::FIR5])
  end
end



More information about the cairo-commit mailing list