From e00409c5176dd88f71ddc72e5b3f34e85683e359 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Tue, 29 Apr 2014 07:49:46 -0700 Subject: [PATCH] Comment. --- format-test.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/format-test.cc b/format-test.cc index b60515f5..84461d5f 100644 --- a/format-test.cc +++ b/format-test.cc @@ -1655,6 +1655,7 @@ TEST(FormatIntTest, FormatDec) { #ifdef FMT_USE_DUP +// RAII for file descriptors. class File { private: int fd_; @@ -1666,6 +1667,8 @@ class File { }; TEST(FormatTest, PrintColored) { + // Temporarily redirect stdout to a file and check if PrintColored adds + // necessary ANSI escape sequences. std::fflush(stdout); File saved_stdio(dup(1)); EXPECT_NE(-1, saved_stdio.fd());