From: Christopher Dykes Date: Thu, 25 Aug 2016 21:53:29 +0000 (-0700) Subject: Suppress an abort in FileUtilTest under MSVC X-Git-Tag: v2016.08.29.00~7 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=243fbe8d9331c61ac2b29e80b623c80b8226fe6c;p=folly.git Suppress an abort in FileUtilTest under MSVC Summary: Because MSVC is right, this shouldn't be happening, but we test weird things. Reviewed By: yfeldblum Differential Revision: D3773486 fbshipit-source-id: 50f28bf0ac8ff53f63231b4f6f9ce050b509b464 --- diff --git a/folly/test/FileUtilTest.cpp b/folly/test/FileUtilTest.cpp index 6a63b33c..6526efa2 100644 --- a/folly/test/FileUtilTest.cpp +++ b/folly/test/FileUtilTest.cpp @@ -335,7 +335,9 @@ TEST_F(ReadFileFd, InvalidFd) { File f(aFile.path().string()); f.close(); std::string contents; - EXPECT_FALSE(readFile(f.fd(), contents)); + msvcSuppressAbortOnInvalidParams([&] { + EXPECT_FALSE(readFile(f.fd(), contents)); + }); PLOG(INFO); } }} // namespaces