Skip to content

Commit 9db0c9a

Browse files
committed
Fix docs and improve coverage
1 parent e2ec370 commit 9db0c9a

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

docs/src/reference/containers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Containers.DenseAxisArray
88
Containers.SparseAxisArray
99
Containers.container
1010
Containers.rowtable
11-
Conntainers.AutoContainerType
11+
Containers.AutoContainerType
1212
Containers.default_container
1313
Containers.@container
1414
Containers.VectorizedProductIterator

src/Containers/SparseAxisArray.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ function Base.setindex!(
100100
end
101101

102102
function _kwargs_to_args(d::SparseAxisArray{T,N}; kwargs...) where {T,N}
103+
if length(kwargs) != N
104+
throw(BoundsError(d, kwargs))
105+
end
103106
return ntuple(N) do i
104107
kw = keys(kwargs)[i]
105108
if d.names[i] != kw

test/Containers/test_SparseAxisArray.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,8 @@ function test_containers_sparseaxisarray_kwarg_indexing()
286286
),
287287
y[i = 2, 2],
288288
)
289+
@test_throws(BoundsError, y[i = 2] = 1)
290+
@test_throws(BoundsError, y[2] = 1)
289291
return
290292
end
291293

0 commit comments

Comments
 (0)