summaryrefslogtreecommitdiff
path: root/adb/adb_utils_test.cpp
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2017-02-23 21:23:05 -0800
committerColin Cross <ccross@android.com>2017-02-27 18:18:31 -0800
commit58021d15c94eb6a81d2673634956b5374af6a1e5 (patch)
tree8c0b0a97ac977600f45e75fc1d6664594e30b56c /adb/adb_utils_test.cpp
parent0cde0eae09e1a3751bb0d921e289ba5cdc228965 (diff)
Move adb_dirname and adb_basename to libbase
adb already provides an implementation of dirname and basename that take and produce std::strings, move it into libbase so it can be used in the implementation of GetExecutableDirectory. Test: out/host/linux-x86/nativetest64/adb_test/adb_test Test: out/host/linux-x86/nativetest64/libbase_test/libbase_test Test: adb shell /data/nativetest64/libbase_test/libbase_test64 Change-Id: Ideb1627607b14562121316d4ed27fa6fb0930684
Diffstat (limited to 'adb/adb_utils_test.cpp')
-rw-r--r--adb/adb_utils_test.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/adb/adb_utils_test.cpp b/adb/adb_utils_test.cpp
index 4cac485080..a3bc445604 100644
--- a/adb/adb_utils_test.cpp
+++ b/adb/adb_utils_test.cpp
@@ -109,18 +109,6 @@ TEST(adb_utils, escape_arg) {
ASSERT_EQ(R"('abc)')", escape_arg("abc)"));
}
-TEST(adb_utils, adb_basename) {
- EXPECT_EQ("sh", adb_basename("/system/bin/sh"));
- EXPECT_EQ("sh", adb_basename("sh"));
- EXPECT_EQ("sh", adb_basename("/system/bin/sh/"));
-}
-
-TEST(adb_utils, adb_dirname) {
- EXPECT_EQ("/system/bin", adb_dirname("/system/bin/sh"));
- EXPECT_EQ(".", adb_dirname("sh"));
- EXPECT_EQ("/system/bin", adb_dirname("/system/bin/sh/"));
-}
-
void test_mkdirs(const std::string& basepath) {
// Test creating a directory hierarchy.
ASSERT_TRUE(mkdirs(basepath));