Skip to content

Commit 00697a7

Browse files
AayushSabharwalMasonProtter
authored andcommitted
test: add and update SII testset
1 parent f9e96d4 commit 00697a7

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

test/runtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ end
2424
@safetestset "Parsing Test" include("variable_parsing.jl")
2525
@safetestset "Simplify Test" include("simplify.jl")
2626
@safetestset "Direct Usage Test" include("direct.jl")
27+
@safetestset "SymbolicIndeingInterface test" include("symbolic_indexing_interface.jl")
2728
@safetestset "System Linearity Test" include("linearity.jl")
2829
@safetestset "Input Output Test" include("input_output_handling.jl")
2930
@safetestset "Clock Test" include("clock.jl")

test/symbolic_indexing_interface.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using ModelingToolkit, SymbolicIndexingInterface, SciMLBase
22

33
@parameters t a b
4-
@variables x(t) y(t)
4+
@variables x(t)=1.0 y(t)=2.0
55
D = Differential(t)
66
eqs = [D(x) ~ a * y + t, D(y) ~ b * t]
77
@named odesys = ODESystem(eqs, t, [x, y], [a, b])
@@ -21,6 +21,9 @@ eqs = [D(x) ~ a * y + t, D(y) ~ b * t]
2121
@test isequal(independent_variable_symbols(odesys), [t])
2222
@test is_time_dependent(odesys)
2323
@test constant_structure(odesys)
24+
@test !isempty(default_values(odesys))
25+
@test default_values(odesys)[x] == 1.0
26+
@test default_values(odesys)[y] == 2.0
2427

2528
@variables x y z
2629
@parameters σ ρ β

0 commit comments

Comments
 (0)