Skip to content

Commit

Permalink
fix a few tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Feb 29, 2024
1 parent 82cb87c commit 7fb84b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/systems/diffeqs/abstractodesystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ function process_DEProblem(constructor, sys::AbstractODESystem, u0map, parammap;

# TODO: Pass already computed information to varmap_to_vars call
# in process_u0? That would just be a small optimization
varmap = isempty(u0map) || eltype(u0map) <: Number ? defaults(sys) :
varmap = (u0map !== nothing && isempty(u0map)) || eltype(u0map) <: Number ? defaults(sys) :

Check warning on line 867 in src/systems/diffeqs/abstractodesystem.jl

View check run for this annotation

Codecov / codecov/patch

src/systems/diffeqs/abstractodesystem.jl#L867

Added line #L867 was not covered by tests
merge(defaults(sys), todict(u0map))
varlist = collect(map(unwrap, dvs))
missingvars = setdiff(varlist, collect(keys(varmap)))

Check warning on line 870 in src/systems/diffeqs/abstractodesystem.jl

View check run for this annotation

Codecov / codecov/patch

src/systems/diffeqs/abstractodesystem.jl#L869-L870

Added lines #L869 - L870 were not covered by tests
Expand Down
4 changes: 2 additions & 2 deletions test/initializationsystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ sol = solve(prob, Tsit5())

## Late binding initialization_eqs

function System(; name)
function System2(; name)
vars = @variables begin
dx(t), [guess = 0]
ddx(t), [guess = 0]
Expand All @@ -371,7 +371,7 @@ function System(; name)
return ODESystem(eqs, t, vars, []; name, initialization_eqs)
end

@mtkbuild sys = System()
@mtkbuild sys = System2()
prob = ODEProblem(sys, [], (0, 1), guesses = [sys.dx => 1])
sol = solve(prob, Tsit5())
@test SciMLBase.successful_retcode(sol)
Expand Down

0 comments on commit 7fb84b3

Please sign in to comment.