Try not to die.

This commit is contained in:
Victor Zverovich 2014-05-03 19:05:56 -07:00
parent 3e55391ea8
commit 590490f35f

View File

@ -333,9 +333,10 @@ TEST(FileTest, Read) {
} }
TEST(FileTest, ReadError) { TEST(FileTest, ReadError) {
File f; File read_end, write_end;
File::pipe(read_end, write_end);
char buf; char buf;
EXPECT_SYSTEM_ERROR_OR_DEATH(f.read(&buf, 1), EBADF, "cannot read from file"); EXPECT_SYSTEM_ERROR(write_end.read(&buf, 1), EBADF, "cannot read from file");
} }
TEST(FileTest, Write) { TEST(FileTest, Write) {