Skip to content

Commit 76d8312

Browse files
gdalleamontoison
authored andcommitted
More tests
1 parent ca967ee commit 76d8312

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

test/graph.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ using Test
2323
Sᵀ.colptr == Sᵀ_true.colptr && Sᵀ.rowval == Sᵀ_true.rowval
2424
end
2525
end
26+
@testset "size" begin
27+
A = spzeros(10, 20)
28+
S = SparsityPatternCSC(A)
29+
@test size(A) == size(S)
30+
@test size(A, 1) == size(S, 1)
31+
@test size(A, 2) == size(S, 2)
32+
@test size(A, 3) == size(S, 3)
33+
@test axes(A, 1) == axes(S, 1)
34+
@test axes(A, 2) == axes(S, 2)
35+
end
2636
@testset "getindex" begin
2737
A = sprand(Bool, 100, 100, 0.1)
2838
S = SparsityPatternCSC(A)

0 commit comments

Comments
 (0)