chromium/components/reporting/util/file_unittest.cc

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#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) {}

}  // namespace
}  // namespace reporting