Skip to content

Commit 2c7d73b

Browse files
Adding a test
1 parent 12613c4 commit 2c7d73b

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

test/ArraysTests/SubVectorsTests.jl

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module SubVectorsTests
2-
2+
using Gridap
33
using Gridap.Arrays
44

55
a = collect(1:10)
@@ -13,4 +13,15 @@ pend = 9
1313
b = SubVector(a,pini,pend)
1414
test_array(b,collect(pini:pend))
1515

16+
inds = Int32[1,4,3]
17+
a = rand(10)
18+
sa = Gridap.Arrays.SubVector(a,1,5)
19+
vsa = view(sa,inds)
20+
21+
b = rand(10)
22+
vb = view(b,inds)
23+
24+
x = Base.broadcasted(+,vb,vsa)
25+
Base.materialize!(vb,x)
26+
1627
end # module

0 commit comments

Comments
 (0)