[llvm] r302922 - Make sure we have actually written what is expected by the test.
Galina Kistanova via llvm-commits
llvm-commits at lists.llvm.org
Fri May 12 10:00:14 PDT 2017
Author: gkistanova
Date: Fri May 12 12:00:13 2017
New Revision: 302922
URL: http://llvm.org/viewvc/llvm-project?rev=302922&view=rev
Log:
Make sure we have actually written what is expected by the test.
Modified:
llvm/trunk/unittests/Support/Path.cpp
Modified: llvm/trunk/unittests/Support/Path.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/Path.cpp?rev=302922&r1=302921&r2=302922&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/Path.cpp (original)
+++ llvm/trunk/unittests/Support/Path.cpp Fri May 12 12:00:13 2017
@@ -1047,7 +1047,7 @@ TEST_F(FileSystemTest, MD5) {
SmallString<64> TempPath;
ASSERT_NO_ERROR(fs::createTemporaryFile("prefix", "temp", FD, TempPath));
StringRef Data("abcdefghijklmnopqrstuvwxyz");
- write(FD, Data.data(), Data.size());
+ ASSERT_EQ(write(FD, Data.data(), Data.size()), static_cast<ssize_t>(Data.size()));
lseek(FD, 0, SEEK_SET);
auto Hash = fs::md5_contents(FD);
::close(FD);
More information about the llvm-commits
mailing list