diff options
author | Xin Li <delphij@google.com> | 2017-11-14 12:31:11 -0800 |
---|---|---|
committer | Xin Li <delphij@google.com> | 2017-11-14 12:31:11 -0800 |
commit | 220871a697290529278ed16db508eda8e12f3fc7 (patch) | |
tree | bc13101b63c6fe39a9d92706ecb7ded7f98f5a9c /tools/aapt2/xml/XmlActionExecutor_test.cpp | |
parent | 802f191b2b84a1b1b82c7f6f3268846084b35dfb (diff) | |
parent | 98e12851336b7db16e583f9afac63ecc97465980 (diff) |
Merge commit '98e12851336b7db16e583f9afac63ecc97465980' from
oc-mr1-dev-plus-aosp-without-vendor into stage-aosp-master.
Change-Id: Ia7b8da4a00d215160e4a4fa40f6044208d1297b7
Merged-In: I19846d2a3ee27aecbae2367a74ee49082eea154d
Diffstat (limited to 'tools/aapt2/xml/XmlActionExecutor_test.cpp')
-rw-r--r-- | tools/aapt2/xml/XmlActionExecutor_test.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/aapt2/xml/XmlActionExecutor_test.cpp b/tools/aapt2/xml/XmlActionExecutor_test.cpp index 7110c90fa3a9..0fe7ab05ceb2 100644 --- a/tools/aapt2/xml/XmlActionExecutor_test.cpp +++ b/tools/aapt2/xml/XmlActionExecutor_test.cpp @@ -18,6 +18,8 @@ #include "test/Test.h" +using ::testing::NotNull; + namespace aapt { namespace xml { @@ -42,12 +44,11 @@ TEST(XmlActionExecutorTest, BuildsAccessibleNestedPattern) { test::BuildXmlDom("<manifest><application /></manifest>"); StdErrDiagnostics diag; - ASSERT_TRUE( - executor.Execute(XmlActionExecutorPolicy::kNone, &diag, doc.get())); - ASSERT_NE(nullptr, manifest_el); + ASSERT_TRUE(executor.Execute(XmlActionExecutorPolicy::kNone, &diag, doc.get())); + ASSERT_THAT(manifest_el, NotNull()); EXPECT_EQ(std::string("manifest"), manifest_el->name); - ASSERT_NE(nullptr, application_el); + ASSERT_THAT(application_el, NotNull()); EXPECT_EQ(std::string("application"), application_el->name); } @@ -58,8 +59,7 @@ TEST(XmlActionExecutorTest, FailsWhenUndefinedHierarchyExists) { std::unique_ptr<XmlResource> doc = test::BuildXmlDom("<manifest><application /><activity /></manifest>"); StdErrDiagnostics diag; - ASSERT_FALSE( - executor.Execute(XmlActionExecutorPolicy::kWhitelist, &diag, doc.get())); + ASSERT_FALSE(executor.Execute(XmlActionExecutorPolicy::kWhitelist, &diag, doc.get())); } } // namespace xml |