diff --git a/lib/ArrayInterfaceCore/test/runtests.jl b/lib/ArrayInterfaceCore/test/runtests.jl index 08abb4f9a..c7157fcd0 100644 --- a/lib/ArrayInterfaceCore/test/runtests.jl +++ b/lib/ArrayInterfaceCore/test/runtests.jl @@ -2,7 +2,6 @@ using ArrayInterfaceCore using ArrayInterfaceCore: zeromatrix, undefmatrix import ArrayInterfaceCore: has_sparsestruct, findstructralnz, fast_scalar_indexing, lu_instance, parent_type, zeromatrix, IndicesInfo -using Base: setindex using LinearAlgebra using Random using SparseArrays @@ -190,57 +189,6 @@ end @test !@inferred(ArrayInterfaceCore.issingular(Tridiagonal([1,2,3],[1,2,3,4],[4,5,6]))) end -@testset "setindex" begin - @testset "$(typeof(x))" for x in [ - zeros(3), - falses(3), - spzeros(3), - ] - y = setindex(x, true, 1) - @test iszero(x) # x is not mutated - @test y[1] == true - @test iszero(x[CartesianIndices(size(x)) .== [CartesianIndex(1)]]) - - y2 = setindex(x, one.(x), :) - @test iszero(x) - @test all(isone, y2) - end - - @testset "$(typeof(x))" for x in [ - zeros(3, 3), - falses(3, 3), - spzeros(3, 3), - ] - y = setindex(x, true, 1, 1) - @test iszero(x) # x is not mutated - @test y[1, 1] == true - @test iszero(x[CartesianIndices(size(x)) .== [CartesianIndex(1, 1)]]) - - y2 = setindex(x, one.(x), :, :) - @test iszero(x) - @test all(isone, y2) - end - - @testset "$(typeof(x))" for x in [ - zeros(3, 3, 3), - falses(3, 3, 3), - ] - y = setindex(x, true, 1, 1, 1) - @test iszero(x) # x is not mutated - @test y[1, 1, 1] == true - @test iszero(x[CartesianIndices(size(x)) .== [CartesianIndex(1, 1, 1)]]) - - y2 = setindex(x, one.(x), :, :, :) - @test iszero(x) - @test all(isone, y2) - end - - @testset "string" begin - x = fill("a", 2, 3) - @test setindex(x, "b", 2, 1) == setindex(x, "b", CartesianIndex(2, 1)) == ["a" "a" "a";"b" "a" "a"] - end -end - @testset "Sparsity Structure" begin D=Diagonal([1,2,3,4]) @test has_sparsestruct(D) diff --git a/test/ranges.jl b/test/ranges.jl index 098bfc435..a5d4888b2 100644 --- a/test/ranges.jl +++ b/test/ranges.jl @@ -95,8 +95,6 @@ end @test ArrayInterface.static_first(Base.OneTo(one(UInt))) === static(1) @test ArrayInterface.static_step(Base.OneTo(one(UInt))) === static(1) -@test Base.setindex(1:5, [6,2], 1:2) == [6,2,3,4,5] - @test @inferred(eachindex(static(-7):static(7))) === static(1):static(15) @test @inferred((static(-7):static(7))[first(eachindex(static(-7):static(7)))]) == -7