Sha256: da2c49eedbe18a6c33d38afe283cd6940f5b3c0c63653f911df83fb882ba7a8d
Contents?: true
Size: 1.01 KB
Versions: 33
Compression:
Stored size: 1.01 KB
Contents
require 'cairo' class FontOptionsTest < Test::Unit::TestCase include CairoTestUtils def setup @options = Cairo::FontOptions.new end sub_test_case "#==" do test "not FontOptions" do assert do !(@options == nil) end end test "same object" do assert do @options == @options end end test "same content" do assert do @options == @options.dup end end end sub_test_case "#eql? and #hash" do test "not FontOptions" do object = Object.new options = @options object.singleton_class.__send__(:define_method, :hash) do options.hash end hash = { object => :value, } assert_nil(hash[@options]) end test "same object" do hash = { @options => :value, } assert_equal(:value, hash[@options]) end test "same content" do hash = { @options => :value, } assert_equal(:value, hash[@options.dup]) end end end
Version data entries
33 entries across 33 versions & 1 rubygems