Mercurial > repos > public > sbplib_julia
comparison test/runtests.jl @ 1753:c1ebc96961a2 feature/jet_aqua
Add JET and Aqua to test suite
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 13 Sep 2024 11:35:17 +0200 |
parents | 471a948cd2b2 |
children | 5e4b2f8e9bf9 |
comparison
equal
deleted
inserted
replaced
1730:f215ac2a5c66 | 1753:c1ebc96961a2 |
---|---|
1 using Diffinitive | |
1 using Test | 2 using Test |
3 using JET | |
4 using Aqua | |
2 using Glob | 5 using Glob |
3 | 6 |
4 """ | 7 """ |
5 run_testfiles() | 8 run_testfiles() |
6 run_testfiles(path, globs) | 9 run_testfiles(path, globs) |
16 end | 19 end |
17 | 20 |
18 run_testfiles(".", globs) | 21 run_testfiles(".", globs) |
19 end | 22 end |
20 | 23 |
21 function run_testfiles(path, globs) | 24 function run_testfiles(path, globs) |
22 for name ∈ readdir(path) | 25 for name ∈ readdir(path) |
23 filepath = joinpath(path, name) | 26 filepath = joinpath(path, name) |
24 | 27 |
25 if isdir(filepath) | 28 if isdir(filepath) |
26 @testset "$name" begin | 29 @testset "$name" begin |
46 end | 49 end |
47 | 50 |
48 testsetname = isempty(ARGS) ? "Diffinitive.jl" : "["*join(ARGS, ", ")*"]" | 51 testsetname = isempty(ARGS) ? "Diffinitive.jl" : "["*join(ARGS, ", ")*"]" |
49 | 52 |
50 @testset "$testsetname" begin | 53 @testset "$testsetname" begin |
54 if isempty(ARGS) | |
55 @testset "Code quality (Aqua.jl)" begin | |
56 Aqua.test_all(Diffinitive) | |
57 end | |
58 @testset "Code linting (JET.jl)" begin | |
59 JET.test_package(Diffinitive; target_defined_modules = true) | |
60 end | |
61 end | |
62 | |
51 run_testfiles(ARGS) | 63 run_testfiles(ARGS) |
52 println() | 64 println() |
53 end | 65 end |