Skip to content

Commit 2947b05

Browse files
kellertuerlkdvos
authored andcommitted
refactor test suite.
1 parent 4a60118 commit 2947b05

7 files changed

Lines changed: 58 additions & 22 deletions

File tree

Project.toml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,5 @@ version = "0.1.0"
77
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
88

99
[compat]
10-
Aqua = "0.8"
1110
Dates = "1.10"
12-
SafeTestsets = "0.1"
13-
Test = "1.10"
1411
julia = "1.10"
15-
16-
[extras]
17-
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
18-
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
19-
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
20-
21-
[targets]
22-
test = ["Aqua", "Test", "SafeTestsets"]

docs/src/stopping_criterion.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ Modules = [AlgorithmsInterface]
55
Pages = ["stopping_criterion.jl"]
66
Order = [:type, :function]
77
Private = true
8-
```
8+
```
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name = "AlgorithmsInterfaceTestSuite"
2+
uuid = "876e16e5-0a55-4659-a4bc-e03625482f1c"
3+
version = "0.1.0"
4+
authors = ["Ronny Bergmann <git@ronnybergmann.net>"]
5+
6+
[deps]
7+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
8+
AlgorithmsInterface = "d1e3940c-cd12-4505-8585-b0a4b322527d"
9+
10+
[compat]
11+
Test = "1.11.0"
12+
13+
[sources]
14+
AlgorithmsInterface = {path = "../../"}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
"""
2+
AlgorithmsInterfaceTestSuite
3+
4+
A package to provide dummy algorithms and other test tools for `AlgorithmsInterface.jl`.
5+
"""
6+
module AlgorithmsInterfaceTestSuite
7+
8+
using AlgorithmsInterface
9+
10+
struct DummyAlgorithm <: Algorithm
11+
stopping_criterion::StoppingCriterion
12+
end
13+
struct DummyProblem <: Problem end
14+
mutable struct DummyState{S <: StoppingCriterionState} <: State
15+
stopping_criterion_state::S
16+
iteration::Int
17+
end
18+
19+
export DummyAlgorithm, DummyProblem, DummyState
20+
21+
end # module AlgorithmsInterfaceTestSuite

test/Project.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[deps]
2+
AlgorithmsInterface = "d1e3940c-cd12-4505-8585-b0a4b322527d"
3+
AlgorithmsInterfaceTestSuite = "876e16e5-0a55-4659-a4bc-e03625482f1c"
4+
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
5+
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
6+
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
7+
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
8+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
9+
10+
[sources]
11+
AlgorithmsInterface = {path = "../"}
12+
AlgorithmsInterfaceTestSuite = {path = "AlgorithmsInterfaceTestSuite.jl"}
13+
14+
[compat]
15+
Aqua = "0.8"
16+
SafeTestsets = "0.1"
17+
Test = "1.10"
18+
julia = "1.10"

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ using Dates
99
end
1010

1111
@safetestset "Stopping Criteria" begin
12-
include("stopping_criterion.jl")
12+
include("test_stopping_criterion.jl")
1313
end
1414

1515
@safetestset "Aqua" begin
Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
1+
using Pkg
2+
Pkg.activate(@__DIR__)
13
using Test
24
using AlgorithmsInterface
35
using Dates
4-
5-
struct DummyAlgorithm <: Algorithm
6-
stopping_criterion::StoppingCriterion
7-
end
8-
struct DummyProblem <: Problem end
9-
mutable struct DummyState{S <: StoppingCriterionState} <: State
10-
stopping_criterion_state::S
11-
iteration::Int
12-
end
6+
using AlgorithmsInterfaceTestSuite
137

148
problem = DummyProblem()
159

0 commit comments

Comments
 (0)