Skip to content

Commit

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

# linear algebra functions
test_linearalgrbra_functions(Hadamard.((2) .^ (1:4)))

# eltype
@test test_matrix_elements(Hadamard{Int32}(4))

# content
@test Hadamard(4) [1 1 1 1; 1 -1 1 -1; 1 1 -1 -1; 1 -1 -1 1]
@test Hadamard(8) [1 1 1 1 1 1 1 1; 1 -1 1 -1 1 -1 1 -1; 1 1 -1 -1 1 1 -1 -1; 1 -1 -1 1 1 -1 -1 1; 1 1 1 1 -1 -1 -1 -1; 1 -1 1 -1 -1 1 -1 1; 1 1 -1 -1 -1 -1 1 1; 1 -1 -1 1 -1 1 1 -1]

0 comments on commit a5dbb7d

Please sign in to comment.