Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
lgoettgens committed Oct 7, 2024
1 parent 04a8a07 commit 8e6312e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/Matrix-test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,26 @@ end
@test T == matrix(QQ, [42 0 0; 0 42 0; 0 0 42])
end

@testset "Matrix.conversion" begin
U, t = polynomial_ring(QQ, "t")

R = matrix_ring(U, 2)
S = matrix_space(U, 2, 2)
a = U.([1 2; t^2 (t-1)]) # Matrix
Ra = R(a) # MatRingElem
Sa = S(a) # MatElem
@test Ra == R(Ra)
@test Ra == R(Sa)
@test Sa == S(Sa)
@test Sa == S(Ra)
@test matrix(Ra) == Sa
@test matrix(U, Ra) == Ra
@test matrix(Sa) == Sa
@test matrix(U, Sa) == Sa
@test Matrix(Ra) == a
@test Matrix(Sa) == a
end

@testset "Strassen" begin
S = matrix(QQ, rand(-10:10, 100, 100))
T = S*S
Expand Down

0 comments on commit 8e6312e

Please sign in to comment.