summaryrefslogtreecommitdiff
path: root/tools/aapt2/format/binary/XmlFlattener_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/aapt2/format/binary/XmlFlattener_test.cpp')
-rw-r--r--tools/aapt2/format/binary/XmlFlattener_test.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/aapt2/format/binary/XmlFlattener_test.cpp b/tools/aapt2/format/binary/XmlFlattener_test.cpp
index 1dac493359e4..c24488b16153 100644
--- a/tools/aapt2/format/binary/XmlFlattener_test.cpp
+++ b/tools/aapt2/format/binary/XmlFlattener_test.cpp
@@ -226,10 +226,10 @@ TEST_F(XmlFlattenerTest, FlattenNonStandardPackageId) {
ASSERT_TRUE(linker.Consume(context_.get(), doc.get()));
// The tree needs a custom DynamicRefTable since it is not using a standard app ID (0x7f).
- android::DynamicRefTable dynamic_ref_table;
- dynamic_ref_table.addMapping(0x80, 0x80);
+ auto dynamic_ref_table = std::make_shared<android::DynamicRefTable>();
+ dynamic_ref_table->addMapping(0x80, 0x80);
- android::ResXMLTree tree(&dynamic_ref_table);
+ auto tree = android::ResXMLTree(std::move(dynamic_ref_table));
ASSERT_TRUE(Flatten(doc.get(), &tree));
while (tree.next() != android::ResXMLTree::START_TAG) {