Skip to content

Commit a4c6ad5

Browse files
test: improve test checking
1 parent fc62ff1 commit a4c6ad5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/parameter_dependencies.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ end
184184
sys = mtkcompile(pendulum_sys)
185185

186186
new_tunables = [L, b]
187+
old_tunables = copy(ModelingToolkit.tunable_parameters(sys, ModelingToolkit.parameters(sys)))
187188
sys2 = ModelingToolkit.subset_tunables(sys, new_tunables)
188189
sys2_tunables = ModelingToolkit.tunable_parameters(sys2, ModelingToolkit.parameters(sys2))
189190
@test length(sys2_tunables) == 2
@@ -199,7 +200,7 @@ end
199200
sys_nonsplit = mtkcompile(pendulum_sys; split = false)
200201
@test_throws ArgumentError ModelingToolkit.subset_tunables(sys_nonsplit, new_tunables)
201202

202-
@test length(ModelingToolkit.tunable_parameters(sys)) == 3
203+
@test length(ModelingToolkit.tunable_parameters(sys)) == length(old_tunables)
203204
end
204205

205206
struct CallableFoo

0 commit comments

Comments
 (0)