Skip to content

Commit 2d61006

Browse files
test: add tests for getu
1 parent a35b208 commit 2d61006

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/symbolic_indexing_interface_test.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ dx = DiffEqArray([[f(x), f2(x)] for x in t],
2929
@test_throws Exception dx[:p]
3030
@test_throws Exception dx[[:p, :q]]
3131
@test dx[:t] == t
32+
geta = getu(dx, :a)
33+
get_arr = getu(dx, [:a, :b])
34+
get_tuple = getu(dx, (:a, :b))
35+
@test geta(dx) == dx[1, :]
36+
@test get_arr(dx) == vcat.(dx[1, :], dx[2, :])
37+
@test get_tuple(dx) == tuple.(dx[1, :], dx[2, :])
3238

3339
@test symbolic_container(dx) isa SymbolCache
3440
@test parameter_values(dx) == [1.0, 2.0]

0 commit comments

Comments
 (0)