File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -12,23 +12,13 @@ __init__() = INLINE_TEST[] = gensym()
12
12
function tests (m)
13
13
inline_test:: Symbol = m ∈ (InlineTest, InlineTest. InlineTestTest) ? :__INLINE_TEST__ : INLINE_TEST[]
14
14
if ! isdefined (m, inline_test)
15
- @eval m $ inline_test = Dict {AbstractString, Expr} ()
15
+ @eval m $ inline_test = Expr[]
16
16
end
17
17
getfield (m, inline_test)
18
18
end
19
19
20
20
function addtest (args:: Tuple , m:: Module )
21
- n = findfirst (a -> a isa String, args)
22
- desc = n === nothing ? nothing : args[n]
23
- desc != = nothing && haskey (tests (m), desc) && @warn (" Test $desc already defined for module $(string (m)) , overwriting" )
24
- if desc === nothing
25
- i = 1
26
- while haskey (tests (m), " anonymous test $i " )
27
- i += 1
28
- end
29
- desc = " anonymous test $i "
30
- end
31
- tests (m)[desc] = :(@testset ($ (args... )))
21
+ push! (tests (m), :(@testset ($ (args... ))))
32
22
nothing
33
23
end
34
24
@@ -37,7 +27,7 @@ macro addtest(args...)
37
27
end
38
28
39
29
function runtests (m:: Module )
40
- tss = collect ( values ( tests (m)) )
30
+ tss = tests (m)
41
31
tsm = :(@testset $ (" Tests for module $m " ) begin
42
32
$ (tss... )
43
33
end )
You can’t perform that action at this time.
0 commit comments