Skip to content

Commit

Permalink
Add (dummy) test
Browse files Browse the repository at this point in the history
  • Loading branch information
lkdvos committed Jan 10, 2025
1 parent 8ff8856 commit c6d63a8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
5 changes: 3 additions & 2 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[deps]
DiagonalArrays = "74fd4be6-21e2-4f6f-823a-4360d37c7a77"
SparseArraysBase = "0d5efcca-f356-4864-8770-e1ed8d78f208"
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
DiagonalArrays = "74fd4be6-21e2-4f6f-823a-4360d37c7a77"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
SparseArraysBase = "0d5efcca-f356-4864-8770-e1ed8d78f208"
Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

Expand Down
10 changes: 8 additions & 2 deletions test/test_basics.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using Test: @test, @testset, @test_broken
using DiagonalArrays: DiagonalArrays, DiagonalArray, DiagonalMatrix, diaglength
using Test: @test, @testset, @test_broken, @inferred
using DiagonalArrays: DiagonalArrays, DiagonalArray, DiagonalMatrix, diaglength, diagonal
using SparseArraysBase: SparseArrayDOK, storedlength
using LinearAlgebra: Diagonal

@testset "Test DiagonalArrays" begin
@testset "DiagonalArray (eltype=$elt)" for elt in (
Float32, Float64, Complex{Float32}, Complex{Float64}
Expand Down Expand Up @@ -46,5 +48,9 @@ using SparseArraysBase: SparseArrayDOK, storedlength
@test storedlength(a_dest) == 2
@test a_dest isa SparseArrayDOK{elt,2}
end
@testset "diagonal" begin
@test @inferred(diagonal(rand(2))) isa AbstractMatrix
@test diagonal(zeros(Int, 2)) isa Diagonal
end
end
end

0 comments on commit c6d63a8

Please sign in to comment.