Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat committed May 21, 2024
1 parent 0eec4b7 commit 120a1b9
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions test/matmul.jl
Original file line number Diff line number Diff line change
Expand Up @@ -471,19 +471,14 @@ function test_sparse_vector_sum(::Type{T}) where {T}
x = SparseArrays.sparsevec([1, 3], T[5, 7])
y = copy(x)
z = copy(y)
alloc_test(() -> MA.operate!(+, y, z), 0)
alloc_test(() -> MA.operate!(-, y, z), 0)
alloc_test(() -> MA.add!!(y, z), 0)
alloc_test(() -> MA.sub!!(y, z), 0)
alloc_test(() -> MA.operate_to!(x, +, y, z), 0)
alloc_test(() -> MA.operate_to!(x, -, y, z), 0)
alloc_test(() -> MA.add_to!!(x, y, z), 0)
alloc_test(() -> MA.sub_to!!(x, y, z), 0)
alloc_test(() -> MA.add_to!!(x, y), 0)
alloc_test(() -> MA.sub_to!!(x, y), 0)
alloc_test(() -> MA.operate_to!(x, +, y), 0)
alloc_test(() -> MA.operate_to!(x, -, y), 0)
return
end

@testset "Array sum" begin
test_array_sum(Int)
test_sparse_vector_sum(Int)
end

0 comments on commit 120a1b9

Please sign in to comment.