Skip to content

Commit 8dd5144

Browse files
committed
Add a test for solve!
1 parent b4cbbe3 commit 8dd5144

2 files changed

Lines changed: 18 additions & 13 deletions

File tree

test/newton.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,7 @@ end
6565
solution2 = solve(problem, algorithm2)
6666
@test solution2 sqrt(a)
6767
@test abs(solution2 - sqrt(a)) < abs(solution1 - sqrt(a))
68+
state3 = initialize_state(problem, algorithm2)
69+
solve!(problem, algorithm2, state3)
70+
@test state3.iterate == solution2
6871
end

test/runtests.jl

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,21 @@ using SafeTestsets
44
using AlgorithmsInterface
55
using Dates
66

7-
@safetestset "Newton" begin
8-
include("newton.jl")
9-
end
7+
@safetestset "AlgorithmsInterface.jl" begin
8+
@safetestset "Newton" begin
9+
include("newton.jl")
10+
end
1011

11-
@safetestset "Stopping Criteria" begin
12-
include("stopping_criterion.jl")
13-
end
12+
@safetestset "Stopping Criteria" begin
13+
include("stopping_criterion.jl")
14+
end
1415

15-
@safetestset "Logging Infrastructure" begin
16-
include("logging.jl")
17-
end
16+
@safetestset "Logging Infrastructure" begin
17+
include("logging.jl")
18+
end
1819

19-
@safetestset "Aqua" begin
20-
using AlgorithmsInterface, Aqua
21-
Aqua.test_all(AlgorithmsInterface)
22-
end
20+
@safetestset "Aqua" begin
21+
using AlgorithmsInterface, Aqua
22+
Aqua.test_all(AlgorithmsInterface)
23+
end
24+
end

0 commit comments

Comments
 (0)