@@ -1075,50 +1075,6 @@ end
10751075 @test ! isassigned (v, 1 , 2 ) # inbounds but not assigned
10761076 @test ! isassigned (v, 3 , 3 ) # out-of-bounds
10771077 end
1078-
1079- @testset " _unsetindex!" begin
1080- function test_unsetindex (A, B)
1081- copyto! (A, B)
1082- for i in eachindex (A)
1083- @test ! isassigned (A, i)
1084- end
1085- inds = eachindex (A)
1086- @test_throws BoundsError Base. _unsetindex! (A, last (inds) + oneunit (eltype (inds)))
1087- end
1088- @testset " dest IndexLinear, src IndexLinear" begin
1089- for p in (fill (BigInt (2 )), BigInt[1 , 2 ], BigInt[1 2 ; 3 4 ])
1090- A = view (copy (p), ntuple (_-> :, ndims (p))... )
1091- B = view (similar (A), ntuple (_-> :, ndims (p))... )
1092- test_unsetindex (A, B)
1093- test_unsetindex (p, B)
1094- end
1095- end
1096-
1097- @testset " dest IndexLinear, src IndexCartesian" begin
1098- for p in (fill (BigInt (2 )), BigInt[1 , 2 ], BigInt[1 2 ; 3 4 ])
1099- A = view (copy (p), ntuple (_-> :, ndims (p))... )
1100- B = view (similar (A), axes (A)... )
1101- test_unsetindex (A, B)
1102- test_unsetindex (p, B)
1103- end
1104- end
1105-
1106- @testset " dest IndexCartesian, src IndexLinear" begin
1107- for p in (fill (BigInt (2 )), BigInt[1 , 2 ], BigInt[1 2 ; 3 4 ])
1108- A = view (p, axes (p)... )
1109- B = similar (A)
1110- test_unsetindex (A, B)
1111- end
1112- end
1113-
1114- @testset " dest IndexCartesian, src IndexCartesian" begin
1115- for p in (fill (BigInt (2 )), BigInt[1 , 2 ], BigInt[1 2 ; 3 4 ])
1116- A = view (p, axes (p)... )
1117- B = view (similar (A), axes (A)... )
1118- test_unsetindex (A, B)
1119- end
1120- end
1121- end
11221078end
11231079
11241080@testset " aliasing check with reshaped subarrays" begin
0 commit comments