Add delOutputFormatter proc to unittest.nim (#12032)
This commit is contained in:
parent
79f1b8592a
commit
35f1519ad6
1 changed files with 5 additions and 1 deletions
|
|
@ -89,7 +89,7 @@
|
||||||
## echo "suite teardown: run once after the tests"
|
## echo "suite teardown: run once after the tests"
|
||||||
|
|
||||||
import
|
import
|
||||||
macros, strutils, streams, times, sets
|
macros, strutils, streams, times, sets, sequtils
|
||||||
|
|
||||||
when declared(stdout):
|
when declared(stdout):
|
||||||
import os
|
import os
|
||||||
|
|
@ -176,6 +176,10 @@ method suiteEnded*(formatter: OutputFormatter) {.base, gcsafe.} =
|
||||||
proc addOutputFormatter*(formatter: OutputFormatter) =
|
proc addOutputFormatter*(formatter: OutputFormatter) =
|
||||||
formatters.add(formatter)
|
formatters.add(formatter)
|
||||||
|
|
||||||
|
proc delOutputFormatter*(formatter: OutputFormatter) =
|
||||||
|
keepIf(formatters, proc (x: OutputFormatter) : bool =
|
||||||
|
x != formatter)
|
||||||
|
|
||||||
proc newConsoleOutputFormatter*(outputLevel: OutputLevel = PRINT_ALL,
|
proc newConsoleOutputFormatter*(outputLevel: OutputLevel = PRINT_ALL,
|
||||||
colorOutput = true): <//>ConsoleOutputFormatter =
|
colorOutput = true): <//>ConsoleOutputFormatter =
|
||||||
ConsoleOutputFormatter(
|
ConsoleOutputFormatter(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue