diff options
author | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-22 00:19:24 +0000 |
---|---|---|
committer | cpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-22 00:19:24 +0000 |
commit | 0d85afc71c8038e51d1f75ecbcc4621f4e47e2a3 (patch) | |
tree | 3e30ca543dec4d5ad7941ac3dbcb55d389d0f399 /courgette | |
parent | c4b7628d0fc77f4c2937914da148e978486ab41c (diff) | |
download | chromium_src-0d85afc71c8038e51d1f75ecbcc4621f4e47e2a3.zip chromium_src-0d85afc71c8038e51d1f75ecbcc4621f4e47e2a3.tar.gz chromium_src-0d85afc71c8038e51d1f75ecbcc4621f4e47e2a3.tar.bz2 |
Replaces the uses of the deprecated AppendPath function in courgette
this is same http://codereview.chromium.org/196022
commiting for him.
BUG=none
TEST=the modified test should run fine.
TBR=sra
Review URL: http://codereview.chromium.org/214044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26768 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'courgette')
-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"); |