Sha256: 68c7c6b7eb2d80c0735271990ea558e3eaffee53ffbddc6be6c7839623cdbdfc

Contents?: true

Size: 716 Bytes

Versions: 80

Compression:

Stored size: 716 Bytes

Contents

class TestColor < Test::Unit::TestCase
  def test_initialize
    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
    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
    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

80 entries across 80 versions & 1 rubygems

Version Path
poppler-3.3.6 test/test-color.rb
poppler-3.3.5 test/test-color.rb
poppler-3.3.4 test/test-color.rb
poppler-3.3.3 test/test-color.rb
poppler-3.3.2 test/test-color.rb
poppler-3.3.1 test/test-color.rb
poppler-3.3.0 test/test-color.rb
poppler-3.2.9-x64-mingw32 test/test-color.rb
poppler-3.2.9-x86-mingw32 test/test-color.rb
poppler-3.2.9 test/test-color.rb
poppler-3.2.8-x64-mingw32 test/test-color.rb
poppler-3.2.8-x86-mingw32 test/test-color.rb
poppler-3.2.8 test/test-color.rb
poppler-3.2.7-x64-mingw32 test/test-color.rb
poppler-3.2.7-x86-mingw32 test/test-color.rb
poppler-3.2.7 test/test-color.rb
poppler-3.2.6-x64-mingw32 test/test-color.rb
poppler-3.2.6-x86-mingw32 test/test-color.rb
poppler-3.2.6 test/test-color.rb
poppler-3.2.5-x64-mingw32 test/test-color.rb