Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b1f1b14 authored by Dan Willemsen's avatar Dan Willemsen
Browse files

AAPT2: Fix compiler error in 32-bit host test

We now default host native tests to build both 32-bit and 64-bit
versions.

The 32-bit version of libaapt2_test was broken because it was comparing
an unsigned int to the result from std::count(std::vector), which is a
signed int. The 64-bit version compiled fine, since
std::count(std::vector) returns a long.

Change-Id: I786fcd8a54d9f78b76b19ef82ab8dda6f5c42197
parent c1f9e7c4
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -37,13 +37,13 @@ TEST(XmlIdCollectorTest, CollectsIds) {
    XmlIdCollector collector;
    ASSERT_TRUE(collector.consume(context.get(), doc.get()));

    EXPECT_EQ(1u, std::count(doc->file.exportedSymbols.begin(), doc->file.exportedSymbols.end(),
    EXPECT_EQ(1, std::count(doc->file.exportedSymbols.begin(), doc->file.exportedSymbols.end(),
                             SourcedResourceName{ test::parseNameOrDie(u"@id/foo"), 3u }));

    EXPECT_EQ(1u, std::count(doc->file.exportedSymbols.begin(), doc->file.exportedSymbols.end(),
    EXPECT_EQ(1, std::count(doc->file.exportedSymbols.begin(), doc->file.exportedSymbols.end(),
                             SourcedResourceName{ test::parseNameOrDie(u"@id/bar"), 3u }));

    EXPECT_EQ(1u, std::count(doc->file.exportedSymbols.begin(), doc->file.exportedSymbols.end(),
    EXPECT_EQ(1, std::count(doc->file.exportedSymbols.begin(), doc->file.exportedSymbols.end(),
                             SourcedResourceName{ test::parseNameOrDie(u"@id/car"), 6u }));
}