@@ -21,11 +21,13 @@ dx = DiffEqArray([[f(x), f2(x)] for x in t],
21
21
@test dx[(:a , :b )] == [(f (x), f2 (x)) for x in t]
22
22
@test dx[[:a , :b ], 3 ] ≈ [f (t[3 ]), f2 (t[3 ])]
23
23
@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 ]
24
26
@test getp (dx, [:p , :q ])(dx) == [1.0 , 2.0 ]
25
27
@test getp (dx, :p )(dx) == 1.0
26
28
@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 ]]
29
31
@test dx[:t ] == t
30
32
31
33
@test symbolic_container (dx) isa SymbolCache
@@ -35,11 +37,12 @@ dx = DiffEqArray([[f(x), f2(x)] for x in t],
35
37
@test is_parameter .((dx,), [:a , :b , :p , :q , :t ]) == [false , false , true , true , false ]
36
38
@test parameter_index .((dx,), [:a , :b , :p , :q , :t ]) == [nothing , nothing , 1 , 2 , nothing ]
37
39
@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 ]
39
41
@test parameter_symbols (dx) == [:p , :q ]
40
42
@test independent_variable_symbols (dx) == [:t ]
41
43
@test is_time_dependent (dx)
42
44
@test constant_structure (dx)
45
+ @test all_symbols (dx) == [:a , :b , :p , :q , :t ]
43
46
44
47
dx = DiffEqArray ([[f (x), f2 (x)] for x in t], t; variables = [:a , :b ])
45
48
@test_throws Exception dx[nothing ] # make sure it isn't storing [nothing] as indepsym
0 commit comments