Skip to content

Commit

Permalink
test(matrices): add clement tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AnzhiZhang committed Aug 8, 2024
1 parent 46fb03f commit fc5f9d0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/matrices/clement.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# constructors
@test allequal([
Clement(5),
Clement(5, 0),
Clement{Float64}(5),
Clement{Float64}(5, 0),
])

# linear algebra functions
test_linearalgrbra_functions(Clement.(1:5))

# eltype
@test test_matrix_elements(Clement{Float32}(5))

# content
@test Clement(1) [0]
@test Clement(5) [0 1 0 0 0; 4 0 2 0 0; 0 3 0 3 0; 0 0 2 0 4; 0 0 0 1 0]
@test Clement(5, 1) [0.0 2.0 0.0 0.0 0.0; 2.0 0.0 2.449489742783178 0.0 0.0; 0.0 2.449489742783178 0.0 2.449489742783178 0.0; 0.0 0.0 2.449489742783178 0.0 2.0; 0.0 0.0 0.0 2.0 0.0]

0 comments on commit fc5f9d0

Please sign in to comment.