summaryrefslogtreecommitdiff
path: root/tools/aapt2/NameMangler_test.cpp
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2016-10-21 17:56:45 -0700
committerAdam Lesinski <adamlesinski@google.com>2016-10-26 19:30:23 -0700
commitce5e56e243d262a9b65459c3bd0bb9eaadd40628 (patch)
treecf0ecea98883d090d8d2856fc6d32046c7e3d9e8 /tools/aapt2/NameMangler_test.cpp
parent0f7cc4dc2c49a30c072cbc7aa6c0c5d5c31496d4 (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/NameMangler_test.cpp')
-rw-r--r--tools/aapt2/NameMangler_test.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/tools/aapt2/NameMangler_test.cpp b/tools/aapt2/NameMangler_test.cpp
index b02986d8e611..bc89b5c3fb43 100644
--- a/tools/aapt2/NameMangler_test.cpp
+++ b/tools/aapt2/NameMangler_test.cpp
@@ -15,31 +15,32 @@
*/
#include "NameMangler.h"
-#include "test/Test.h"
#include <string>
+#include "test/Test.h"
+
namespace aapt {
TEST(NameManglerTest, MangleName) {
std::string package = "android.appcompat";
std::string name = "Platform.AppCompat";
- std::string mangledName = NameMangler::mangleEntry(package, name);
- EXPECT_EQ(mangledName, "android.appcompat$Platform.AppCompat");
+ std::string mangled_name = NameMangler::MangleEntry(package, name);
+ EXPECT_EQ(mangled_name, "android.appcompat$Platform.AppCompat");
- std::string unmangledPackage;
- std::string unmangledName = mangledName;
- ASSERT_TRUE(NameMangler::unmangle(&unmangledName, &unmangledPackage));
- EXPECT_EQ(unmangledName, "Platform.AppCompat");
- EXPECT_EQ(unmangledPackage, "android.appcompat");
+ std::string unmangled_package;
+ std::string unmangled_name = mangled_name;
+ ASSERT_TRUE(NameMangler::Unmangle(&unmangled_name, &unmangled_package));
+ EXPECT_EQ(unmangled_name, "Platform.AppCompat");
+ EXPECT_EQ(unmangled_package, "android.appcompat");
}
TEST(NameManglerTest, IgnoreUnmangledName) {
std::string package;
std::string name = "foo_bar";
- EXPECT_FALSE(NameMangler::unmangle(&name, &package));
+ EXPECT_FALSE(NameMangler::Unmangle(&name, &package));
EXPECT_EQ(name, "foo_bar");
}