Fix test.

This commit is contained in:
Victor Zverovich 2014-05-03 18:48:20 -07:00
parent 527c4b312a
commit 3e55391ea8

View File

@ -391,8 +391,12 @@ TEST(FileTest, Dup2NoExcept) {
TEST(FileTest, Dup2NoExceptError) {
File f(".travis.yml", File::RDONLY);
ErrorCode ec;
#ifndef _WIN32
f.dup2(-1, ec);
EXPECT_EQ(EBADF, ec.get());
#else
EXPECT_DEATH(f.dup2(-1, ec), "");
#endif
}
TEST(FileTest, Pipe) {