summaryrefslogtreecommitdiff
path: root/test/matrix/test_matrix.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/matrix/test_matrix.rb')
-rw-r--r--test/matrix/test_matrix.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/matrix/test_matrix.rb b/test/matrix/test_matrix.rb
index 26248e5746..50ab00cca7 100644
--- a/test/matrix/test_matrix.rb
+++ b/test/matrix/test_matrix.rb
@@ -179,6 +179,7 @@ class TestMatrix < Test::Unit::TestCase
end
def test_diagonal
+ assert_equal(Matrix.empty(0, 0), Matrix.diagonal( ))
assert_equal(Matrix[[3,0,0],[0,2,0],[0,0,1]], Matrix.diagonal(3, 2, 1))
assert_equal(Matrix[[4,0,0,0],[0,3,0,0],[0,0,2,0],[0,0,0,1]], Matrix.diagonal(4, 3, 2, 1))
end