From b94d4b19034bdce139d2c58c31f6235b7915e16b Mon Sep 17 00:00:00 2001 From: Hubert Tong Date: Wed, 11 Mar 2020 09:58:10 -0400 Subject: [PATCH] [unittests][Object] Use matching signedness for expected value Speculative fix for buildbot breakage: http://lab.llvm.org:8011/builders/clang-ppc64le-rhel/builds/1899/steps/ninja%20check%201/logs/stdio D75742 introduces checks that cause bots to complain about comparing values where the integer types mismatch on signedness. This patch makes the expected value unsigned in various cases (since the value being tested is unsigned). --- llvm/unittests/Object/ArchiveTest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/unittests/Object/ArchiveTest.cpp b/llvm/unittests/Object/ArchiveTest.cpp index df5aeeae02b9..ef2553b1d137 100644 --- a/llvm/unittests/Object/ArchiveTest.cpp +++ b/llvm/unittests/Object/ArchiveTest.cpp @@ -56,7 +56,7 @@ TEST_F(ArchiveTestsFixture, ArchiveChildGetSizeRegularArchive) { Expected Size = (*Child)->getSize(); ASSERT_THAT_EXPECTED(Size, Succeeded()); - EXPECT_EQ(9999999999, *Size); + EXPECT_EQ(9999999999u, *Size); } TEST_F(ArchiveTestsFixture, ArchiveChildGetSizeThinArchive) { @@ -65,7 +65,7 @@ TEST_F(ArchiveTestsFixture, ArchiveChildGetSizeThinArchive) { Expected Size = (*Child)->getSize(); ASSERT_THAT_EXPECTED(Size, Succeeded()); - EXPECT_EQ(9999999999, *Size); + EXPECT_EQ(9999999999u, *Size); } TEST_F(ArchiveTestsFixture, ArchiveChildGetBuffer) { @@ -76,6 +76,6 @@ TEST_F(ArchiveTestsFixture, ArchiveChildGetBuffer) { // Cannot use ASSERT_THAT_EXPECTED, as that will attempt to print the // StringRef (which has an invalid size). ASSERT_TRUE((bool)Buffer); - EXPECT_EQ(9999999999, Buffer->size()); + EXPECT_EQ(9999999999u, Buffer->size()); EXPECT_EQ(ArchiveWithMember + sizeof(ArchiveWithMember) - 1, Buffer->data()); }