summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Dan Willemsen <dwillemsen@google.com> 2015-12-22 13:01:05 -0800
committer Dan Willemsen <dwillemsen@google.com> 2015-12-22 13:44:56 -0800
commit1b1f1b14eef5f73a82c1bb7cefd63ded5a9f6ebb (patch)
treeb4678b62f31f924565d2abbca193452a8db5e7ba
parentc1f9e7c4875e791e108c79382508aab8d171f25f (diff)
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
-rw-r--r--tools/aapt2/compile/XmlIdCollector_test.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/aapt2/compile/XmlIdCollector_test.cpp b/tools/aapt2/compile/XmlIdCollector_test.cpp
index 45b7af240abe..a37ea86c317f 100644
--- a/tools/aapt2/compile/XmlIdCollector_test.cpp
+++ b/tools/aapt2/compile/XmlIdCollector_test.cpp
@@ -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 }));
}