diff options
author | Adam Lesinski <adamlesinski@google.com> | 2016-10-21 17:56:45 -0700 |
---|---|---|
committer | Adam Lesinski <adamlesinski@google.com> | 2016-10-26 19:30:23 -0700 |
commit | ce5e56e243d262a9b65459c3bd0bb9eaadd40628 (patch) | |
tree | cf0ecea98883d090d8d2856fc6d32046c7e3d9e8 /tools/aapt2/java/AnnotationProcessor_test.cpp | |
parent | 0f7cc4dc2c49a30c072cbc7aa6c0c5d5c31496d4 (diff) |
AAPT2: Rename to match new style
Use Google3 naming style to match new
projects' and open source google projects' style.
Preferred to do this in a massive CL so as to avoid
style inconsistencies that plague legacy code bases.
This is a relatively NEW code base, may as well keep
it up to date.
Test: name/style refactor - existing tests pass
Change-Id: Ie80ecb78d46ec53efdfca2336bb57d96cbb7fb87
Diffstat (limited to 'tools/aapt2/java/AnnotationProcessor_test.cpp')
-rw-r--r-- | tools/aapt2/java/AnnotationProcessor_test.cpp | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/tools/aapt2/java/AnnotationProcessor_test.cpp b/tools/aapt2/java/AnnotationProcessor_test.cpp index 5a39add48fbd..3e43c4295c07 100644 --- a/tools/aapt2/java/AnnotationProcessor_test.cpp +++ b/tools/aapt2/java/AnnotationProcessor_test.cpp @@ -15,38 +15,39 @@ */ #include "java/AnnotationProcessor.h" + #include "test/Test.h" namespace aapt { TEST(AnnotationProcessorTest, EmitsDeprecated) { - const char* comment = "Some comment, and it should contain a marker word, " - "something that marks this resource as nor needed. " - "{@deprecated That's the marker! }"; + const char* comment = + "Some comment, and it should contain a marker word, " + "something that marks this resource as nor needed. " + "{@deprecated That's the marker! }"; - AnnotationProcessor processor; - processor.appendComment(comment); + AnnotationProcessor processor; + processor.AppendComment(comment); - std::stringstream result; - processor.writeToStream(&result, ""); - std::string annotations = result.str(); + std::stringstream result; + processor.WriteToStream(&result, ""); + std::string annotations = result.str(); - EXPECT_NE(std::string::npos, annotations.find("@Deprecated")); + EXPECT_NE(std::string::npos, annotations.find("@Deprecated")); } TEST(AnnotationProcessorTest, EmitsSystemApiAnnotationAndRemovesFromComment) { - AnnotationProcessor processor; - processor.appendComment("@SystemApi This is a system API"); + AnnotationProcessor processor; + processor.AppendComment("@SystemApi This is a system API"); - std::stringstream result; - processor.writeToStream(&result, ""); - std::string annotations = result.str(); + std::stringstream result; + processor.WriteToStream(&result, ""); + std::string annotations = result.str(); - EXPECT_NE(std::string::npos, annotations.find("@android.annotation.SystemApi")); - EXPECT_EQ(std::string::npos, annotations.find("@SystemApi")); - EXPECT_NE(std::string::npos, annotations.find("This is a system API")); + EXPECT_NE(std::string::npos, + annotations.find("@android.annotation.SystemApi")); + EXPECT_EQ(std::string::npos, annotations.find("@SystemApi")); + EXPECT_NE(std::string::npos, annotations.find("This is a system API")); } -} // namespace aapt - - +} // namespace aapt |