โ† index

AnsiTestReporter

inherits TestReporter ยท defined at test.qn:528

The built-in terminal reporter: aligned [Suite] tags, one line per test with a green '.' or red '!' per assertion, per-suite and whole-run summaries, and failure detail with file:line:column locations โ€” all in ANSI color on the stream given at construction (qn test passes [IO]Stdout).

Instance methods

endAssertion:

Print the assertion's mark: a green '.' for a pass, a red '!' for a failure.

test.qn:630

endRun:List elapsed:

Print the whole-run summary: total assertion time, wall time, and pass / failure / skip counts.

test.qn:540

endSuite:TestSuite elapsed:

Print the suite's summary line: pass/failure counts, assertion time and wall time.

test.qn:572

endTest:TestResult

Finish the test's line with its timings; a failing test then lists each failed assertion's evidence and file:line:column.

test.qn:595

init:

Set the output stream: anything answering write: / writeln:.

test.qn:530

paddedName

Current suite's name padded to the widest suite name, so every [Tag] aligns."

test.qn:533

startAssertion:

No mark at assertion start โ€” the '.'/'!' prints once the outcome is known, in endAssertion:.

test.qn:627

startRun:List

Measure the widest suite name, so every [Suite] tag aligns.

test.qn:536

startSuite:TestSuite

Announce the suite: 'Running N tests', or the SKIPPED line with the suite's reason.

test.qn:560

startTest:Test

Start the test's output line: suite tag and test name; the assertion marks follow on the same line.

test.qn:589