Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Dec 31, 2023
1 parent a9a8afc commit 19b89d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 4 additions & 4 deletions test/integrators/verner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ using Test
sol_scalar = solve(prob_scalar, alg)

# fails due to floating point issues
@test sol_ip(ts, idxs = 1) sol_scalar(ts)
@test sol_ip(ts, idxs = 1) sol_scalar(ts) atol=1e-5
end

# Vern7
Expand All @@ -35,7 +35,7 @@ using Test

sol_scalar = solve(prob_scalar, alg)

@test sol_ip(ts, idxs = 1) sol_scalar(ts)
@test sol_ip(ts, idxs = 1) sol_scalar(ts) atol=1e-5
end

# Vern8
Expand All @@ -50,7 +50,7 @@ using Test

sol_scalar = solve(prob_scalar, alg)

@test sol_ip(ts, idxs = 1) sol_scalar(ts)
@test sol_ip(ts, idxs = 1) sol_scalar(ts) atol=1e-5
end

# Vern9
Expand All @@ -65,7 +65,7 @@ using Test

sol_scalar = solve(prob_scalar, alg)

@test sol_ip(ts, idxs = 1) sol_scalar(ts)
@test sol_ip(ts, idxs = 1) sol_scalar(ts) atol=1e-5
end
end

Expand Down
7 changes: 4 additions & 3 deletions test/interface/saveat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ end

# time point of solution
if saveat isa Number
@test sol2.t == [0.0, 25.0, 50.0, 75.0, 100.0]
@test sol2.t == (save_end ? [0.0, 25.0, 50.0, 75.0, 100.0] : [0.0, 25.0, 50.0, 75.0])
else
@test sol2.t == (save_end ? [25.0, 50.0, 75.0, 100.0] : [25.0, 50.0, 75.0])
end
Expand Down Expand Up @@ -116,7 +116,8 @@ end
@test sol2.u == dde_int2.sol.u

# time points of solution
@test symdiff(sol.t, sol2.t) == [25.0, 50.0, 75.0]
@test symdiff(sol.t, sol2.t) ==
(save_end ? [25.0, 50.0, 75.0] : [100.0, 25.0, 50.0, 75.0])

# history is equal to solution above
@test sol.t == dde_int2.integrator.sol.t
Expand Down Expand Up @@ -148,5 +149,5 @@ end
MethodOfSteps(Tsit5()), saveat = _saveat, save_end = false)
add_tstop!(integ, 2.0)
solve!(integ)
@test integ.sol.t == _saveat
@test integ.sol.t == [0.0, 0.25, 0.5]
end

0 comments on commit 19b89d4

Please sign in to comment.