DiffResult

Undocumented in source.

Constructors

this
this(string expected, string actual)
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.
toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

actual
string actual;
Undocumented in source.
expected
string expected;
Undocumented in source.

Inherited Members

From IResult

toString
string toString()
Undocumented in source.
print
void print(ResultPrinter )
Undocumented in source.

Examples

DiffResult should find the differences

auto diff = new DiffResult("abc", "asc");
diff.toString.should.equal("Diff:\na[-b][+s]c");

DiffResult should use the custom glyphs

scope(exit) {
  ResultGlyphs.resetDefaults;
}

ResultGlyphs.diffBegin = "{";
ResultGlyphs.diffEnd = "}";
ResultGlyphs.diffInsert = "!";
ResultGlyphs.diffDelete = "?";

auto diff = new DiffResult("abc", "asc");
diff.toString.should.equal("Diff:\na{?b}{!s}c");

Meta