Skip to content

Commit 480e52f

Browse files
ChrisRackauckas-ClaudeChrisRackauckasclaude
authored
Use SciMLTesting v1.2 folder-based run_tests (#44)
Convert the test suite to the SciMLTesting v1.2 folder-discovery model: - runtests.jl becomes `using SciMLTesting; run_tests()`. - Core: the monolithic core.jl is split into self-contained top-level files (unit_tests.jl, end_to_end_tests.jl, issue_3.jl, commutation_tests.jl), each run isolated in its own @safetestset by folder discovery. The previously unconditional "Invalid usage error path" testset becomes a self-contained Core file (invalid_usage_tests.jl) β€” it is a macro-correctness unit test that belongs to Core; CI still exercises it on the Core lane. - QA stays at test/qa/ with its existing qa.jl + Project.toml sub-env. - SciMLTesting + SafeTestsets added to the main test env and the QA sub-env; Pkg dropped from the test env (no test file uses it; the harness owns Pkg ops). test_groups.toml unchanged. - Removed the checked-in test/Manifest.toml: it is gitignored and was stale after the dependency change, so Pkg re-resolves it fresh. Core's assertion set is preserved exactly (42 @test/@test_throws before and after, including the moved invalid-usage check). Per the v1.2 folder semantics the QA group is its own CI lane and is not part of the local `All` default. Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 0ad4889 commit 480e52f

10 files changed

Lines changed: 245 additions & 341 deletions

β€Žtest/Manifest.tomlβ€Ž

Lines changed: 0 additions & 80 deletions
This file was deleted.

β€Žtest/Project.tomlβ€Ž

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
[deps]
2-
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
32
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
3+
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
4+
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
45
Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb"
56
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
67

78
[compat]
9+
SafeTestsets = "0.0.1, 0.1"
10+
SciMLTesting = "1"
811
Suppressor = "0.2.8"
12+
Test = "1"

β€Žtest/commutation_tests.jlβ€Ž

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
using ConcreteStructs
2+
using Test
3+
4+
# this has been working for a while already
5+
Base.@kwdef @concrete struct Foo2{T <: Real}
6+
x::T = 1.0
7+
y = true
8+
z = 42
9+
end
10+
11+
foo = Foo2()
12+
@test typeof(foo) === Foo2{Float64, Bool, Int64}
13+
14+
# this is new
15+
@concrete Base.@kwdef struct Foo3{T <: Real}
16+
x::T = 1.0
17+
y = true
18+
z = 42
19+
end
20+
21+
foo = Foo3()
22+
@test typeof(foo) === Foo3{Float64, Bool, Int64}
23+
24+
foo = Foo3(z = [1, 2, 3])
25+
@test typeof(foo) === Foo3{Float64, Bool, Vector{Int64}}
26+
27+
# terse test case, unfortunately doesn't work the other way around. But also never did.
28+
@concrete terse Base.@kwdef struct TerseKWDef
29+
a = 1.0
30+
b = true
31+
end
32+
terse_kw_def = TerseKWDef(b = false)
33+
@test typeof(terse_kw_def) === TerseKWDef{Float64, Bool}

β€Žtest/core.jlβ€Ž

Lines changed: 0 additions & 237 deletions
This file was deleted.

0 commit comments

Comments
Β (0)