Skip to content

Commit

Permalink
test(matrices): add hankel tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AnzhiZhang committed Aug 9, 2024
1 parent b2b41da commit 95d01a9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/matrices/hankel.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# constructors
@test allequal([
Hankel(5),
Hankel{Int}(5),
Hankel([1:5;]),
Hankel([1:5;], Int[]),
])

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

# eltype
@test test_matrix_elements(Hankel{Int32}(5))

# content
@test Hankel(5) [1 2 3 4 5; 2 3 4 5 0; 3 4 5 0 0; 4 5 0 0 0; 5 0 0 0 0]
@test Hankel([2, 4, 6], [6, 5, 4, 3, 2, 1]) [2 4 6 5 4 3; 4 6 5 4 3 2; 6 5 4 3 2 1]

0 comments on commit 95d01a9

Please sign in to comment.