From 120a1b939cf6f6c364ab393c09e9d0dbeaff725f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Tue, 21 May 2024 14:08:35 +0200 Subject: [PATCH] Add tests --- test/matmul.jl | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/test/matmul.jl b/test/matmul.jl index 4563882..dccc043 100644 --- a/test/matmul.jl +++ b/test/matmul.jl @@ -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