#include "absl/types/span.h"
#include <array>
#include <initializer_list>
#include <numeric>
#include <stdexcept>
#include <string>
#include <type_traits>
#include <vector>
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "absl/base/attributes.h"
#include "absl/base/config.h"
#include "absl/base/internal/exception_testing.h"
#include "absl/base/options.h"
#include "absl/container/fixed_array.h"
#include "absl/container/inlined_vector.h"
#include "absl/hash/hash_testing.h"
#include "absl/meta/type_traits.h"
#include "absl/strings/str_cat.h"
namespace {
static_assert …;
MATCHER_P(DataIs, data,
absl::StrCat("data() ", negation ? "isn't " : "is ",
testing::PrintToString(data))) { … }
template <typename T>
auto SpanIs(T data, size_t size)
-> decltype(testing::AllOf(DataIs(data), testing::SizeIs(size))) { … }
template <typename Container>
auto SpanIs(const Container& c) -> decltype(SpanIs(c.data(), c.size())) { … }
std::vector<int> MakeRamp(int len, int offset = 0) { … }
TEST(IntSpan, EmptyCtors) { … }
TEST(IntSpan, PtrLenCtor) { … }
TEST(IntSpan, ArrayCtor) { … }
template <typename T>
void TakesGenericSpan(absl::Span<T>) { … }
TEST(IntSpan, ContainerCtor) { … }
struct ContainerWithShallowConstData { … };
TEST(IntSpan, ShallowConstness) { … }
TEST(CharSpan, StringCtor) { … }
TEST(IntSpan, FromConstPointer) { … }
struct TypeWithMisleadingData { … };
struct TypeWithMisleadingSize { … };
TEST(IntSpan, EvilTypes) { … }
struct Base { … };
struct Derived : Base { … };
TEST(IntSpan, SpanOfDerived) { … }
void TestInitializerList(absl::Span<const int> s, const std::vector<int>& v) { … }
TEST(ConstIntSpan, InitializerListConversion) { … }
TEST(IntSpan, Data) { … }
TEST(IntSpan, SizeLengthEmpty) { … }
TEST(IntSpan, ElementAccess) { … }
TEST(IntSpan, AtThrows) { … }
TEST(IntSpan, RemovePrefixAndSuffix) { … }
TEST(IntSpan, Subspan) { … }
TEST(IntSpan, First) { … }
TEST(IntSpan, Last) { … }
TEST(IntSpan, MakeSpanPtrLength) { … }
TEST(IntSpan, MakeSpanTwoPtrs) { … }
TEST(IntSpan, MakeSpanContainer) { … }
TEST(CharSpan, MakeSpanString) { … }
TEST(IntSpan, MakeSpanArray) { … }
template <typename Expected, typename T>
void CheckType(const T& ) { … }
TEST(IntSpan, MakeSpanTypes) { … }
TEST(ConstIntSpan, MakeConstSpanTypes) { … }
TEST(IntSpan, Equality) { … }
class IntSpanOrderComparisonTest : public testing::Test { … };
TEST_F(IntSpanOrderComparisonTest, CompareSpans) { … }
TEST_F(IntSpanOrderComparisonTest, SpanOfConstAndContainer) { … }
TEST_F(IntSpanOrderComparisonTest, SpanOfMutableAndContainer) { … }
TEST_F(IntSpanOrderComparisonTest, EqualSpans) { … }
TEST_F(IntSpanOrderComparisonTest, Subspans) { … }
TEST_F(IntSpanOrderComparisonTest, EmptySpans) { … }
TEST(IntSpan, ExposesContainerTypesAndConsts) { … }
TEST(IntSpan, IteratorsAndReferences) { … }
TEST(IntSpan, IteratorsAndReferences_Const) { … }
TEST(IntSpan, NoexceptTest) { … }
template <int i>
struct ConstexprTester { … };
#define ABSL_TEST_CONSTEXPR(expr) …
struct ContainerWithConstexprMethods { … };
TEST(ConstIntSpan, ConstexprTest) { … }
struct BigStruct { … };
TEST(Span, SpanSize) { … }
TEST(Span, Hash) { … }
}