Skip to content

Commit 910f7de

Browse files
committed
Test a system that should have a guess
1 parent f9226f9 commit 910f7de

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/initializationsystem.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,3 +456,11 @@ sys = structural_simplify(unsimp; fully_determined = false)
456456
sys = extend(sysx, sysy)
457457
@test length(equations(generate_initializesystem(sys))) == 2
458458
@test length(ModelingToolkit.guesses(sys)) == 1
459+
460+
# https://github.com/SciML/ModelingToolkit.jl/issues/2873
461+
@testset "Error on missing defaults" begin
462+
@variables x(t) y(t)
463+
@named sys = ODESystem([x^2 + y^2 ~ 25, D(x) ~ 1], t)
464+
ssys = structural_simplify(sys)
465+
@test_throws ArgumentError ODEProblem(ssys, [x => 3], (0, 1), []) # y should have a guess
466+
end

0 commit comments

Comments
 (0)