chromium/third_party/boringssl/src/crypto/bytestring/bytestring_test.cc

/* Copyright (c) 2014, 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 <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <vector>

#include <gtest/gtest.h>

#include <openssl/bytestring.h>
#include <openssl/crypto.h>
#include <openssl/span.h>

#include "../internal.h"
#include "../test/test_util.h"
#include "internal.h"


TEST(CBSTest, Skip) {}

TEST(CBSTest, GetUint) {}

TEST(CBSTest, GetPrefixed) {}

TEST(CBSTest, GetPrefixedBad) {}

TEST(CBSTest, GetUntilFirst) {}

TEST(CBSTest, GetASN1) {}

TEST(CBSTest, ParseASN1Tag) {}

TEST(CBSTest, GetOptionalASN1Bool) {}

// Test that CBB_init may be used on an uninitialized input.
TEST(CBBTest, InitUninitialized) {}

TEST(CBBTest, Basic) {}

TEST(CBBTest, Fixed) {}

// Test that calling CBB_finish on a child does nothing.
TEST(CBBTest, FinishChild) {}

TEST(CBBTest, Prefixed) {}

TEST(CBBTest, DiscardChild) {}

TEST(CBBTest, Misuse) {}

TEST(CBBTest, ASN1) {}

static void ExpectBerConvert(const char *name,
                             bssl::Span<const uint8_t> der_expected,
                             bssl::Span<const uint8_t> ber) {}

TEST(CBSTest, BerConvert) {}

struct BERTest {};

static const BERTest kBERTests[] =;

TEST(CBSTest, BERElementTest) {}

struct ImplicitStringTest {};

static const ImplicitStringTest kImplicitStringTests[] =;

TEST(CBSTest, ImplicitString) {}

struct ASN1Uint64Test {};

static const ASN1Uint64Test kASN1Uint64Tests[] =;

struct ASN1InvalidUint64Test {};

static const ASN1InvalidUint64Test kASN1InvalidUint64Tests[] =;

TEST(CBSTest, ASN1Uint64) {}

struct ASN1Int64Test {};

static const ASN1Int64Test kASN1Int64Tests[] =;

struct ASN1InvalidInt64Test {};

static const ASN1InvalidInt64Test kASN1InvalidInt64Tests[] =;

TEST(CBSTest, ASN1Int64) {}

TEST(CBBTest, Zero) {}

TEST(CBBTest, Reserve) {}

// Test that CBB errors are sticky; once on operation on CBB fails, all
// subsequent ones do.
TEST(CBBTest, StickyError) {}

TEST(CBSTest, BitString) {}

TEST(CBBTest, AddOIDFromText) {}

TEST(CBBTest, FlushASN1SetOf) {}

template <class T>
static std::vector<uint8_t> LiteralToBytes(const T *str) {}

static std::vector<uint32_t> LiteralToCodePoints(const char32_t *str) {}

TEST(CBBTest, Unicode) {}

TEST(CBSTest, BogusTime) {}

TEST(CBSTest, GetU64Decimal) {}