summaryrefslogtreecommitdiff
path: root/test/gtest_unittest.cc
diff options
context:
space:
mode:
authorvladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925>2010-10-22 01:33:11 +0000
committervladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925>2010-10-22 01:33:11 +0000
commit1287840af7b9efca823ad2fecb6d905f2c4a3ace (patch)
tree7a9633942ef81e21ec74834e715777e2e062fb43 /test/gtest_unittest.cc
parent636f903d84ec28714cb3d84a346dfb58f5bc99d3 (diff)
downloadgtest-1287840af7b9efca823ad2fecb6d905f2c4a3ace.tar.gz
gtest-1287840af7b9efca823ad2fecb6d905f2c4a3ace.tar.bz2
gtest-1287840af7b9efca823ad2fecb6d905f2c4a3ace.tar.xz
Fixes compiler warning when built with -std=c++0x.
git-svn-id: http://googletest.googlecode.com/svn/trunk@503 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'test/gtest_unittest.cc')
-rw-r--r--test/gtest_unittest.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/gtest_unittest.cc b/test/gtest_unittest.cc
index cb189a3..5a93ff2 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 {