Class AgentReporter
This reporter prints the failed tests and a summary as plain text, without colors or glyphs
Constructors
| Name | Description |
|---|---|
this
()
|
Fields
| Name | Type | Description |
|---|---|---|
writer
|
ReportWriter |
Methods
| Name | Description |
|---|---|
begin
(__param_0, __param_1)
|
|
end
(results)
|
|
update
()
|
Example
AgentReporter prints nothing when a test is successful
auto writer = new BufferedWriter;
auto reporter = new AgentReporter(writer);
auto test = new TestResult("some test");
test .status = TestResult .Status .success;
reporter .end("some suite", test);
writer .buffer .should .equal("");
Example
AgentReporter prints the failure followed by an empty line when a test fails
auto writer = new BufferedWriter;
auto reporter = new AgentReporter(writer);
auto test = new TestResult("some test");
test .fileName = "file.d";
test .line = 10;
test .status = TestResult .Status .failure;
reporter .end("some suite", test);
writer .buffer .should .equal("FAIL some suite some test\n" ~
" test: file.d:10\n" ~
" rerun: -f \"=some suite some test\"\n\n");
Example
AgentReporter prints the summary when the run ends
auto writer = new BufferedWriter;
auto reporter = new AgentReporter(writer);
reporter .end([]);
writer .buffer .should .equal("RESULT failed=0 passed=0 pending=0 skipped=0\n");