]> granicus.if.org Git - clang/commitdiff
Fix -Wsign-compare in new tests
authorReid Kleckner <rnk@google.com>
Thu, 17 Jan 2019 20:52:46 +0000 (20:52 +0000)
committerReid Kleckner <rnk@google.com>
Thu, 17 Jan 2019 20:52:46 +0000 (20:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351478 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/Lex/PPCallbacksTest.cpp

index e19b99cd6d56c30f4dd940728e4186f5ccc0680b..04a1064476285f7a5322e5ec26093af5df72e534 100644 (file)
@@ -432,25 +432,25 @@ TEST_F(PPCallbacksTest, OpenCLExtensionPragmaDisabled) {
 
 TEST_F(PPCallbacksTest, DirectiveExprRanges) {
   const auto &Results1 = DirectiveExprRange("#if FLUZZY_FLOOF\n#endif\n");
-  EXPECT_EQ(Results1.size(), 1);
+  EXPECT_EQ(Results1.size(), 1U);
   EXPECT_EQ(
       GetSourceStringToEnd(CharSourceRange(Results1[0].ConditionRange, false)),
       "FLUZZY_FLOOF");
 
   const auto &Results2 = DirectiveExprRange("#if 1 + 4 < 7\n#endif\n");
-  EXPECT_EQ(Results2.size(), 1);
+  EXPECT_EQ(Results2.size(), 1U);
   EXPECT_EQ(
       GetSourceStringToEnd(CharSourceRange(Results2[0].ConditionRange, false)),
       "1 + 4 < 7");
 
   const auto &Results3 = DirectiveExprRange("#if 1 + \\\n  2\n#endif\n");
-  EXPECT_EQ(Results3.size(), 1);
+  EXPECT_EQ(Results3.size(), 1U);
   EXPECT_EQ(
       GetSourceStringToEnd(CharSourceRange(Results3[0].ConditionRange, false)),
       "1 + \\\n  2");
 
   const auto &Results4 = DirectiveExprRange("#if 0\n#elif FLOOFY\n#endif\n");
-  EXPECT_EQ(Results4.size(), 2);
+  EXPECT_EQ(Results4.size(), 2U);
   EXPECT_EQ(
       GetSourceStringToEnd(CharSourceRange(Results4[0].ConditionRange, false)),
       "0");
@@ -459,7 +459,7 @@ TEST_F(PPCallbacksTest, DirectiveExprRanges) {
       "FLOOFY");
 
   const auto &Results5 = DirectiveExprRange("#if 1\n#elif FLOOFY\n#endif\n");
-  EXPECT_EQ(Results5.size(), 2);
+  EXPECT_EQ(Results5.size(), 2U);
   EXPECT_EQ(
       GetSourceStringToEnd(CharSourceRange(Results5[0].ConditionRange, false)),
       "1");
@@ -469,14 +469,14 @@ TEST_F(PPCallbacksTest, DirectiveExprRanges) {
 
   const auto &Results6 =
       DirectiveExprRange("#if defined(FLUZZY_FLOOF)\n#endif\n");
-  EXPECT_EQ(Results6.size(), 1);
+  EXPECT_EQ(Results6.size(), 1U);
   EXPECT_EQ(
       GetSourceStringToEnd(CharSourceRange(Results6[0].ConditionRange, false)),
       "defined(FLUZZY_FLOOF)");
 
   const auto &Results7 =
       DirectiveExprRange("#if 1\n#elif defined(FLOOFY)\n#endif\n");
-  EXPECT_EQ(Results7.size(), 2);
+  EXPECT_EQ(Results7.size(), 2U);
   EXPECT_EQ(
       GetSourceStringToEnd(CharSourceRange(Results7[0].ConditionRange, false)),
       "1");