Expand equality failure messages with a by-line diff.

This commit is contained in:
kosak
2014-07-28 21:54:50 +00:00
parent bd263344f9
commit b54098a9ab
5 changed files with 433 additions and 5 deletions

View File

@@ -113,6 +113,11 @@ TEST(NonfatalFailureTest, EscapesStringOperands) {
EXPECT_EQ(golden, actual);
}
TEST(NonfatalFailureTest, DiffForLongStrings) {
std::string golden_str(kGoldenString, sizeof(kGoldenString) - 1);
EXPECT_EQ(golden_str, "Line 2");
}
// Tests catching a fatal failure in a subroutine.
TEST(FatalFailureTest, FatalFailureInSubroutine) {
printf("(expecting a failure that x should be 1)\n");