@@ -21,11 +21,13 @@ dx = DiffEqArray([[f(x), f2(x)] for x in t],
2121@test dx[(:a , :b )] == [(f (x), f2 (x)) for x in t]
2222@test dx[[:a , :b ], 3 ] ≈ [f (t[3 ]), f2 (t[3 ])]
2323@test dx[[:a , :b ], 4 : 5 ] ≈ vcat (f .(t[4 : 5 ])' , f2 .(t[4 : 5 ])' )
24+ @test dx[solvedvariables] == dx[allvariables] == dx[[:a , :b ]]
25+ @test dx[solvedvariables, 3 ] == dx[allvariables, 3 ] == dx[[:a , :b ], 3 ]
2426@test getp (dx, [:p , :q ])(dx) == [1.0 , 2.0 ]
2527@test getp (dx, :p )(dx) == 1.0
2628@test getp (dx, :q )(dx) == 2.0
27- @test_deprecated dx[:p ]
28- @test_deprecated dx[[:p , :q ]]
29+ @test_throws Exception dx[:p ]
30+ @test_throws Exception dx[[:p , :q ]]
2931@test dx[:t ] == t
3032
3133@test symbolic_container (dx) isa SymbolCache
@@ -35,11 +37,12 @@ dx = DiffEqArray([[f(x), f2(x)] for x in t],
3537@test is_parameter .((dx,), [:a , :b , :p , :q , :t ]) == [false , false , true , true , false ]
3638@test parameter_index .((dx,), [:a , :b , :p , :q , :t ]) == [nothing , nothing , 1 , 2 , nothing ]
3739@test is_independent_variable .((dx,), [:a , :b , :p , :q , :t ]) == [false , false , false , false , true ]
38- @test variable_symbols (dx) == [:a , :b ]
40+ @test variable_symbols (dx) == all_variable_symbols (dx) == [:a , :b ]
3941@test parameter_symbols (dx) == [:p , :q ]
4042@test independent_variable_symbols (dx) == [:t ]
4143@test is_time_dependent (dx)
4244@test constant_structure (dx)
45+ @test all_symbols (dx) == [:a , :b , :p , :q , :t ]
4346
4447dx = DiffEqArray ([[f (x), f2 (x)] for x in t], t; variables = [:a , :b ])
4548@test_throws Exception dx[nothing ] # make sure it isn't storing [nothing] as indepsym
0 commit comments