diff --git a/test/test_simulations.jl b/test/test_simulations.jl index ee384cf298..3e650b91bb 100644 --- a/test/test_simulations.jl +++ b/test/test_simulations.jl @@ -153,9 +153,17 @@ function run_basic_simulation_tests(arch) simulation.callbacks[:tester] = Callback(capture_call_time, schedule, parameters=called_at) run!(simulation) - @show called_at @test all(called_at .≈ 0.0:schedule.interval:simulation.stop_time) + + # Test that minimum_relative_step is running correctly + final_time = 1.0 + 1e-11 + simulation = Simulation(model, Δt=1, stop_time=final_time, minimum_relative_step=1e-10) + run!(simulation) + + @test simulation.model.clock.time == final_time + @test simulation.model.clock.iteration == 1 + return nothing end