[llvm] r327070 - [Support] Pacify -Wsign-compare in unit test.
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 8 13:54:30 PST 2018
Author: d0k
Date: Thu Mar 8 13:54:30 2018
New Revision: 327070
URL: http://llvm.org/viewvc/llvm-project?rev=327070&view=rev
Log:
[Support] Pacify -Wsign-compare in unit test.
Modified:
llvm/trunk/unittests/Support/MemoryBufferTest.cpp
Modified: llvm/trunk/unittests/Support/MemoryBufferTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/MemoryBufferTest.cpp?rev=327070&r1=327069&r2=327070&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/MemoryBufferTest.cpp (original)
+++ llvm/trunk/unittests/Support/MemoryBufferTest.cpp Thu Mar 8 13:54:30 2018
@@ -277,7 +277,7 @@ TEST_F(MemoryBufferTest, writeThroughFil
// Write some data. It should be mapped readwrite, so that upon completion
// the original file contents are modified.
WriteThroughMemoryBuffer &MB = **MBOrError;
- ASSERT_EQ(16, MB.getBufferSize());
+ ASSERT_EQ(16u, MB.getBufferSize());
char *Start = MB.getBufferStart();
ASSERT_EQ(MB.getBufferEnd(), MB.getBufferStart() + MB.getBufferSize());
::memset(Start, 'x', MB.getBufferSize());
@@ -286,7 +286,7 @@ TEST_F(MemoryBufferTest, writeThroughFil
auto MBOrError = MemoryBuffer::getFile(TestPath);
ASSERT_FALSE(MBOrError.getError());
auto &MB = **MBOrError;
- ASSERT_EQ(16, MB.getBufferSize());
+ ASSERT_EQ(16u, MB.getBufferSize());
EXPECT_EQ("xxxxxxxxxxxxxxxx", MB.getBuffer());
}
}
More information about the llvm-commits
mailing list