diff options
author | Adam Lesinski <adamlesinski@google.com> | 2017-08-08 10:39:55 -0700 |
---|---|---|
committer | Adam Lesinski <adamlesinski@google.com> | 2017-08-08 10:51:23 -0700 |
commit | 09f4d706d9438980465faabe81ed143fc299343e (patch) | |
tree | ec9f2f045d10ebe37198af36aab02b5ccf31a62a /tools/aapt2/java/ManifestClassGenerator_test.cpp | |
parent | b76b3056f57be4abf9fae1375861a5e7c897b074 (diff) |
AAPT2: Forward @TestApi in resource comments to JavaDoc
Bug: 37894597
Test: make aapt2_tests
Change-Id: I357fb84941bfbb3892a8c46feb47f55b865b6649
Diffstat (limited to 'tools/aapt2/java/ManifestClassGenerator_test.cpp')
-rw-r--r-- | tools/aapt2/java/ManifestClassGenerator_test.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/aapt2/java/ManifestClassGenerator_test.cpp b/tools/aapt2/java/ManifestClassGenerator_test.cpp index 9f6ec210a6a7..c744e9bd4fc9 100644 --- a/tools/aapt2/java/ManifestClassGenerator_test.cpp +++ b/tools/aapt2/java/ManifestClassGenerator_test.cpp @@ -84,6 +84,8 @@ TEST(ManifestClassGeneratorTest, CommentsAndAnnotationsArePresent) { @hide @SystemApi --> <permission android:name="android.permission.SECRET" /> + <!-- @TestApi This is a test only permission. --> + <permission android:name="android.permission.TEST_ONLY" /> </manifest>)"); std::string actual; @@ -110,6 +112,13 @@ TEST(ManifestClassGeneratorTest, CommentsAndAnnotationsArePresent) { @android.annotation.SystemApi public static final String SECRET="android.permission.SECRET";)"; EXPECT_THAT(actual, HasSubstr(expected_secret)); + + const char* expected_test = R"( /** + * This is a test only permission. + */ + @android.annotation.TestApi + public static final String TEST_ONLY="android.permission.TEST_ONLY";)"; + EXPECT_THAT(actual, HasSubstr(expected_test)); } static ::testing::AssertionResult GetManifestClassText(IAaptContext* context, xml::XmlResource* res, |