From a83ba64a238de57fa2d02c4ea20f4c8ff8ab1464 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Mon, 16 Mar 2015 10:08:46 -0700 Subject: Revert "Revert "Create libbase."" This reverts commit a7870d88167f619e758b5bcd15b410d16da7c16b. (cherry picked from commit c007bc3856a4cf86b8f610eb045f26a9dedc2894) --- adb/adb_io_test.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'adb/adb_io_test.cpp') 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 -#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()); } -- cgit v1.1