#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "components/reporting/util/file.h"
#include <string>
#include "base/files/file.h"
#include "base/files/scoped_temp_dir.h"
#include "base/test/test_file_util.h"
#include "components/reporting/util/status_macros.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
StrEq;
namespace reporting {
namespace {
constexpr char kNewFile[] = …;
constexpr char kWriteDataOne[] = …;
constexpr char kWriteDataTwo[] = …;
constexpr char kMultiLineData[] = …;
constexpr size_t kMultiLineDataLineLength = …;
constexpr size_t kMultiLineDataLines = …;
constexpr size_t kOverFlowPos = …;
void RemoveAndTruncateTest(const base::FilePath& file_path,
uint32_t pos,
int expected_lines_removed) { … }
TEST(FileTest, DeleteFileWarnIfFailed) { … }
TEST(FileTest, DeleteFilesWarnIfFailed) { … }
TEST(FileTest, DeleteFilesWarnIfFailedSubSubDir) { … }
TEST(FileTest, ReadWriteFile) { … }
TEST(FileTest, AppendLine) { … }
TEST(FileTest, RemoveAndTruncateLine) { … }
}
}