summaryrefslogtreecommitdiff
path: root/tools/aapt2/ResourceTable_test.cpp
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2016-08-24 16:03:48 -0700
committerAdam Lesinski <adamlesinski@google.com>2016-08-26 19:40:50 -0700
commit5c3464c75fc517c0306a4ffd39c59671ccfde544 (patch)
tree6a20580de33238d2c16a761f880a442eb5c74c0b /tools/aapt2/ResourceTable_test.cpp
parente637f31581787efc533b2115ca7d71fa8d92e98b (diff)
AAPT2: Fix merging of styleables the right way
Styleables should only be merged when processing overlays. This moves the styleable merging code out of ResourceTable and into TableMerger. Change-Id: I3aae05cf4dd875cd25ac2ac744b61194409b2fee
Diffstat (limited to 'tools/aapt2/ResourceTable_test.cpp')
-rw-r--r--tools/aapt2/ResourceTable_test.cpp33
1 files changed, 0 insertions, 33 deletions
diff --git a/tools/aapt2/ResourceTable_test.cpp b/tools/aapt2/ResourceTable_test.cpp
index feaca4eef127..4db40a6f4008 100644
--- a/tools/aapt2/ResourceTable_test.cpp
+++ b/tools/aapt2/ResourceTable_test.cpp
@@ -118,39 +118,6 @@ TEST(ResourceTableTest, OverrideWeakResourceValue) {
EXPECT_FALSE(attr->isWeak());
}
-TEST(ResourceTable, MergeStyleables) {
- ResourceTable table;
-
- ASSERT_TRUE(table.addResource(
- test::parseNameOrDie("android:styleable/Foo"),
- ConfigDescription{}, "",
- test::StyleableBuilder()
- .addItem("android:attr/bar")
- .addItem("android:attr/foo")
- .build(),
- test::getDiagnostics()));
-
- ASSERT_TRUE(table.addResource(
- test::parseNameOrDie("android:styleable/Foo"),
- ConfigDescription{}, "",
- test::StyleableBuilder()
- .addItem("android:attr/bat")
- .addItem("android:attr/foo")
- .build(),
- test::getDiagnostics()));
-
- Styleable* styleable = test::getValue<Styleable>(&table, "android:styleable/Foo");
- ASSERT_NE(nullptr, styleable);
-
- std::vector<Reference> expectedRefs = {
- Reference(test::parseNameOrDie("android:attr/bar")),
- Reference(test::parseNameOrDie("android:attr/bat")),
- Reference(test::parseNameOrDie("android:attr/foo")),
- };
-
- EXPECT_EQ(expectedRefs, styleable->entries);
-}
-
TEST(ResourceTableTest, ProductVaryingValues) {
ResourceTable table;