trial.reporters.dotmatrix 0/18(0%) line coverage

      
10
20
30
40
50
60
70
80
90
100
110
120
130
140
150
160
170
180
190
200
210
220
230
240
250
260
270
280
290
300
310
320
330
340
350
360
370
380
390
400
410
420
430
440
450
460
470
480
490
500
510
520
530
540
550
560
570
580
590
600
610
620
630
640
650
660
670
680
690
700
710
720
730
module trial.reporters.dotmatrix; import std.stdio; import std.array; import std.conv; import std.datetime; import std.string; import std.algorithm; import trial.interfaces; import trial.reporters.writer; struct DotMatrixGlyphs { string success = "."; string failure = "!"; string unknown = "?"; string pending = "-"; } string dotMatrixGlyphsToCode(DotMatrixGlyphs glyphs) { return "DotMatrixGlyphs(`"~ glyphs.success ~"`,`"~ glyphs.failure ~"`,`"~ glyphs.unknown ~"`)"; } class DotMatrixReporter : ITestCaseLifecycleListener { private { ReportWriter writer; DotMatrixGlyphs glyphs; } this(DotMatrixGlyphs glyphs) { writer = defaultWriter; this.glyphs = glyphs; } this(ReportWriter writer) { this.writer = writer; } void begin(string suite, ref TestResult test) { } void end(string suite, ref TestResult test) { switch (test.status) { case TestResult.Status.success: writer.write(glyphs.success, ReportWriter.Context.inactive); break; case TestResult.Status.failure: writer.write(glyphs.failure, ReportWriter.Context.danger); break; case TestResult.Status.pending: writer.write(glyphs.pending, ReportWriter.Context.info); break; default: writer.write(glyphs.unknown, ReportWriter.Context.warning); } } }