File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -26,19 +26,22 @@ macro addtest(args...)
26
26
Expr (:call , :addtest , args, __module__)
27
27
end
28
28
29
- function runtests (m:: Module )
30
- tss = tests (m)
31
- tsm = :(@testset $ (" Tests for module $m " ) begin
32
- $ (tss... )
33
- end )
34
- Core. eval (m, tsm)
29
+ function runtests (m:: Module ; wrap:: Bool = false )
30
+ Core. eval (m,
31
+ if wrap
32
+ :(@testset $ (" Tests for module $m " ) begin
33
+ $ (tests (m)... )
34
+ end )
35
+ else
36
+ Expr (:block , tests (m)... )
37
+ end )
35
38
nothing
36
39
end
37
40
38
- function runtests ()
41
+ function runtests (; wrap :: Bool = true )
39
42
foreach (values (Base. loaded_modules)) do m
40
43
if isdefined (m, INLINE_TEST[]) # will automatically skip InlineTest and InlineTest.InlineTestTest
41
- ts = runtests (m)
44
+ ts = runtests (m, wrap = wrap )
42
45
end
43
46
end
44
47
end
@@ -57,6 +60,7 @@ end # module InlineTestTest
57
60
@assert typeof (@__MODULE__ ) == Module
58
61
@test 1 != 2
59
62
runtests (InlineTestTest)
63
+ runtests (InlineTestTest, wrap= true )
60
64
end
61
65
62
66
end # module InlineTest
You can’t perform that action at this time.
0 commit comments