Skip to content

Commit 92e3784

Browse files
committed
(minor) adaptations to tests to accomodate indexing
1 parent ebf83a2 commit 92e3784

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ using Dictionaries: IndexError
8989
@test isstored(a, 1, 2)
9090
@test setstoredindex!(copy(a), 21, 1, 2) == [0 21; 0 0]
9191
@test_throws IndexError setstoredindex!(copy(a), 21, 2, 1)
92-
@test setunstoredindex!(copy(a), 21, 1, 2) == [0 21; 0 0]
92+
@test_throws IndexError setunstoredindex!(copy(a), 21, 1, 2) == [0 21; 0 0]
9393
@test storedlength(a) == 1
9494
@test issetequal(storedpairs(a), [CartesianIndex(1, 2) => 12])
9595
@test issetequal(storedvalues(a), [12])

examples/README.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ using Dictionaries: IndexError
8686
@test isstored(a, 1, 2)
8787
@test setstoredindex!(copy(a), 21, 1, 2) == [0 21; 0 0]
8888
@test_throws IndexError setstoredindex!(copy(a), 21, 2, 1)
89-
@test setunstoredindex!(copy(a), 21, 1, 2) == [0 21; 0 0]
89+
@test_throws IndexError setunstoredindex!(copy(a), 21, 1, 2) == [0 21; 0 0]
9090
@test storedlength(a) == 1
9191
@test issetequal(storedpairs(a), [CartesianIndex(1, 2) => 12])
9292
@test issetequal(storedvalues(a), [12])

test/test_basics.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ arrayts = (Array, JLArray)
3636
# probably we can have a trait for that. It could be based
3737
# on the `ArrayLayouts.MemoryLayout`.
3838
@allowscalar @test storedvalues(a) == a
39-
@allowscalar @test storedpairs(a) == collect(pairs(vec(a)))
39+
@allowscalar @test storedpairs(a) == pairs(a)
4040
@allowscalar for I in eachindex(a)
4141
@test getstoredindex(a, I) == a[I]
4242
@test iszero(getunstoredindex(a, I))

test/test_oneelementarray.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ elts = (Float32, Float64, Complex{Float32}, Complex{Float64})
3535
@test a[2, 2] === zero(Bool)
3636
@test storedlength(a) == 1
3737
@test collect(eachstoredindex(a)) == [CartesianIndex(1, 2)]
38-
@test storedpairs(a) == [CartesianIndex(1, 2) => 1]
39-
@test storedvalues(a) == [1]
38+
@test collect(storedpairs(a)) == [CartesianIndex(1, 2) => 1]
39+
@test collect(storedvalues(a)) == [1]
4040
end
4141

4242
for a in (OneElementArray(1, 2), OneElementVector(1, 2))
@@ -47,8 +47,8 @@ elts = (Float32, Float64, Complex{Float32}, Complex{Float64})
4747
@test a[2] === zero(Bool)
4848
@test storedlength(a) == 1
4949
@test collect(eachstoredindex(a)) == [CartesianIndex(1)]
50-
@test storedpairs(a) == [CartesianIndex(1) => 1]
51-
@test storedvalues(a) == [1]
50+
@test collect(storedpairs(a)) == [CartesianIndex(1) => 1]
51+
@test collect(storedvalues(a)) == [1]
5252
end
5353

5454
a = OneElementArray()

0 commit comments

Comments
 (0)