Skip to content

Commit

Permalink
Add match_mode example for test_logs (#33975)
Browse files Browse the repository at this point in the history
  • Loading branch information
MatFi authored and c42f committed Dec 3, 2019
1 parent d945adf commit 84e8392
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions stdlib/Test/src/logging.jl
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ If we also wanted to test the debug messages, these need to be enabled with the
@test_logs (:info,"Doing foo with n=2") (:debug,"Iteration 1") (:debug,"Iteration 2") min_level=Debug foo(2)
If you want to test that some particular messages are generated while ignoring the rest,
you can set the keyword `match_mode=:any`:
@test_logs (:info,) (:debug,"Iteration 42") min_level=Debug match_mode=:any foo(100)
The macro may be chained with `@test` to also test the returned value:
@test (@test_logs (:info,"Doing foo with n=2") foo(2)) == 42
Expand Down

2 comments on commit 84e8392

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily benchmark build, I will reply here when finished:

@nanosoldier runbenchmarks(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @ararslan

Please sign in to comment.