diff options
author | vladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925> | 2010-10-22 01:33:11 +0000 |
---|---|---|
committer | vladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925> | 2010-10-22 01:33:11 +0000 |
commit | 25958f3e4c4097caca8347b7937f5f6fb26d6c56 (patch) | |
tree | 7a9633942ef81e21ec74834e715777e2e062fb43 /test/gtest_unittest.cc | |
parent | 50f4deb1cf3ef32282c13b7cb84a81b1bf61e0d8 (diff) | |
download | googletest-25958f3e4c4097caca8347b7937f5f6fb26d6c56.tar.gz googletest-25958f3e4c4097caca8347b7937f5f6fb26d6c56.tar.bz2 googletest-25958f3e4c4097caca8347b7937f5f6fb26d6c56.zip |
Fixes compiler warning when built with -std=c++0x.
Diffstat (limited to 'test/gtest_unittest.cc')
-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 { |