Skip to content

Commit

Permalink
Merge pull request #331 from gaurav-arya/ag-tspan
Browse files Browse the repository at this point in the history
Add test for Coevolve calling user-provided funcs with t beyond tspan
  • Loading branch information
isaacsas committed Jul 25, 2023
2 parents f75cdfa + 4aa3cce commit d888ba3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/variable_rate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,17 @@ end
# Test that rate, urate and lrate do not get called past tstop
# https://github.com/SciML/JumpProcesses.jl/issues/330
let
test_rate(u, p, t) = 0.1
function test_rate(u, p, t)
if t > 1.0
error("test_rate does not handle t > 1.0")
else
return 0.1
end
end
test_affect!(integrator) = (integrator.u[1] += 1)
function test_lrate(u, p, t)
if t > 1.0
error("test_urate does not handle t > 1.0")
error("test_lrate does not handle t > 1.0")
else
return 0.05
end
Expand Down

0 comments on commit d888ba3

Please sign in to comment.