chromium/components/system_cpu/procfs_stat_cpu_parser_unittest.cc

// Copyright 2021 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/system_cpu/procfs_stat_cpu_parser.h"

#include <memory>
#include <string>
#include <string_view>
#include <vector>

#include "base/files/file.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace system_cpu {

class ProcfsStatCpuParserTest : public testing::Test {};

TEST_F(ProcfsStatCpuParserTest, ProductionDataNoCrash) {}

TEST_F(ProcfsStatCpuParserTest, MissingFile) {}

TEST_F(ProcfsStatCpuParserTest, EmptyFile) {}

TEST_F(ProcfsStatCpuParserTest, SingleCoreSingleDigit) {}

TEST_F(ProcfsStatCpuParserTest, SingleCoreMultipleDigits) {}

TEST_F(ProcfsStatCpuParserTest, SingleCoreTooManyNumbers) {}

TEST_F(ProcfsStatCpuParserTest, SingleCoreTooFewNumbers) {}

TEST_F(ProcfsStatCpuParserTest, SingleCoreNoNumbers) {}

TEST_F(ProcfsStatCpuParserTest, IncorrectCoreSpecifier) {}

TEST_F(ProcfsStatCpuParserTest, InvalidFirstNumber) {}

TEST_F(ProcfsStatCpuParserTest, InvalidNumberSkipped) {}

TEST_F(ProcfsStatCpuParserTest, SingleCoreIgnoresCounterDecrease) {}

TEST_F(ProcfsStatCpuParserTest, MissingCores) {}

TEST_F(ProcfsStatCpuParserTest, MultipleCores) {}

}  // namespace system_cpu