aboutsummaryrefslogtreecommitdiff
path: root/test/gtest_output_test_.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/gtest_output_test_.cc')
-rw-r--r--test/gtest_output_test_.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/gtest_output_test_.cc b/test/gtest_output_test_.cc
index 07ab633..5361d8d 100644
--- a/test/gtest_output_test_.cc
+++ b/test/gtest_output_test_.cc
@@ -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");