Skip to content

Commit

Permalink
Fixed tests using Floats
Browse files Browse the repository at this point in the history
  • Loading branch information
fgittins committed Apr 29, 2024
1 parent 5ddd166 commit bad6a77
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/core/muller_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
@testset "Quadratic function" begin
f(u, p) = u^2 - p

u0 = (10, 20, 30)
p = 612
u0 = (10.0, 20.0, 30.0)
p = 612.0
prob = NonlinearProblem{false}(f, u0, p)
sol = solve(prob, SimpleMuller())

@test sol.u 612

u0 = (-10, -20, -30)
u0 = (-10.0, -20.0, -30.0)
prob = NonlinearProblem{false}(f, u0, p)
sol = solve(prob, SimpleMuller())

Expand All @@ -19,13 +19,13 @@
@testset "Sine function" begin
f(u, p) = sin(u)

u0 = (1, 2, 3)
u0 = (1.0, 2.0, 3.0)
prob = NonlinearProblem{false}(f, u0)
sol = solve(prob, SimpleMuller())

@test sol.u π

u0 = (2, 4, 6)
u0 = (2.0, 4.0, 6.0)
prob = NonlinearProblem{false}(f, u0)
sol = solve(prob, SimpleMuller())

Expand All @@ -35,19 +35,19 @@
@testset "Exponential-sine function" begin
f(u, p) = exp(-u)*sin(u)

u0 = (-2, -3, -4)
u0 = (-2.0, -3.0, -4.0)
prob = NonlinearProblem{false}(f, u0)
sol = solve(prob, SimpleMuller())

@test sol.u -π

u0 = (-1, 0, 1/2)
u0 = (-1.0, 0.0, 1/2)
prob = NonlinearProblem{false}(f, u0)
sol = solve(prob, SimpleMuller())

@test sol.u 0

u0 = (-1, 0, 1)
u0 = (-1.0, 0.0, 1.0)
prob = NonlinearProblem{false}(f, u0)
sol = solve(prob, SimpleMuller())

Expand Down

0 comments on commit bad6a77

Please sign in to comment.