summaryrefslogtreecommitdiff
path: root/tools/aapt2/xml/XmlActionExecutor_test.cpp
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2017-05-30 15:19:02 -0700
committerAdam Lesinski <adamlesinski@google.com>2017-06-09 14:57:07 -0700
commita45893a5c51cc26f1fd63ec1aa4c39f55911c85b (patch)
tree7e54a8f6e5d328c642309b18c7dfffb083527ccc /tools/aapt2/xml/XmlActionExecutor_test.cpp
parent594fda3161e492fb825d6bb47a8973344cc8e72e (diff)
AAPT2: Clean up tests a bit
Since the latest gtest has fixed support for explicit bool operators, remvoe AAPT_ASSERT_* and AAPT_EXPECT_*. Also switch to use NotNull() matchers, which are more legible. Test: make aapt2_tests Change-Id: Idce199ca9d567d70f7aae275fee15e04bb914c9e
Diffstat (limited to 'tools/aapt2/xml/XmlActionExecutor_test.cpp')
-rw-r--r--tools/aapt2/xml/XmlActionExecutor_test.cpp12
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