TestException

Undocumented in source.

Constructors

this
this(IResult[] results, string fileName, size_t line, Throwable next)
Undocumented in source.

Members

Functions

print
void print(ResultPrinter printer)
Undocumented in source. Be warned that the author may not have intended to support it.

Examples

Test Exception should separate the results by a new line

  import std.stdio;
  IResult[] results = [
    cast(IResult) new MessageResult("message"),
    cast(IResult) new SourceResult("test/missing.txt", 10),
    cast(IResult) new DiffResult("a", "b"),
    cast(IResult) new ExpectedActualResult("a", "b"),
    cast(IResult) new ExtraMissingResult("a", "b") ];

  auto exception = new TestException(results, "unknown", 0);

  exception.msg.should.equal(`message

--------------------
test/missing.txt:10
--------------------

Diff:
[-a][+b]

 Expected:a
   Actual:b

    Extra:a
  Missing:b
`);

Meta