Sha256: 6eda1f2d2efe15125a7696e21c51ab569db353b0866783805a174cf11a6bbf9a

Contents?: true

Size: 630 Bytes

Versions: 1

Compression:

Stored size: 630 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__),'helper.rb'))
require 'test/unit'

require 'nio/repdec'
include Nio
require 'yaml'


class SEclass
  include StateEquivalent
  def initialize(a,b)
    @a = a
    @b = b
  end
end


class TestTools < Test::Unit::TestCase

  def setup
    
  end

  
  def test_StateEquivalent
    x = SEclass.new(11,22)
    y = SEclass.new(11,22)
    z = SEclass.new(11,23)
    xx = x
    assert_equal(true,x==xx)
    assert_equal(true,x==y)
    assert_equal(false,x==z)
    assert_equal(x.hash,xx.hash)
    assert_equal(x.hash,y.hash)
    assert_equal(false,x.hash==z.hash)
  end
  
end
 

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nio-0.2.5 test/test_tools.rb