chromium/components/cbor/reader_unittest.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/cbor/reader.h"

#include <limits>
#include <utility>

#include "base/containers/span.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

/* Leveraging RFC 7049 examples from
   https://github.com/cbor/test-vectors/blob/master/appendix_a.json. */
namespace cbor {

namespace {

std::vector<uint8_t> WithExtraneousData(base::span<const uint8_t> original) {}

}  // namespace

TEST(CBORReaderTest, TestReadUint) {}

TEST(CBORReaderTest, TestUintEncodedWithNonMinimumByteLength) {}

TEST(CBORReaderTest, TestReadNegativeInt) {}

TEST(CBORReaderTest, TestReadBytes) {}

TEST(CBORReaderTest, TestReadString) {}

TEST(CBORReaderTest, TestReadStringWithNUL) {}

TEST(CBORReaderTest, TestReadStringWithInvalidByteSequenceAfterNUL) {}

TEST(CBORReaderTest, TestReadArray) {}

TEST(CBORReaderTest, TestReadMapWithMapValue) {}

TEST(CBORReaderTest, TestReadMapWithIntegerKeys) {}

TEST(CBORReaderTest, TestReadMapWithNegativeIntegersKeys) {}

TEST(CBORReaderTest, TestReadMapWithArray) {}

TEST(CBORReaderTest, TestReadMapWithTextStringKeys) {}

TEST(CBORReaderTest, TestReadMapWithByteStringKeys) {}

TEST(CBORReaderTest, TestReadMapWithMixedKeys) {}

TEST(CBORReaderTest, TestReadNestedMap) {}

TEST(CBORReaderTest, TestIntegerRange) {}

TEST(CBORReaderTest, TestIntegerOutOfRangeError) {}

TEST(CBORReaderTest, TestReadSimpleValue) {}

TEST(CBORReaderTest, TestReadFloatingPointNumbers) {}

TEST(CBORReaderTest, TestReadNonMinimalFloatingPointNumbers) {}

TEST(CBORReaderTest, TestReadUnsupportedFloatingPointNumbers) {}

TEST(CBORReaderTest, TestIncompleteCBORDataError) {}

// While RFC 7049 allows CBOR map keys with all types, current decoder only
// supports unsigned integer and string keys.
TEST(CBORReaderTest, TestUnsupportedMapKeyFormatError) {}

TEST(CBORReaderTest, TestUnknownAdditionalInfoError) {}

TEST(CBORReaderTest, TestTooMuchNestingError) {}

TEST(CBORReaderTest, TestOutOfOrderKeyError) {}

TEST(CBORReaderTest, TestOutOfOrderKeyErrorWithDuplicateKeys) {}

TEST(CBORReaderTest, TestDuplicateKeyError) {}

// Leveraging Markus Kuhn’s UTF-8 decoder stress test. See
// http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt for details.
TEST(CBORReaderTest, TestIncorrectStringEncodingError) {}

TEST(CBORReaderTest, TestExtraneousCBORDataError) {}

TEST(CBORReaderTest, TestUnsupportedSimpleValue) {}

TEST(CBORReaderTest, TestSuperLongContentDontCrash) {}

TEST(CBORReaderTest, AllowInvalidUTF8) {}

}  // namespace cbor