Skip to content

Commit

Permalink
Test a system that really should have a guess
Browse files Browse the repository at this point in the history
  • Loading branch information
hersle committed Jul 18, 2024
1 parent 53e2aad commit ff443e4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/initializationsystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -456,3 +456,11 @@ sys = structural_simplify(unsimp; fully_determined = false)
sys = extend(sysx, sysy)
@test length(equations(generate_initializesystem(sys))) == 2
@test length(ModelingToolkit.guesses(sys)) == 1

# https://github.com/SciML/ModelingToolkit.jl/issues/2873
@testset "Error on missing defaults" begin
@variables x(t) y(t)
@named sys = ODESystem([x^2 + y^2 ~ 25, D(x) ~ 1], t)
ssys = structural_simplify(sys)
@test_throws ArgumentError prob = ODEProblem(ssys, [x => 3], (0, 1), [] #=; guesses = [y => 5]=#)
end

0 comments on commit ff443e4

Please sign in to comment.