File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -22,10 +22,31 @@ function addtest(args::Tuple, m::Module)
22
22
nothing
23
23
end
24
24
25
+ """
26
+ @addtest args...
27
+
28
+ Similar to `@testset args...`, but the contained tests are not run immediately,
29
+ and are instead stored for later execution, triggered by `runtests()`.
30
+ Invocations of `@addtest` should appear only at the top level, and not be nested
31
+ (`@testset` can be nested within `@addtest`).
32
+ Internally, `@addtest` is converted to `@testset` at execution time.
33
+ """
25
34
macro addtest (args... )
26
35
Expr (:call , :addtest , args, __module__)
27
36
end
28
37
38
+ """
39
+ runtests([m::Module]; [wrap::Bool])
40
+
41
+ Run all the tests declared in `@addtest` blocks, within `m` if specified,
42
+ or within all currently loaded modules otherwise.
43
+ The `wrap` keyword specifies whether the collection of `@testset` blocks derived
44
+ from `@addtest` declarations should be grouped within a top-level `@testset`.
45
+ The default is `wrap=false` when `m` is specified, `true` otherwise.
46
+
47
+ Note: this function executes each `@testset` block using `eval` *within* the module
48
+ in which the corresponding `@addtest` block was written (e.g. `m`, when specified).
49
+ """
29
50
function runtests (m:: Module ; wrap:: Bool = false )
30
51
Core. eval (m,
31
52
if wrap
You can’t perform that action at this time.
0 commit comments