diff options
author | Marc-Andre Lafortune <github@marc-andre.ca> | 2020-04-30 18:00:47 -0400 |
---|---|---|
committer | Marc-Andre Lafortune <github@marc-andre.ca> | 2020-05-01 03:25:11 -0400 |
commit | 3cb038cc7a9b1e01685a7e8a513e7ac7fb56b112 (patch) | |
tree | 879208c7c3bde20cd860eef55a9780f1a1b854e1 /test/matrix | |
parent | 7d360efe92d2db11a4e51820ed2f52de36b3257f (diff) |
[ruby/matrix] Fix Matrix#orthogonal?
Diffstat (limited to 'test/matrix')
-rw-r--r-- | test/matrix/test_matrix.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/matrix/test_matrix.rb b/test/matrix/test_matrix.rb index 9206678261..f963b2d06a 100644 --- a/test/matrix/test_matrix.rb +++ b/test/matrix/test_matrix.rb @@ -800,4 +800,11 @@ class TestMatrix < Test::Unit::TestCase assert_equal false, @a3.unitary? assert_raise(Matrix::ErrDimensionMismatch) { @m1.unitary? } end + + def test_orthogonal + assert_equal true, @rot.orthogonal? + assert_equal false, ((0+1i) * @rot).orthogonal? + assert_equal false, @a3.orthogonal? + assert_raise(Matrix::ErrDimensionMismatch) { @m1.orthogonal? } + end end |