From 03ca48f3e7de60dea3ba76b0ff9ff958e105ce00 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Mon, 5 May 2014 07:31:56 -0700 Subject: [PATCH] Test calling RestoreAndRead twice. --- test/gtest-extra-test.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/gtest-extra-test.cc b/test/gtest-extra-test.cc index f9f7e050..79150346 100644 --- a/test/gtest-extra-test.cc +++ b/test/gtest-extra-test.cc @@ -569,6 +569,7 @@ TEST(OutputRedirectTest, RestoreAndRead) { OutputRedirect redir(file.get()); std::fprintf(file.get(), "censored"); EXPECT_EQ("censored", redir.RestoreAndRead()); + EXPECT_EQ("", redir.RestoreAndRead()); std::fprintf(file.get(), "]]]"); file = BufferedFile(); EXPECT_READ(read_end, "[[[]]]"); @@ -613,8 +614,6 @@ TEST(OutputRedirectTest, ErrorInDtor) { write_dup.dup2(write_fd); // "undo" close or dtor of BufferedFile will fail } -// TODO: test calling RestoreAndRead multiple times - // TODO: test EXPECT_STDOUT and EXPECT_STDERR // TODO: compile both in C++11 & C++98 mode