#ifdef UNSAFE_BUFFERS_BUILD
#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) { … }
}