diff options
Diffstat (limited to 'test/matrix/test_vector.rb')
-rw-r--r-- | test/matrix/test_vector.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/matrix/test_vector.rb b/test/matrix/test_vector.rb index d8f5c778c..95a39693f 100644 --- a/test/matrix/test_vector.rb +++ b/test/matrix/test_vector.rb @@ -6,7 +6,7 @@ class TestVector < Test::Unit::TestCase @v1 = Vector[1,2,3] @v2 = Vector[1,2,3] @v3 = @v1.clone - @v4 = Vector[1,0, 2.0, 3.0] + @v4 = Vector[1.0, 2.0, 3.0] @w1 = Vector[2,3,4] end @@ -22,7 +22,7 @@ class TestVector < Test::Unit::TestCase assert_equal @v1, @v1 assert_equal @v1, @v2 assert_equal @v1, @v3 - assert_not_equal @v1, @v4 + assert_equal @v1, @v4 assert_not_equal @v1, @w1 end @@ -40,4 +40,10 @@ class TestVector < Test::Unit::TestCase assert !hash.key?(@v4) assert !hash.key?(@w1) end + + def test_hash + assert_equal @v1.hash, @v1.hash + assert_equal @v1.hash, @v2.hash + assert_equal @v1.hash, @v3.hash + end end |