chromium/base/strings/cstring_view_unittest.cc

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

#include "base/strings/cstring_view.h"

#include <concepts>
#include <limits>
#include <sstream>
#include <type_traits>

#include "base/containers/span.h"
#include "base/debug/alias.h"
#include "base/ranges/algorithm.h"
#include "base/strings/strcat.h"
#include "base/test/gtest_util.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace base {
namespace {

static_assert;
static_assert;
static_assert;
static_assert;
static_assert;
static_assert;

static_assert;
static_assert;

// The view is the size of 2 pointers (technically, pointer and address).
static_assert;

static_assert;
static_assert;
static_assert;
#if BUILDFLAG(IS_WIN)
static_assert(wcstring_view::npos == std::wstring_view::npos);
#endif

TEST(CStringViewTest, DefaultConstructed) {}

TEST(CStringViewTest, LiteralConstructed) {}

TEST(CStringViewTest, PointerSizeConstructed) {}

TEST(CStringViewTest, StringConstructed) {}

TEST(CStringViewTest, Equality) {}

TEST(CStringViewTest, Ordering) {}

TEST(CStringViewTest, Iterate) {}

TEST(CStringViewTest, IterateReverse) {}

TEST(CStringViewDeathTest, IterateBoundsChecked) {}

TEST(CStringViewTest, Index) {}

TEST(CStringViewDeathTest, IndexChecked) {}

TEST(CStringViewTest, FrontBack) {}

TEST(CStringViewDeathTest, FrontBackChecked) {}

TEST(CStringViewTest, Size) {}

TEST(CStringViewTest, Empty) {}

TEST(CStringViewTest, MaxSize) {}

TEST(CStringViewTest, ToSpan) {}

TEST(CStringViewTest, Cstr) {}

TEST(CStringViewTest, CopyConstuct) {}

TEST(CStringViewTest, CopyAssign) {}

TEST(CStringViewTest, RemovePrefix) {}

TEST(CStringViewDeathTest, RemovePrefixChecked) {}

TEST(CStringViewTest, Swap) {}

TEST(CStringViewTest, Substr) {}

TEST(CStringViewDeathTest, SubstrBoundsChecked) {}

TEST(CStringViewTest, StartsWith) {}

TEST(CStringViewTest, EndsWith) {}

TEST(CStringViewTest, Find) {}

TEST(CStringViewTest, Rfind) {}

TEST(CStringViewTest, FindFirstOf) {}

TEST(CStringViewTest, FindLastOf) {}

TEST(CStringViewTest, FindFirstNotOf) {}

TEST(CStringViewTest, FindLastNotOf) {}

TEST(CStringViewTest, ToString) {}

TEST(CStringViewTest, Hash) {}

TEST(CStringViewTest, IntoStdStringView) {}

TEST(CStringViewTest, IntoStdString) {}

TEST(CStringViewTest, StringPlus) {}

TEST(CStringViewTest, StringAppend) {}

TEST(CStringViewTest, StringInsert) {}

TEST(CStringViewTest, StringReplace) {}

TEST(CStringViewTest, StringFind) {}

TEST(CStringViewTest, StringCompare) {}

TEST(CStringViewTest, StringStartsEndsWith) {}

TEST(CStringViewTest, StrCat) {}

TEST(CStringViewTest, Example_CtorLiteral) {}

TEST(CStringViewTest, CompatibleWithRanges) {}

TEST(CStringViewTest, ConstructFromStringLiteralWithEmbeddedNul) {}

}  // namespace
}  // namespace base