Sha256: da379a467976231d200cae1e435d54d9970b461efed0e8adb94b4b17451f1b90

Contents?: true

Size: 818 Bytes

Versions: 145

Compression:

Stored size: 818 Bytes

Contents

class TestColor < Test::Unit::TestCase
  def test_initialize
    only_poppler_version(0, 7, 2)
    rose = Poppler::Color.new(65535, 0, 32639)
    assert_equal([65535, 0, 32639], [rose.red, rose.green, rose.blue])
    assert_equal([65535, 0, 32639], rose.to_a)
  end

  def test_accessor
    only_poppler_version(0, 7, 2)
    white = Poppler::Color.new(65535, 65535, 65535)
    red = white.dup
    red.green = 0
    red.blue = 0
    assert_equal([65535, 65535, 65535], [white.red, white.green, white.blue])
    assert_equal([65535, 0, 0], [red.red, red.green, red.blue])
  end

  def test_inspect
    only_poppler_version(0, 7, 2)
    color = Poppler::Color.new(0, 32767, 65535)
    rgb = '[0, 32767, 65535]'
    assert_match(/\A#<Poppler::Color:.*: #{Regexp.escape(rgb)}>\z/,
                 color.inspect)
  end
end

Version data entries

145 entries across 145 versions & 1 rubygems

Version Path
poppler-3.1.8-x64-mingw32 test/test_color.rb
poppler-3.1.8-x86-mingw32 test/test_color.rb
poppler-3.1.8 test/test_color.rb
poppler-3.1.7-x64-mingw32 test/test_color.rb
poppler-3.1.7-x86-mingw32 test/test_color.rb
poppler-3.1.7 test/test_color.rb
poppler-3.1.6-x64-mingw32 test/test_color.rb
poppler-3.1.6-x86-mingw32 test/test_color.rb
poppler-3.1.6 test/test_color.rb
poppler-3.1.5-x64-mingw32 test/test_color.rb
poppler-3.1.5-x86-mingw32 test/test_color.rb
poppler-3.1.4-x64-mingw32 test/test_color.rb
poppler-3.1.4-x86-mingw32 test/test_color.rb
poppler-3.1.4 test/test_color.rb
poppler-3.1.3-x64-mingw32 test/test_color.rb
poppler-3.1.3-x86-mingw32 test/test_color.rb
poppler-3.1.3 test/test_color.rb
poppler-3.1.2-x64-mingw32 test/test_color.rb
poppler-3.1.2-x86-mingw32 test/test_color.rb
poppler-3.1.2 test/test_color.rb