Skip to content

Commit

Permalink
test: test new parameter indexing, SymbolCache, ParameterTimeseriesCo…
Browse files Browse the repository at this point in the history
…llection
  • Loading branch information
AayushSabharwal committed May 13, 2024
1 parent 8b0eae4 commit 0e3b047
Show file tree
Hide file tree
Showing 6 changed files with 436 additions and 138 deletions.
3 changes: 3 additions & 0 deletions test/example_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ sys = SystemMockup(true, [:x, :y, :z], [:a, :b, :c], :t)
@test all(.!is_parameter.((sys,), [:x, :y, :z, :t, :p, :q, :r]))
@test all(parameter_index.((sys,), [:c, :a, :b]) .== [3, 1, 2])
@test all(parameter_index.((sys,), [:x, :y, :z, :t, :p, :q, :r]) .=== nothing)
@test all(.!is_timeseries_parameter.((sys,), [:x, :y, :z, :t, :p, :q, :r])) # fallback even if not implemented
@test all(timeseries_parameter_index.((sys,), [:x, :y, :z, :t, :p, :q, :r]) .=== nothing) # fallback
@test is_independent_variable(sys, :t)
@test all(.!is_independent_variable.((sys,), [:x, :y, :z, :a, :b, :c, :p, :q, :r]))
@test all(is_observed.((sys,), [:x, :y, :z, :a, :b, :c, :t]))
Expand All @@ -88,6 +90,7 @@ sys = SystemMockup(true, [:x, :y, :z], [:a, :b, :c], :t)
@test independent_variable_symbols(sys) == [:t]
@test all_variable_symbols(sys) == [:x, :y, :z]
@test sort(all_symbols(sys)) == [:a, :b, :c, :t, :x, :y, :z]
@test default_values(sys) == Dict() # fallback even if not implemented

sys = SystemMockup(true, [:x, :y, :z], [:a, :b, :c], nothing)

Expand Down
Loading

0 comments on commit 0e3b047

Please sign in to comment.