diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/gtest_unittest.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/gtest_unittest.cc b/test/gtest_unittest.cc index cb189a30..5a93ff26 100644 --- a/test/gtest_unittest.cc +++ b/test/gtest_unittest.cc @@ -34,6 +34,7 @@ #include "gtest/gtest.h" #include <vector> +#include <ostream> // Verifies that the command line flag variables can be accessed // in code once <gtest/gtest.h> has been #included. @@ -4902,7 +4903,7 @@ TEST(AssertionResultTest, ConstructionWorks) { EXPECT_STREQ("ghi", r5.message()); } -// Tests that the negation fips the predicate result but keeps the message. +// Tests that the negation flips the predicate result but keeps the message. TEST(AssertionResultTest, NegationWorks) { AssertionResult r1 = AssertionSuccess() << "abc"; EXPECT_FALSE(!r1); @@ -4919,6 +4920,12 @@ TEST(AssertionResultTest, StreamingWorks) { EXPECT_STREQ("abcd0true", r.message()); } +TEST(AssertionResultTest, CanStreamOstreamManipulators) { + AssertionResult r = AssertionSuccess(); + r << "Data" << std::endl << std::flush << std::ends << "Will be visible"; + EXPECT_STREQ("Data\n\\0Will be visible", r.message()); +} + // Tests streaming a user type whose definition and operator << are // both in the global namespace. class Base { |