[llvm] r271416 - [PDB] Silence sign comparison warnings in MappedBlockStreamTest

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 1 11:13:02 PDT 2016


Author: majnemer
Date: Wed Jun  1 13:13:02 2016
New Revision: 271416

URL: http://llvm.org/viewvc/llvm-project?rev=271416&view=rev
Log:
[PDB] Silence sign comparison warnings in MappedBlockStreamTest

Modified:
    llvm/trunk/unittests/DebugInfo/PDB/MappedBlockStreamTest.cpp

Modified: llvm/trunk/unittests/DebugInfo/PDB/MappedBlockStreamTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/DebugInfo/PDB/MappedBlockStreamTest.cpp?rev=271416&r1=271415&r2=271416&view=diff
==============================================================================
--- llvm/trunk/unittests/DebugInfo/PDB/MappedBlockStreamTest.cpp (original)
+++ llvm/trunk/unittests/DebugInfo/PDB/MappedBlockStreamTest.cpp Wed Jun  1 13:13:02 2016
@@ -78,7 +78,7 @@ TEST(MappedBlockStreamTest, ZeroCopyRead
   StringRef Str;
   EXPECT_NO_ERROR(R.readFixedString(Str, 1));
   EXPECT_EQ(Str, StringRef("A"));
-  EXPECT_EQ(0, S.getNumBytesCopied());
+  EXPECT_EQ(0U, S.getNumBytesCopied());
 }
 
 // Tests that a read which outputs into a full destination buffer works and
@@ -90,7 +90,7 @@ TEST(MappedBlockStreamTest, ReadOntoNonE
   StringRef Str = "ZYXWVUTSRQPONMLKJIHGFEDCBA";
   EXPECT_NO_ERROR(R.readFixedString(Str, 1));
   EXPECT_EQ(Str, StringRef("A"));
-  EXPECT_EQ(0, S.getNumBytesCopied());
+  EXPECT_EQ(0U, S.getNumBytesCopied());
 }
 
 // Tests that a read which crosses a block boundary, but where the subsequent
@@ -103,12 +103,12 @@ TEST(MappedBlockStreamTest, ZeroCopyRead
   StringRef Str;
   EXPECT_NO_ERROR(R.readFixedString(Str, 2));
   EXPECT_EQ(Str, StringRef("AB"));
-  EXPECT_EQ(0, S.getNumBytesCopied());
+  EXPECT_EQ(0U, S.getNumBytesCopied());
 
   R.setOffset(6);
   EXPECT_NO_ERROR(R.readFixedString(Str, 4));
   EXPECT_EQ(Str, StringRef("GHIJ"));
-  EXPECT_EQ(0, S.getNumBytesCopied());
+  EXPECT_EQ(0U, S.getNumBytesCopied());
 }
 
 // Tests that a read which crosses a block boundary and cannot be referenced
@@ -121,7 +121,7 @@ TEST(MappedBlockStreamTest, CopyReadNonC
   StringRef Str;
   EXPECT_NO_ERROR(R.readFixedString(Str, 10));
   EXPECT_EQ(Str, StringRef("ABCDEFGHIJ"));
-  EXPECT_EQ(10, S.getNumBytesCopied());
+  EXPECT_EQ(10U, S.getNumBytesCopied());
 }
 
 // Test that an out of bounds read which doesn't cross a block boundary
@@ -134,7 +134,7 @@ TEST(MappedBlockStreamTest, InvalidReadS
 
   R.setOffset(10);
   EXPECT_ERROR(R.readFixedString(Str, 1));
-  EXPECT_EQ(0, S.getNumBytesCopied());
+  EXPECT_EQ(0U, S.getNumBytesCopied());
 }
 
 // Test that an out of bounds read which crosses a contiguous block boundary
@@ -147,7 +147,7 @@ TEST(MappedBlockStreamTest, InvalidReadS
 
   R.setOffset(6);
   EXPECT_ERROR(R.readFixedString(Str, 5));
-  EXPECT_EQ(0, S.getNumBytesCopied());
+  EXPECT_EQ(0U, S.getNumBytesCopied());
 }
 
 // Test that an out of bounds read which crosses a discontiguous block
@@ -159,7 +159,7 @@ TEST(MappedBlockStreamTest, InvalidReadS
   StringRef Str;
 
   EXPECT_ERROR(R.readFixedString(Str, 11));
-  EXPECT_EQ(0, S.getNumBytesCopied());
+  EXPECT_EQ(0U, S.getNumBytesCopied());
 }
 
 } // end anonymous namespace




More information about the llvm-commits mailing list