Sha256: c1da5484a2f6e2409df165da7317cbb0baf027ec335d6a82c7b56d8416ae685a
Contents?: true
Size: 1.16 KB
Versions: 5
Compression:
Stored size: 1.16 KB
Contents
require 'cairo' class ConstantsTest < Test::Unit::TestCase def test_text_cluster_flags constant_name = "TextClusterFlag" unless Cairo.satisfied_version?(1, 7, 6) assert_false(Cairo.const_defined?(constant_name)) return end assert_true(Cairo.const_defined?(constant_name)) assert_equal((0..1).to_a, [0, Cairo::TextClusterFlag::BACKWARD]) end def test_new_constants_since_1_14_0 if Cairo.satisfied_version?(1, 14, 0) assertion = :assert_const_defined else assertion = :assert_not_const_defined end send(assertion, Cairo::MimeType, :JBIG2) send(assertion, Cairo::MimeType, :JBIG2_GLOBAL) send(assertion, Cairo::MimeType, :JBIG2_GLOBAL_ID) end def test_new_constants_since_1_17_8 if Cairo.satisfied_version?(1, 17, 8) assert_const_defined(Cairo::ColorMode, :DEFAULT) assert_const_defined(Cairo::ColorMode, :COLOR) assert_const_defined(Cairo::ColorMode, :NO_COLOR) assert_const_defined(Cairo::ColorPalette, :DEFAULT) else assert_not_const_defined(Cairo, :ColorMode) assert_not_const_defined(Cairo, :ColorPalette) end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
cairo-1.17.13 | test/test_constants.rb |
cairo-1.17.12 | test/test_constants.rb |
cairo-1.17.11 | test/test_constants.rb |
cairo-1.17.10 | test/test_constants.rb |
cairo-1.17.9 | test/test_constants.rb |