From da5bf61237b32f5e1a434a62ef1aa595276c6867 Mon Sep 17 00:00:00 2001 From: Oscar Smith Date: Wed, 15 Nov 2023 15:44:12 -0500 Subject: [PATCH] typo --- test/events_test.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/events_test.jl b/test/events_test.jl index a4062fb0..35412336 100644 --- a/test/events_test.jl +++ b/test/events_test.jl @@ -51,7 +51,8 @@ condition_dc = (u,t,integrator) -> t in tstop affect!_dc = (integrator) -> integrator.u .= 1.0 save_positions = (true,true) times_finalize_called = 0 -callback_dc = DiscreteCallback(condition_dc, affect!_dc, save_positions=save_positions, finalize=(args...)->times_finalize_called+=1) +callback_dc = DiscreteCallback(condition_dc, affect!_dc, save_positions=save_positions, + finalize=(args...)->global times_finalize_called+=1) sol = solve(prob, SRIW1(), callback=callback_dc, tstops=tstop, saveat=tstop) @test count(x->x==tstop[1], sol.t) == 2 @test count(x->x==tstop[2], sol.t) == 2