File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ runtests(ARGS)
3535
3636### Filtering
3737
38- ` runtests ` takes a second argument that acts as a filter function
38+ ` runtests ` takes a keyword argument that acts as a filter function
3939
4040``` julia
4141function testfilter (test)
@@ -45,9 +45,22 @@ function testfilter(test)
4545 return true
4646end
4747
48- runtests (ARGS , testfilter)
48+ runtests (ARGS ; testfilter)
4949```
5050
51+ ### Provide defaults
52+
53+ ` runtests ` takes a keyword argument that one can use to provide default definitions to be loaded before each testfile.
54+ As an example one could always load ` Test ` and the package under test.
55+
56+ ``` julia
57+ const init_code = quote
58+ using Test
59+ using MyPackage
60+ end
61+
62+ runtests (ARGS ; init_code)
63+ ```
5164
5265## Inspiration
5366Based on [ @maleadt ] ( https://github.com/maleadt ) test infrastructure for [ CUDA.jl] ( https://github.com/JuliaGPU/CUDA.jl ) .
You can’t perform that action at this time.
0 commit comments