diff options
Diffstat (limited to 'brillo/streams/file_stream_unittest.cc')
-rw-r--r-- | brillo/streams/file_stream_unittest.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/brillo/streams/file_stream_unittest.cc b/brillo/streams/file_stream_unittest.cc index aa1ce43..4554ede 100644 --- a/brillo/streams/file_stream_unittest.cc +++ b/brillo/streams/file_stream_unittest.cc @@ -715,7 +715,7 @@ TEST_F(FileStreamTest, CreateTemporary) { TEST_F(FileStreamTest, OpenRead) { base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); - base::FilePath path = temp_dir.GetPath().Append(base::FilePath{"test.dat"}); + base::FilePath path = temp_dir.path().Append(base::FilePath{"test.dat"}); std::vector<char> buffer(1024 * 1024); base::RandBytes(buffer.data(), buffer.size()); int file_size = buffer.size(); // Stupid base::WriteFile taking "int" size. @@ -743,7 +743,7 @@ TEST_F(FileStreamTest, OpenRead) { TEST_F(FileStreamTest, OpenWrite) { base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); - base::FilePath path = temp_dir.GetPath().Append(base::FilePath{"test.dat"}); + base::FilePath path = temp_dir.path().Append(base::FilePath{"test.dat"}); std::vector<char> buffer(1024 * 1024); base::RandBytes(buffer.data(), buffer.size()); @@ -772,7 +772,7 @@ TEST_F(FileStreamTest, OpenWrite) { TEST_F(FileStreamTest, Open_OpenExisting) { base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); - base::FilePath path = temp_dir.GetPath().Append(base::FilePath{"test.dat"}); + base::FilePath path = temp_dir.path().Append(base::FilePath{"test.dat"}); std::string data{"Lorem ipsum dolor sit amet ..."}; int data_size = data.size(); // I hate ints for data size... ASSERT_EQ(data_size, base::WriteFile(path, data.data(), data_size)); @@ -794,7 +794,7 @@ TEST_F(FileStreamTest, Open_OpenExisting) { TEST_F(FileStreamTest, Open_OpenExisting_Fail) { base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); - base::FilePath path = temp_dir.GetPath().Append(base::FilePath{"test.dat"}); + base::FilePath path = temp_dir.path().Append(base::FilePath{"test.dat"}); ErrorPtr error; StreamPtr stream = FileStream::Open(path, @@ -809,7 +809,7 @@ TEST_F(FileStreamTest, Open_OpenExisting_Fail) { TEST_F(FileStreamTest, Open_CreateAlways_New) { base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); - base::FilePath path = temp_dir.GetPath().Append(base::FilePath{"test.dat"}); + base::FilePath path = temp_dir.path().Append(base::FilePath{"test.dat"}); StreamPtr stream = FileStream::Open(path, Stream::AccessMode::READ_WRITE, @@ -828,7 +828,7 @@ TEST_F(FileStreamTest, Open_CreateAlways_New) { TEST_F(FileStreamTest, Open_CreateAlways_Existing) { base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); - base::FilePath path = temp_dir.GetPath().Append(base::FilePath{"test.dat"}); + base::FilePath path = temp_dir.path().Append(base::FilePath{"test.dat"}); std::string data{"Lorem ipsum dolor sit amet ..."}; int data_size = data.size(); // I hate ints for data size... ASSERT_EQ(data_size, base::WriteFile(path, data.data(), data_size)); @@ -850,7 +850,7 @@ TEST_F(FileStreamTest, Open_CreateAlways_Existing) { TEST_F(FileStreamTest, Open_CreateNewOnly_New) { base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); - base::FilePath path = temp_dir.GetPath().Append(base::FilePath{"test.dat"}); + base::FilePath path = temp_dir.path().Append(base::FilePath{"test.dat"}); StreamPtr stream = FileStream::Open(path, Stream::AccessMode::READ_WRITE, @@ -869,7 +869,7 @@ TEST_F(FileStreamTest, Open_CreateNewOnly_New) { TEST_F(FileStreamTest, Open_CreateNewOnly_Existing) { base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); - base::FilePath path = temp_dir.GetPath().Append(base::FilePath{"test.dat"}); + base::FilePath path = temp_dir.path().Append(base::FilePath{"test.dat"}); std::string data{"Lorem ipsum dolor sit amet ..."}; int data_size = data.size(); // I hate ints for data size... ASSERT_EQ(data_size, base::WriteFile(path, data.data(), data_size)); @@ -887,7 +887,7 @@ TEST_F(FileStreamTest, Open_CreateNewOnly_Existing) { TEST_F(FileStreamTest, Open_TruncateExisting_New) { base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); - base::FilePath path = temp_dir.GetPath().Append(base::FilePath{"test.dat"}); + base::FilePath path = temp_dir.path().Append(base::FilePath{"test.dat"}); ErrorPtr error; StreamPtr stream = FileStream::Open( @@ -903,7 +903,7 @@ TEST_F(FileStreamTest, Open_TruncateExisting_New) { TEST_F(FileStreamTest, Open_TruncateExisting_Existing) { base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); - base::FilePath path = temp_dir.GetPath().Append(base::FilePath{"test.dat"}); + base::FilePath path = temp_dir.path().Append(base::FilePath{"test.dat"}); std::string data{"Lorem ipsum dolor sit amet ..."}; int data_size = data.size(); // I hate ints for data size... ASSERT_EQ(data_size, base::WriteFile(path, data.data(), data_size)); |