#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "gpu/config/gpu_test_expectations_parser.h"
#include <stddef.h>
#include <stdint.h>
#include "base/check_op.h"
#include "base/files/file_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
namespace gpu {
namespace {
enum LineParserStage { … };
enum Token { … };
struct TokenInfo { … };
const TokenInfo kTokenData[] = …;
enum ErrorType { … };
const char* kErrorMessage[] = …;
Token ParseToken(const std::string& word) { … }
bool NamesMatching(const std::string& ref, const std::string& test_name) { … }
}
GPUTestExpectationsParser::GPUTestExpectationsParser() { … }
GPUTestExpectationsParser::~GPUTestExpectationsParser() = default;
bool GPUTestExpectationsParser::LoadTestExpectations(const std::string& data) { … }
bool GPUTestExpectationsParser::LoadTestExpectations(
const base::FilePath& path) { … }
int32_t GPUTestExpectationsParser::GetTestExpectation(
const std::string& test_name,
const GPUTestBotConfig& bot_config) const { … }
const std::vector<std::string>&
GPUTestExpectationsParser::GetErrorMessages() const { … }
bool GPUTestExpectationsParser::ParseConfig(
const std::string& config_data, GPUTestConfig* config) { … }
bool GPUTestExpectationsParser::ParseLine(
const std::string& line_data, size_t line_number) { … }
bool GPUTestExpectationsParser::UpdateTestConfig(GPUTestConfig* config,
int32_t token,
size_t line_number) { … }
bool GPUTestExpectationsParser::UpdateTestConfig(
GPUTestConfig* config,
const std::string& gpu_device_id,
size_t line_number) { … }
bool GPUTestExpectationsParser::DetectConflictsBetweenEntries() { … }
void GPUTestExpectationsParser::PushErrorMessage(
const std::string& message, size_t line_number) { … }
void GPUTestExpectationsParser::PushErrorMessage(
const std::string& message,
size_t entry1_line_number,
size_t entry2_line_number) { … }
GPUTestExpectationsParser:: GPUTestExpectationEntry::GPUTestExpectationEntry()
: … { … }
}