chromium/components/zucchini/buffer_source_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.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "components/zucchini/buffer_source.h"

#include <stddef.h>
#include <stdint.h>

#include <algorithm>
#include <iterator>
#include <string>
#include <tuple>
#include <vector>

#include "components/zucchini/test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace zucchini {

vec;

class BufferSourceTest : public testing::Test {};

TEST_F(BufferSourceTest, CtorWithOffset) {}

TEST_F(BufferSourceTest, Skip) {}

TEST_F(BufferSourceTest, SkipAcrossEnd) {}

TEST_F(BufferSourceTest, CheckNextBytes) {}

TEST_F(BufferSourceTest, ConsumeBytes) {}

TEST_F(BufferSourceTest, CheckNextValue) {}

// Supported by MSVC, g++, and clang++.
// Ensures unaligned data access and no gaps in packing.
#pragma pack(push, 1)

// Trivial wrapper for uint32_t, to ensure data access is unaligned.
struct UnalignedUint32T {};

struct ValueType {};
#pragma pack(pop)

TEST_F(BufferSourceTest, GetValueIntegral) {}

TEST_F(BufferSourceTest, GetValueAggregate) {}

TEST_F(BufferSourceTest, GetValueUnaligned) {}

TEST_F(BufferSourceTest, GetRegion) {}

TEST_F(BufferSourceTest, GetPointerIntegral) {}

TEST_F(BufferSourceTest, GetPointerIntegralMisaligned) {}

TEST_F(BufferSourceTest, GetPointerAggregate) {}

TEST_F(BufferSourceTest, GetArrayIntegral) {}

TEST_F(BufferSourceTest, GetArrayIntegralMisaligned) {}

TEST_F(BufferSourceTest, GetArrayAggregate) {}

TEST_F(BufferSourceTest, GetUleb128) {}

TEST_F(BufferSourceTest, GetSleb128) {}

TEST_F(BufferSourceTest, SkipLeb128) {}

}  // namespace zucchini