File tree Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 14
14
matrix :
15
15
julia-version : ['~1.7.0-beta4', 'nightly']
16
16
nthreads : ['1', '2']
17
+ assertion : ['false']
18
+ include :
19
+ - julia-version : ' ~1.7.0-beta4'
20
+ nthreads : ' 2'
21
+ assertion : ' true'
17
22
fail-fast : false
18
- name : Test Julia ${{ matrix.julia-version }} nthreads=${{ matrix.nthreads }}
23
+ name : Test Julia ${{ matrix.julia-version }} nthreads=${{ matrix.nthreads }} assertion=${{ matrix.assertion }}
19
24
steps :
20
25
- uses : actions/checkout@v2
21
26
- name : Setup julia
27
32
- uses : julia-actions/julia-runtest@v1
28
33
env :
29
34
JULIA_NUM_THREADS : ${{ matrix.nthreads }}
35
+ CONCURRENTCOLLECTIONS_JL_ASSERTION : ${{ matrix.assertion }}
30
36
- uses : julia-actions/julia-processcoverage@v1
31
37
- uses : codecov/codecov-action@v1
32
38
with :
Original file line number Diff line number Diff line change 4
4
assertion_enabled () = false
5
5
# assertion_enabled() = true
6
6
7
+ function enable_assertion ()
8
+ prev = assertion_enabled ()
9
+ @eval assertion_enabled () = true
10
+ return prev
11
+ end
12
+
7
13
@noinline unreachable () = error (" unreachable reached" )
8
14
9
15
@noinline unexpected (x) = error (" unexpected value: $x " )
Original file line number Diff line number Diff line change
1
+ if lowercase (get (ENV , " CONCURRENTCOLLECTIONS_JL_ASSERTION" , " false" )) == " true"
2
+ import ConcurrentCollections
3
+ ConcurrentCollections. Implementations. enable_assertion ()
4
+ @assert ConcurrentCollections. Implementations. assertion_enabled ()
5
+ @info " ConcurrentCollections: Assertion enabled"
6
+ else
7
+ @info " ConcurrentCollections: Assertion disenabled (default)"
8
+ end
9
+
1
10
using TestFunctionRunner
2
11
TestFunctionRunner. @run (paths = [" ../benchmark/ConcurrentCollectionsBenchmarks" ])
You can’t perform that action at this time.
0 commit comments