diff options
author | Adam Lesinski <adamlesinski@google.com> | 2017-11-02 12:07:08 -0700 |
---|---|---|
committer | Adam Lesinski <adamlesinski@google.com> | 2017-11-02 12:07:55 -0700 |
commit | ed37f4842ad838792b16bf19768ed9b2519b0194 (patch) | |
tree | 8356e6a292ac53a5d7aebdab88576d771b4bbf9e /tools/aapt2/xml/XmlActionExecutor_test.cpp | |
parent | 4f340a4f8b50b29b562407e39563ee78a90bea3f (diff) |
AAPT2: Better error messages for ManifestFixer
AAPT2 will now print the XML hierarchy where it found an unexpected
element.
Test: make aapt2_tests
Change-Id: Iac7918b2f344fab874f0a3e7aa9c6936ecde8913
Diffstat (limited to 'tools/aapt2/xml/XmlActionExecutor_test.cpp')
-rw-r--r-- | tools/aapt2/xml/XmlActionExecutor_test.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/aapt2/xml/XmlActionExecutor_test.cpp b/tools/aapt2/xml/XmlActionExecutor_test.cpp index 0fe7ab05ceb2..d39854e5fe4e 100644 --- a/tools/aapt2/xml/XmlActionExecutor_test.cpp +++ b/tools/aapt2/xml/XmlActionExecutor_test.cpp @@ -56,9 +56,13 @@ TEST(XmlActionExecutorTest, FailsWhenUndefinedHierarchyExists) { XmlActionExecutor executor; executor["manifest"]["application"]; - std::unique_ptr<XmlResource> doc = - test::BuildXmlDom("<manifest><application /><activity /></manifest>"); + std::unique_ptr<XmlResource> doc; StdErrDiagnostics diag; + + doc = test::BuildXmlDom("<manifest><application /><activity /></manifest>"); + ASSERT_FALSE(executor.Execute(XmlActionExecutorPolicy::kWhitelist, &diag, doc.get())); + + doc = test::BuildXmlDom("<manifest><application><activity /></application></manifest>"); ASSERT_FALSE(executor.Execute(XmlActionExecutorPolicy::kWhitelist, &diag, doc.get())); } |