[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).
This commit is contained in:
Hubert Tong 2020-03-11 09:58:10 -04:00
parent edbf2fde14
commit b94d4b1903

View File

@ -56,7 +56,7 @@ TEST_F(ArchiveTestsFixture, ArchiveChildGetSizeRegularArchive) {
Expected<uint64_t> 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<uint64_t> 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());
}