@@ -3,7 +3,6 @@ module TestIndexing
3
3
using NullableArrays
4
4
import NullableArrays: unsafe_getindex_notnull,
5
5
unsafe_getvalue_notnull
6
- import Base: _checkbounds
7
6
8
7
x = NullableArray (Int, (5 , 2 ))
9
8
@@ -170,28 +169,23 @@ module TestIndexing
170
169
@test isequal (unsafe_getvalue_notnull (X, 1 ), 1 )
171
170
@test isequal (unsafe_getvalue_notnull (X, 2 ), 2 )
172
171
173
- # ----- test Base._checkbounds -----#
172
+ # ----- test Base.checkbounds -----#
174
173
175
174
X = NullableArray ([1 : 10 ... ])
176
175
b = vcat (false , fill (true , 9 ))
177
176
178
- # Base._checkbounds {T<:Real}(sz::Int, x::Nullable{T})
179
- @test_throws NullException _checkbounds ( 1 , Nullable (1 , true ))
180
- @test _checkbounds ( 10 , Nullable (1 )) == true
177
+ # Base.checkbounds {T<:Real}(::Type{Bool}, sz::Int, x::Nullable{T})
178
+ @test_throws NullException checkbounds (Bool, 1 , Nullable (1 , true ))
179
+ @test checkbounds (Bool, 10 , Nullable (1 )) == true
181
180
@test isequal (X[Nullable (1 )], Nullable (1 ))
182
181
183
- # Base._checkbounds(sz::Int, X::NullableVector{Bool})
184
- @test _checkbounds (5 , NullableArray ([true , false , true , false , true ]))
185
- @test_throws (BoundsError,
186
- _checkbounds (5 ,
187
- NullableArray ([true , false , true , true ])
188
- )
189
- )
182
+ # Base.checkbounds(::Type{Bool}, sz::Int, X::NullableVector{Bool})
183
+ @test checkbounds (Bool, 5 , NullableArray ([true , false , true , false , true ]))
190
184
@test isequal (X[b], NullableArray ([2 : 10 ... ]))
191
185
192
- # Base._checkbounds {T<:Real}(sz::Int, I::NullableArray{T})
193
- @test _checkbounds ( 10 , NullableArray ([1 : 10 ... ]))
194
- @test _checkbounds ( 10 , NullableArray ([10 , 11 ])) == false
186
+ # Base.checkbounds {T<:Real}(::Type{Bool}, sz::Int, I::NullableArray{T})
187
+ @test checkbounds (Bool, 10 , NullableArray ([1 : 10 ... ]))
188
+ @test checkbounds (Bool, 10 , NullableArray ([10 , 11 ])) == false
195
189
@test_throws BoundsError checkbounds (X, NullableArray ([10 , 11 ]))
196
190
197
191
# ---- test Base.to_index -----#
0 commit comments