Skip to content

Commit 9d05d68

Browse files
author
Jack Dunham
committed
Add test for single element EachRegion types
1 parent 89c787b commit 9d05d68

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/solvers/test_iterators.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,17 @@ end
189189
@test prob.data[1:2:end] == fill(1, 5)
190190
@test prob.data[2:2:end] == fill(2, 5)
191191

192+
193+
let i = 1, prob = TestIteratorUtils.TestProblem([])
194+
SI = SweepIterator(prob, 1)
195+
cb = []
196+
for _ in eachregion(SI)
197+
push!(cb, i)
198+
i += 1
199+
end
200+
@test length(cb) == 2
201+
end
202+
192203
end
193204
end
194205
end

0 commit comments

Comments
 (0)