chromium/third_party/boringssl/src/crypto/test/file_test.cc

/* Copyright (c) 2015, Google Inc.
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */

#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() {}

// FindDelimiter returns a pointer to the first '=' or ':' in |str| or nullptr
// if there is none.
static const char *FindDelimiter(const char *str) {}

// StripSpace returns a string containing up to |len| characters from |str| with
// leading and trailing whitespace removed.
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() {}