diff options
Diffstat (limited to 'test/matrix/test_matrix.rb')
-rw-r--r-- | test/matrix/test_matrix.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/matrix/test_matrix.rb b/test/matrix/test_matrix.rb index 2d99cead42..79ae9b965b 100644 --- a/test/matrix/test_matrix.rb +++ b/test/matrix/test_matrix.rb @@ -62,6 +62,15 @@ class TestMatrix < Test::Unit::TestCase assert_equal @m1.hash, @m3.hash end + def test_uplus + assert_equal(@m1, +@m1) + end + + def test_negate + assert_equal(Matrix[[-1, -2, -3], [-4, -5, -6]], -@m1) + assert_equal(@m1, -(-@m1)) + end + def test_rank [ [[0]], |