Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(347)

Unified Diff: test/gtest-port_test.cc

Issue 4801066: First draft: issue 311: need a way to resume from the TEST that crashed Base URL: http://googletest.googlecode.com/svn/trunk/
Patch Set: Created 12 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/gtest-param-test_test.cc ('k') | test/gtest-typed-test_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/gtest-port_test.cc
===================================================================
--- test/gtest-port_test.cc (revision 587)
+++ test/gtest-port_test.cc (working copy)
@@ -927,14 +927,14 @@
EXPECT_STREQ("stu", GetCapturedStderr().c_str());
}
-TEST(CaptureDeathTest, CannotReenterStdoutCapture) {
+TEST(CaptureDeathTest, CanReenterStdoutCapture) {
CaptureStdout();
- EXPECT_DEATH_IF_SUPPORTED(CaptureStdout();,
- "Only one stdout capturer can exist at a time");
- GetCapturedStdout();
-
- // We cannot test stderr capturing using death tests as they use it
- // themselves.
+ fprintf(stdout, "abc");
+ CaptureStdout();
+ fprintf(stdout, "def");
+
+ EXPECT_STREQ("def", GetCapturedStdout().c_str());
+ EXPECT_STREQ("abc", GetCapturedStdout().c_str());
}
#endif // !GTEST_OS_WINDOWS_MOBILE
« no previous file with comments | « test/gtest-param-test_test.cc ('k') | test/gtest-typed-test_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b