Skip to content

Commit 5688466

Browse files
authored
Put each test file in a testset (#263)
1 parent 69fb150 commit 5688466

File tree

1 file changed

+78
-53
lines changed

1 file changed

+78
-53
lines changed

test/runtests.jl

+78-53
Original file line numberDiff line numberDiff line change
@@ -2,60 +2,85 @@ using Test
22

33
const TESTDIR = dirname(@__FILE__)
44

5-
test_println(kind, f, pad = " ") = println(pad, "testing $(kind): `$(f)`...")
5+
test_println(kind, f, pad=" ") = println(pad, "testing $(kind): `$(f)`...")
66

77
@testset "ReverseDiff" begin
88

9-
println("running TapeTests...")
10-
t = @elapsed include(joinpath(TESTDIR, "TapeTests.jl"))
11-
println("done (took $t seconds).")
12-
13-
println("running TrackedTests...")
14-
t = @elapsed include(joinpath(TESTDIR, "TrackedTests.jl"))
15-
println("done (took $t seconds).")
16-
17-
println("running MacrosTests...")
18-
t = @elapsed include(joinpath(TESTDIR, "MacrosTests.jl"))
19-
println("done (took $t seconds).")
20-
21-
println("running ChainRulesTests...")
22-
t = @elapsed include(joinpath(TESTDIR, "ChainRulesTests.jl"))
23-
println("done (took $t seconds).")
24-
25-
println("running ScalarTests...")
26-
t = @elapsed include(joinpath(TESTDIR, "derivatives/ScalarTests.jl"))
27-
println("done (took $t seconds).")
28-
29-
println("running LinAlgTests...")
30-
t = @elapsed include(joinpath(TESTDIR, "derivatives/LinAlgTests.jl"))
31-
println("done (took $t seconds).")
32-
33-
println("running ElementwiseTests...")
34-
t = @elapsed include(joinpath(TESTDIR, "derivatives/ElementwiseTests.jl"))
35-
println("done (took $t seconds).")
36-
37-
println("running ArrayFunctionTests...")
38-
t = @elapsed include(joinpath(TESTDIR, "derivatives/ArrayFunctionTests.jl"))
39-
println("done (took $t seconds).")
40-
41-
println("running GradientTests...")
42-
t = @elapsed include(joinpath(TESTDIR, "api/GradientTests.jl"))
43-
println("done (took $t seconds).")
44-
45-
println("running JacobianTests...")
46-
t = @elapsed include(joinpath(TESTDIR, "api/JacobianTests.jl"))
47-
println("done (took $t seconds).")
48-
49-
println("running HessianTests...")
50-
t = @elapsed include(joinpath(TESTDIR, "api/HessianTests.jl"))
51-
println("done (took $t seconds).")
52-
53-
println("running ConfigTests...")
54-
t = @elapsed include(joinpath(TESTDIR, "api/ConfigTests.jl"))
55-
println("done (took $t seconds).")
56-
57-
println("running CompatTests...")
58-
t = @elapsed include(joinpath(TESTDIR, "compat/CompatTests.jl"))
59-
println("done (took $t seconds).")
60-
9+
@testset "TapeTests" begin
10+
println("running TapeTests...")
11+
t = @elapsed include(joinpath(TESTDIR, "TapeTests.jl"))
12+
println("done (took $t seconds).")
13+
end
14+
15+
@testset "TrackedTests" begin
16+
println("running TrackedTests...")
17+
t = @elapsed include(joinpath(TESTDIR, "TrackedTests.jl"))
18+
println("done (took $t seconds).")
19+
end
20+
21+
@testset "MacrosTests" begin
22+
println("running MacrosTests...")
23+
t = @elapsed include(joinpath(TESTDIR, "MacrosTests.jl"))
24+
println("done (took $t seconds).")
25+
end
26+
27+
@testset "ChainRulesTests" begin
28+
println("running ChainRulesTests...")
29+
t = @elapsed include(joinpath(TESTDIR, "ChainRulesTests.jl"))
30+
println("done (took $t seconds).")
31+
end
32+
33+
@testset "ScalarTests" begin
34+
println("running ScalarTests...")
35+
t = @elapsed include(joinpath(TESTDIR, "derivatives/ScalarTests.jl"))
36+
println("done (took $t seconds).")
37+
end
38+
39+
@testset "LinAlgTests" begin
40+
println("running LinAlgTests...")
41+
t = @elapsed include(joinpath(TESTDIR, "derivatives/LinAlgTests.jl"))
42+
println("done (took $t seconds).")
43+
end
44+
45+
@testset "ElementWiseTests" begin
46+
println("running ElementwiseTests...")
47+
t = @elapsed include(joinpath(TESTDIR, "derivatives/ElementwiseTests.jl"))
48+
println("done (took $t seconds).")
49+
end
50+
51+
@testset "ArrayFunctionTests" begin
52+
println("running ArrayFunctionTests...")
53+
t = @elapsed include(joinpath(TESTDIR, "derivatives/ArrayFunctionTests.jl"))
54+
println("done (took $t seconds).")
55+
end
56+
57+
@testset "GradientTests" begin
58+
println("running GradientTests...")
59+
t = @elapsed include(joinpath(TESTDIR, "api/GradientTests.jl"))
60+
println("done (took $t seconds).")
61+
end
62+
63+
@testset "JacobianTests" begin
64+
println("running JacobianTests...")
65+
t = @elapsed include(joinpath(TESTDIR, "api/JacobianTests.jl"))
66+
println("done (took $t seconds).")
67+
end
68+
69+
@testset "HessianTests" begin
70+
println("running HessianTests...")
71+
t = @elapsed include(joinpath(TESTDIR, "api/HessianTests.jl"))
72+
println("done (took $t seconds).")
73+
end
74+
75+
@testset "ConfigTests" begin
76+
println("running ConfigTests...")
77+
t = @elapsed include(joinpath(TESTDIR, "api/ConfigTests.jl"))
78+
println("done (took $t seconds).")
79+
end
80+
81+
@testset "CompatTests" begin
82+
println("running CompatTests...")
83+
t = @elapsed include(joinpath(TESTDIR, "compat/CompatTests.jl"))
84+
println("done (took $t seconds).")
85+
end
6186
end

0 commit comments

Comments
 (0)