diff options
-rw-r--r-- | courgette/bsdiff_memory_unittest.cc | 14 | ||||
-rw-r--r-- | courgette/encode_decode_unittest.cc | 10 | ||||
-rw-r--r-- | courgette/image_info_unittest.cc | 10 |
3 files changed, 17 insertions, 17 deletions
diff --git a/courgette/bsdiff_memory_unittest.cc b/courgette/bsdiff_memory_unittest.cc index 97da726..a384dee 100644 --- a/courgette/bsdiff_memory_unittest.cc +++ b/courgette/bsdiff_memory_unittest.cc @@ -17,23 +17,23 @@ class BSDiffMemoryTest : public testing::Test { public: - std::string FileContents(const char *file_name) const; + std::string FileContents(const char* file_name) const; void GenerateAndTestPatch(const std::string& a, const std::string& b) const; private: void SetUp() { PathService::Get(base::DIR_SOURCE_ROOT, &test_dir_); - file_util::AppendToPath(&test_dir_, L"courgette"); - file_util::AppendToPath(&test_dir_, L"testdata"); + test_dir_ = test_dir_.AppendASCII("courgette"); + test_dir_ = test_dir_.AppendASCII("testdata"); } - std::wstring test_dir_; + FilePath test_dir_; }; // Reads a test file into a string. -std::string BSDiffMemoryTest::FileContents(const char *file_name) const { - std::wstring file_path = test_dir_; - file_util::AppendToPath(&file_path, UTF8ToWide(file_name)); +std::string BSDiffMemoryTest::FileContents(const char* file_name) const { + FilePath file_path = test_dir_; + file_path = file_path.AppendASCII(file_name); std::string file_bytes; if (!file_util::ReadFileToString(file_path, &file_bytes)) { EXPECT_TRUE(!"Could not read test data"); diff --git a/courgette/encode_decode_unittest.cc b/courgette/encode_decode_unittest.cc index 3246f3c..2396938 100644 --- a/courgette/encode_decode_unittest.cc +++ b/courgette/encode_decode_unittest.cc @@ -20,8 +20,8 @@ class EncodeDecodeTest : public testing::Test { private: void SetUp() { PathService::Get(base::DIR_SOURCE_ROOT, &testdata_dir_); - file_util::AppendToPath(&testdata_dir_, L"courgette"); - file_util::AppendToPath(&testdata_dir_, L"testdata"); + testdata_dir_ = testdata_dir_.AppendASCII("courgette"); + testdata_dir_ = testdata_dir_.AppendASCII("testdata"); } void TearDown() { } @@ -29,13 +29,13 @@ class EncodeDecodeTest : public testing::Test { // Returns contents of |file_name| as uninterprested bytes stored in a string. std::string FileContents(const char* file_name) const; - std::wstring testdata_dir_; // Full path name of testdata directory + FilePath testdata_dir_; // Full path name of testdata directory }; // Reads a test file into a string. std::string EncodeDecodeTest::FileContents(const char* file_name) const { - std::wstring file_path = testdata_dir_; - file_util::AppendToPath(&file_path, UTF8ToWide(file_name)); + FilePath file_path = testdata_dir_; + file_path = file_path.AppendASCII(file_name); std::string file_contents; if (!file_util::ReadFileToString(file_path, &file_contents)) { EXPECT_TRUE(!"Could not read test data"); diff --git a/courgette/image_info_unittest.cc b/courgette/image_info_unittest.cc index 377b95b..3f348c1 100644 --- a/courgette/image_info_unittest.cc +++ b/courgette/image_info_unittest.cc @@ -21,8 +21,8 @@ class ImageInfoTest : public testing::Test { private: void SetUp() { PathService::Get(base::DIR_SOURCE_ROOT, &test_dir_); - file_util::AppendToPath(&test_dir_, L"courgette"); - file_util::AppendToPath(&test_dir_, L"testdata"); + test_dir_ = test_dir_.AppendASCII("courgette"); + test_dir_ = test_dir_.AppendASCII("testdata"); } void TearDown() { @@ -32,13 +32,13 @@ class ImageInfoTest : public testing::Test { std::string FileContents(const char* file_name) const; - std::wstring test_dir_; + FilePath test_dir_; }; // Reads a test file into a string. std::string ImageInfoTest::FileContents(const char* file_name) const { - std::wstring file_path = test_dir_; - file_util::AppendToPath(&file_path, UTF8ToWide(file_name)); + FilePath file_path = test_dir_; + file_path = file_path.AppendASCII(file_name); std::string file_bytes; if (!file_util::ReadFileToString(file_path, &file_bytes)) { EXPECT_TRUE(!"Could not read test data"); |