Fix tests.

This commit is contained in:
Victor Zverovich 2014-05-05 07:31:03 -07:00
parent 5434b0282c
commit 368505ebe9

View File

@ -229,7 +229,7 @@ TEST_F(BufferedFileTest, MoveAssignmentClosesFile) {
BufferedFile bf2 = OpenFile("CMakeLists.txt"); BufferedFile bf2 = OpenFile("CMakeLists.txt");
int old_fd = fileno(bf2.get()); int old_fd = fileno(bf2.get());
bf2 = std::move(bf); bf2 = std::move(bf);
EXPECT_CLOSED(old_fd); EXPECT_TRUE(IsClosedInternal(old_fd));
} }
TEST_F(BufferedFileTest, MoveFromTemporaryInCtor) { TEST_F(BufferedFileTest, MoveFromTemporaryInCtor) {
@ -249,7 +249,7 @@ TEST_F(BufferedFileTest, MoveFromTemporaryInAssignmentClosesFile) {
BufferedFile f = OpenFile(".travis.yml"); BufferedFile f = OpenFile(".travis.yml");
int old_fd = fileno(f.get()); int old_fd = fileno(f.get());
f = OpenFile(".travis.yml"); f = OpenFile(".travis.yml");
EXPECT_CLOSED(old_fd); EXPECT_TRUE(IsClosedInternal(old_fd));
} }
TEST_F(BufferedFileTest, CloseFileInDtor) { TEST_F(BufferedFileTest, CloseFileInDtor) {
@ -258,7 +258,7 @@ TEST_F(BufferedFileTest, CloseFileInDtor) {
BufferedFile f = OpenFile(".travis.yml"); BufferedFile f = OpenFile(".travis.yml");
fd = fileno(f.get()); fd = fileno(f.get());
} }
EXPECT_CLOSED(fd); EXPECT_TRUE(IsClosedInternal(fd));
} }
TEST_F(BufferedFileTest, CloseErrorInDtor) { TEST_F(BufferedFileTest, CloseErrorInDtor) {