|
24 | 24 | _clean(x::Variable) = x |
25 | 25 | function test_diffeq_inference(name, sys, iv, dvs, ps) |
26 | 26 | @testset "ODESystem construction: $name" begin |
27 | | - @test independent_variables(sys) == Set([_clean(iv)]) |
28 | | - @test dependent_variables(sys) == Set(_clean.(dvs)) |
29 | | - @test parameters(sys) == Set(_clean.(ps)) |
| 27 | + @test independent_variable(sys) == _clean(iv) |
| 28 | + @test Set(states(sys)) == Set(_clean.(dvs)) |
| 29 | + @test Set(parameters(sys)) == Set(_clean.(ps)) |
30 | 30 | end |
31 | 31 | end |
32 | 32 | function test_nlsys_inference(name, sys, vs, ps) |
33 | 33 | @testset "NonlinearSystem construction: $name" begin |
34 | | - @test dependent_variables(sys) == Set(vs) |
35 | | - @test parameters(sys) == Set(_clean.(ps)) |
| 34 | + @test Set(states(sys)) == Set(vs) |
| 35 | + @test Set(parameters(sys)) == Set(_clean.(ps)) |
36 | 36 | end |
37 | 37 | end |
38 | 38 |
|
39 | | -test_diffeq_inference("standard", de, t, (x, y, z), (σ, ρ, β)) |
| 39 | +test_diffeq_inference("standard", de, t, [x, y, z], [ρ, σ, β]) |
40 | 40 | generate_function(de, [x,y,z], [σ,ρ,β]) |
41 | 41 | jac_expr = generate_jacobian(de) |
42 | 42 | jac = calculate_jacobian(de) |
|
0 commit comments