Skip to content

Commit 9e58cb2

Browse files
authored
remove setindex tests (#365)
Fix #363 which was caused by removal of `setindex` in #305
1 parent 87e65bc commit 9e58cb2

File tree

2 files changed

+0
-54
lines changed

2 files changed

+0
-54
lines changed

lib/ArrayInterfaceCore/test/runtests.jl

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ using ArrayInterfaceCore
22
using ArrayInterfaceCore: zeromatrix, undefmatrix
33
import ArrayInterfaceCore: has_sparsestruct, findstructralnz, fast_scalar_indexing, lu_instance,
44
parent_type, zeromatrix, IndicesInfo
5-
using Base: setindex
65
using LinearAlgebra
76
using Random
87
using SparseArrays
@@ -190,57 +189,6 @@ end
190189
@test !@inferred(ArrayInterfaceCore.issingular(Tridiagonal([1,2,3],[1,2,3,4],[4,5,6])))
191190
end
192191

193-
@testset "setindex" begin
194-
@testset "$(typeof(x))" for x in [
195-
zeros(3),
196-
falses(3),
197-
spzeros(3),
198-
]
199-
y = setindex(x, true, 1)
200-
@test iszero(x) # x is not mutated
201-
@test y[1] == true
202-
@test iszero(x[CartesianIndices(size(x)) .== [CartesianIndex(1)]])
203-
204-
y2 = setindex(x, one.(x), :)
205-
@test iszero(x)
206-
@test all(isone, y2)
207-
end
208-
209-
@testset "$(typeof(x))" for x in [
210-
zeros(3, 3),
211-
falses(3, 3),
212-
spzeros(3, 3),
213-
]
214-
y = setindex(x, true, 1, 1)
215-
@test iszero(x) # x is not mutated
216-
@test y[1, 1] == true
217-
@test iszero(x[CartesianIndices(size(x)) .== [CartesianIndex(1, 1)]])
218-
219-
y2 = setindex(x, one.(x), :, :)
220-
@test iszero(x)
221-
@test all(isone, y2)
222-
end
223-
224-
@testset "$(typeof(x))" for x in [
225-
zeros(3, 3, 3),
226-
falses(3, 3, 3),
227-
]
228-
y = setindex(x, true, 1, 1, 1)
229-
@test iszero(x) # x is not mutated
230-
@test y[1, 1, 1] == true
231-
@test iszero(x[CartesianIndices(size(x)) .== [CartesianIndex(1, 1, 1)]])
232-
233-
y2 = setindex(x, one.(x), :, :, :)
234-
@test iszero(x)
235-
@test all(isone, y2)
236-
end
237-
238-
@testset "string" begin
239-
x = fill("a", 2, 3)
240-
@test setindex(x, "b", 2, 1) == setindex(x, "b", CartesianIndex(2, 1)) == ["a" "a" "a";"b" "a" "a"]
241-
end
242-
end
243-
244192
@testset "Sparsity Structure" begin
245193
D=Diagonal([1,2,3,4])
246194
@test has_sparsestruct(D)

test/ranges.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ end
9595
@test ArrayInterface.static_first(Base.OneTo(one(UInt))) === static(1)
9696
@test ArrayInterface.static_step(Base.OneTo(one(UInt))) === static(1)
9797

98-
@test Base.setindex(1:5, [6,2], 1:2) == [6,2,3,4,5]
99-
10098
@test @inferred(eachindex(static(-7):static(7))) === static(1):static(15)
10199
@test @inferred((static(-7):static(7))[first(eachindex(static(-7):static(7)))]) == -7
102100

0 commit comments

Comments
 (0)