AAPT2: Few tweaks to get shared-libraries working

Test: manual (building shared support library demo)
Change-Id: I4730645aa92ba1893baf67ffe35fbd4aac0f8e46
This commit is contained in:
Adam Lesinski
2017-02-22 19:29:29 -08:00
parent 9a53d03104
commit b5dc4bd49a
12 changed files with 132 additions and 71 deletions

View File

@@ -381,7 +381,9 @@ TEST(JavaClassGeneratorTest, GenerateOnResourcesLoadedCallbackForSharedLibrary)
JavaClassGeneratorOptions options;
options.use_final = false;
options.generate_rewrite_callback = true;
options.rewrite_callback_options = OnResourcesLoadedCallbackOptions{
{"com.foo", "com.boo"},
};
JavaClassGenerator generator(context.get(), table.get(), options);
std::stringstream out;
@@ -389,7 +391,9 @@ TEST(JavaClassGeneratorTest, GenerateOnResourcesLoadedCallbackForSharedLibrary)
std::string actual = out.str();
EXPECT_NE(std::string::npos, actual.find("onResourcesLoaded"));
EXPECT_NE(std::string::npos, actual.find("void onResourcesLoaded"));
EXPECT_NE(std::string::npos, actual.find("com.foo.R.onResourcesLoaded"));
EXPECT_NE(std::string::npos, actual.find("com.boo.R.onResourcesLoaded"));
}
} // namespace aapt