Sha256: 9140746f8922ec9f81418d51b13dffd7e175fa6a68ac59bc8b39295059830a49

Contents?: true

Size: 673 Bytes

Versions: 2

Compression:

Stored size: 673 Bytes

Contents

# encoding: UTF-8
require File.join(File.dirname(__FILE__),'test_helper')
require 'test/unit'

class RGBQuadTest < Test::Unit::TestCase
  def test_create
    color = FreeImage::RGBQuad.create(1,2,3,4)
    assert_equal(color[:red], 1)
    assert_equal(color[:green], 2)
    assert_equal(color[:blue], 3)
    assert_equal(color[:reserved], 4)
  end

  def test_=
    color1 = FreeImage::RGBQuad.create(1,2,3,4)
    color2 = FreeImage::RGBQuad.create(1,2,3,4)
    assert_equal(color1, color2)
  end

  def test_eql
    color1 = FreeImage::RGBQuad.create(1,2,3,4)
    color2 = FreeImage::RGBQuad.create(1,2,3,4)
    assert(color1.eql?(color2))
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
free-image-0.7.1 test/test_rgb_quad.rb
free-image-0.7.0 test/test_rgb_quad.rb