[llvm-branch-commits] [llvm] f507148 - [ADT] Fix some tests after 5d10b8ad

Nathan James via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Dec 22 10:12:00 PST 2020


Author: Nathan James
Date: 2020-12-22T18:06:19Z
New Revision: f5071489ea8cf2771d7375534c122467a000b356

URL: https://github.com/llvm/llvm-project/commit/f5071489ea8cf2771d7375534c122467a000b356
DIFF: https://github.com/llvm/llvm-project/commit/f5071489ea8cf2771d7375534c122467a000b356.diff

LOG: [ADT] Fix some tests after 5d10b8ad

Some bots were failing due to signed/unsigned comparison.

Added: 
    

Modified: 
    llvm/unittests/ADT/SmallVectorTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/ADT/SmallVectorTest.cpp b/llvm/unittests/ADT/SmallVectorTest.cpp
index e02c3e709667..d97ab577524f 100644
--- a/llvm/unittests/ADT/SmallVectorTest.cpp
+++ b/llvm/unittests/ADT/SmallVectorTest.cpp
@@ -345,24 +345,24 @@ TEST(SmallVectorTest, ResizeForOverwrite) {
   {
     // Heap allocated storage.
     SmallVector<unsigned, 0> V;
-    V.push_back(5);
+    V.push_back(5U);
     V.pop_back();
-    V.resize_for_overwrite(V.size() + 1);
-    EXPECT_EQ(5, V.back());
+    V.resize_for_overwrite(V.size() + 1U);
+    EXPECT_EQ(5U, V.back());
     V.pop_back();
     V.resize(V.size() + 1);
-    EXPECT_EQ(0, V.back());
+    EXPECT_EQ(0U, V.back());
   }
   {
     // Inline storage.
     SmallVector<unsigned, 2> V;
-    V.push_back(5);
+    V.push_back(5U);
     V.pop_back();
-    V.resize_for_overwrite(V.size() + 1);
-    EXPECT_EQ(5, V.back());
+    V.resize_for_overwrite(V.size() + 1U);
+    EXPECT_EQ(5U, V.back());
     V.pop_back();
     V.resize(V.size() + 1);
-    EXPECT_EQ(0, V.back());
+    EXPECT_EQ(0U, V.back());
   }
 }
 


        


More information about the llvm-branch-commits mailing list