diff options
author | Dan Albert <danalbert@google.com> | 2015-03-16 10:08:46 -0700 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2015-03-16 13:48:07 -0700 |
commit | a83ba64a238de57fa2d02c4ea20f4c8ff8ab1464 (patch) | |
tree | 0c4bf967c0cc52ccd6eca52564a1275ab2da33f2 /adb/adb_io_test.cpp | |
parent | 778b9c84b81cba056f0b9a3ba05ecd88331df00a (diff) | |
download | system_core-a83ba64a238de57fa2d02c4ea20f4c8ff8ab1464.zip system_core-a83ba64a238de57fa2d02c4ea20f4c8ff8ab1464.tar.gz system_core-a83ba64a238de57fa2d02c4ea20f4c8ff8ab1464.tar.bz2 |
Revert "Revert "Create libbase.""
This reverts commit a7870d88167f619e758b5bcd15b410d16da7c16b.
(cherry picked from commit c007bc3856a4cf86b8f610eb045f26a9dedc2894)
Diffstat (limited to 'adb/adb_io_test.cpp')
-rw-r--r-- | adb/adb_io_test.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/adb/adb_io_test.cpp b/adb/adb_io_test.cpp index 330d9ce..0c69bc9 100644 --- a/adb/adb_io_test.cpp +++ b/adb/adb_io_test.cpp @@ -24,7 +24,7 @@ #include <string> -#include "utils/file.h" +#include "base/file.h" class TemporaryFile { public: @@ -55,7 +55,7 @@ TEST(io, ReadFdExactly_whole) { TemporaryFile tf; ASSERT_NE(-1, tf.fd); - ASSERT_TRUE(android::WriteStringToFd(expected, tf.fd)) << strerror(errno); + ASSERT_TRUE(android::base::WriteStringToFd(expected, tf.fd)) << strerror(errno); ASSERT_EQ(0, lseek(tf.fd, SEEK_SET, 0)); // Test reading the whole file. @@ -69,7 +69,7 @@ TEST(io, ReadFdExactly_eof) { TemporaryFile tf; ASSERT_NE(-1, tf.fd); - ASSERT_TRUE(android::WriteStringToFd(expected, tf.fd)) << strerror(errno); + ASSERT_TRUE(android::base::WriteStringToFd(expected, tf.fd)) << strerror(errno); ASSERT_EQ(0, lseek(tf.fd, SEEK_SET, 0)); // Test that not having enough data will fail. @@ -83,7 +83,7 @@ TEST(io, ReadFdExactly_partial) { TemporaryFile tf; ASSERT_NE(-1, tf.fd); - ASSERT_TRUE(android::WriteStringToFd(input, tf.fd)) << strerror(errno); + ASSERT_TRUE(android::base::WriteStringToFd(input, tf.fd)) << strerror(errno); ASSERT_EQ(0, lseek(tf.fd, SEEK_SET, 0)); // Test reading a partial file. @@ -106,7 +106,7 @@ TEST(io, WriteFdExactly_whole) { ASSERT_EQ(0, lseek(tf.fd, SEEK_SET, 0)); std::string s; - ASSERT_TRUE(android::ReadFdToString(tf.fd, &s)); + ASSERT_TRUE(android::base::ReadFdToString(tf.fd, &s)); EXPECT_STREQ(expected, s.c_str()); } @@ -123,7 +123,7 @@ TEST(io, WriteFdExactly_partial) { expected.pop_back(); std::string s; - ASSERT_TRUE(android::ReadFdToString(tf.fd, &s)); + ASSERT_TRUE(android::base::ReadFdToString(tf.fd, &s)); EXPECT_EQ(expected, s); } @@ -137,6 +137,6 @@ TEST(io, WriteStringFully) { ASSERT_EQ(0, lseek(tf.fd, SEEK_SET, 0)); std::string s; - ASSERT_TRUE(android::ReadFdToString(tf.fd, &s)); + ASSERT_TRUE(android::base::ReadFdToString(tf.fd, &s)); EXPECT_STREQ(str, s.c_str()); } |