#include "file_test.h"
#include <algorithm>
#include <utility>
#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <openssl/err.h>
#include <openssl/mem.h>
#include "../internal.h"
#include "./test_util.h"
FileTest::FileTest(std::unique_ptr<FileTest::LineReader> reader,
std::function<void(const std::string &)> comment_callback,
bool is_kas_test)
: … { … }
FileTest::~FileTest() { … }
static const char *FindDelimiter(const char *str) { … }
static std::string StripSpace(const char *str, size_t len) { … }
static std::pair<std::string, std::string> ParseKeyValue(const char *str, const size_t len) { … }
FileTest::ReadResult FileTest::ReadNext() { … }
void FileTest::PrintLine(const char *format, ...) { … }
const std::string &FileTest::GetType() { … }
const std::string &FileTest::GetParameter() { … }
bool FileTest::HasAttribute(const std::string &key) { … }
bool FileTest::GetAttribute(std::string *out_value, const std::string &key) { … }
const std::string &FileTest::GetAttributeOrDie(const std::string &key) { … }
bool FileTest::HasInstruction(const std::string &key) { … }
bool FileTest::GetInstruction(std::string *out_value, const std::string &key) { … }
void FileTest::IgnoreAllUnusedInstructions() { … }
const std::string &FileTest::GetInstructionOrDie(const std::string &key) { … }
bool FileTest::GetInstructionBytes(std::vector<uint8_t> *out,
const std::string &key) { … }
const std::string &FileTest::CurrentTestToString() const { … }
bool FileTest::GetBytes(std::vector<uint8_t> *out, const std::string &key) { … }
void FileTest::ClearTest() { … }
void FileTest::ClearInstructions() { … }
void FileTest::OnKeyUsed(const std::string &key) { … }
void FileTest::OnInstructionUsed(const std::string &key) { … }
bool FileTest::ConvertToBytes(std::vector<uint8_t> *out,
const std::string &value) { … }
bool FileTest::IsAtNewInstructionBlock() const { … }
void FileTest::InjectInstruction(const std::string &key,
const std::string &value) { … }
class FileLineReader : public FileTest::LineReader { … };
int FileTestMain(FileTestFunc run_test, void *arg, const char *path) { … }
int FileTestMain(const FileTest::Options &opts) { … }
void FileTest::SkipCurrent() { … }