@@ -219,15 +219,35 @@ end
219219 @test label (ad[Block (2 )]) == U1 (- 1 )
220220 @test label (ad[Block (2 )[1 : 1 ]]) == U1 (- 1 )
221221
222- I = mortar ([Block (2 )[1 : 1 ]])
223- g = ad[I]
224- @test length (g) == 1
225- @test label (first (g)) == U1 (- 1 )
226- @test isdual (g[Block (1 )])
222+ v = ad[mortar ([Block (2 )[1 : 1 ]])]
223+ @test v isa AbstractVector{LabelledInteger{Int64,U1}}
224+ @test length (v) == 1
225+ @test label (first (v)) == U1 (- 1 )
226+ @test unlabel (first (v)) == 3
227+ @test isdual (v[Block (1 )])
228+ @test isdual (axes (v, 1 ))
229+ @test blocklabels (axes (v, 1 )) == [U1 (- 1 )]
227230
228- @test isdual (axes (ad[[Block (1 )]], 1 )) # used in view(::BlockSparseVector, [Block(1)])
229- @test isdual (axes (ad[mortar ([Block (1 )[1 : 1 ]])], 1 )) # used in view(::BlockSparseVector, [Block(1)[1:1]])
230- @test isdual (axes (ad[mortar ([[Block (1 )], [Block (2 )]])]))
231+ v = ad[[Block (2 )]]
232+ @test v isa AbstractVector{LabelledInteger{Int64,U1}}
233+ @test isdual (axes (v, 1 )) # used in view(::BlockSparseVector, [Block(1)])
234+ @test label (first (v)) == U1 (- 1 )
235+ @test unlabel (first (v)) == 3
236+ @test blocklabels (axes (v, 1 )) == [U1 (- 1 )]
237+
238+ v = ad[mortar ([Block (2 )[1 : 1 ]])]
239+ @test v isa AbstractVector{LabelledInteger{Int64,U1}}
240+ @test isdual (axes (v, 1 )) # used in view(::BlockSparseVector, [Block(1)[1:1]])
241+ @test label (first (v)) == U1 (- 1 )
242+ @test unlabel (first (v)) == 3
243+ @test blocklabels (axes (v, 1 )) == [U1 (- 1 )]
244+
245+ v = ad[mortar ([[Block (2 )], [Block (1 )]])]
246+ @test v isa AbstractVector{LabelledInteger{Int64,U1}}
247+ @test isdual (axes (v, 1 ))
248+ @test label (first (v)) == U1 (- 1 )
249+ @test unlabel (first (v)) == 3
250+ @test blocklabels (axes (v, 1 )) == [U1 (- 1 ), U1 (0 )]
231251 end
232252end
233253
0 commit comments