From f5392e2c28c03967b83342602231743f1c85358c Mon Sep 17 00:00:00 2001 From: Francesco Alemanno Date: Fri, 6 Mar 2020 08:45:14 +0100 Subject: [PATCH] added test for CartesianIndex iterator --- test/runtests.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index 42fa1c7..ed1bba9 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -2,7 +2,6 @@ using Test using DefaultArrays using LinearAlgebra @testset "Basic Tests" begin - A=DefaultArray(Inf,(2,3)) A[1,2]=2 @test maximum(A)==Inf @@ -11,6 +10,7 @@ using LinearAlgebra A[4]=3.0 @test A[4]==A[2,2] @test all(collect(eachnondefault(A)).==[4, 3]) + @test collect(eachnondefault(A,IndexCartesian())) == [CartesianIndex(2, 2), CartesianIndex(1, 2)] B=DefaultArray(Inf,(3,)) B[3]=2 @test B[3]==2