From 73bff1e8519bb73f17a801f45977d41b69b5b0d0 Mon Sep 17 00:00:00 2001 From: Adam Lesinski Date: Fri, 8 Dec 2017 16:06:10 -0800 Subject: AAPT2: Allow compatible duplicate Attributes If a resource XML file defines two compatible Attributes, they should be merged without throwing an error. Ex: In this case, string|reference and string are the same, so these should merge correctly. Bug: 65699599 Test: make aapt2_tests Test: make AaptBasicTest Change-Id: I7b0f956d2332f7f0b458acd59ca0a606b2cfdf95 --- tools/aapt2/ResourceUtils_test.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'tools/aapt2/ResourceUtils_test.cpp') diff --git a/tools/aapt2/ResourceUtils_test.cpp b/tools/aapt2/ResourceUtils_test.cpp index e637c3ee2f3c..cb786d3794c2 100644 --- a/tools/aapt2/ResourceUtils_test.cpp +++ b/tools/aapt2/ResourceUtils_test.cpp @@ -179,12 +179,11 @@ TEST(ResourceUtilsTest, ParseStyleParentReference) { } TEST(ResourceUtilsTest, ParseEmptyFlag) { - std::unique_ptr attr = - test::AttributeBuilder(false) - .SetTypeMask(ResTable_map::TYPE_FLAGS) - .AddItem("one", 0x01) - .AddItem("two", 0x02) - .Build(); + std::unique_ptr attr = test::AttributeBuilder() + .SetTypeMask(ResTable_map::TYPE_FLAGS) + .AddItem("one", 0x01) + .AddItem("two", 0x02) + .Build(); std::unique_ptr result = ResourceUtils::TryParseFlagSymbol(attr.get(), ""); ASSERT_THAT(result, NotNull()); -- cgit v1.2.3