chromium/third_party/abseil-cpp/absl/strings/internal/cordz_info_test.cc

// Copyright 2019 The Abseil Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include "absl/strings/internal/cordz_info.h"

#include <vector>

#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "absl/base/config.h"
#include "absl/debugging/stacktrace.h"
#include "absl/debugging/symbolize.h"
#include "absl/strings/cordz_test_helpers.h"
#include "absl/strings/internal/cord_rep_flat.h"
#include "absl/strings/internal/cordz_handle.h"
#include "absl/strings/internal/cordz_statistics.h"
#include "absl/strings/internal/cordz_update_tracker.h"
#include "absl/strings/str_cat.h"
#include "absl/types/span.h"

namespace absl {
ABSL_NAMESPACE_BEGIN
namespace cord_internal {
namespace {

ElementsAre;
Eq;
HasSubstr;
Ne;
SizeIs;

// Used test values
auto constexpr kUnknownMethod =;
auto constexpr kTrackCordMethod =;
auto constexpr kChildMethod =;
auto constexpr kUpdateMethod =;

// Local less verbose helper
std::vector<const CordzHandle*> DeleteQueue() {}

std::string FormatStack(absl::Span<void* const> raw_stack) {}

TEST(CordzInfoTest, TrackCord) {}

TEST(CordzInfoTest, MaybeTrackChildCordWithoutSampling) {}

TEST(CordzInfoTest, MaybeTrackChildCordWithSampling) {}

TEST(CordzInfoTest, MaybeTrackChildCordWithoutSamplingParentSampled) {}

TEST(CordzInfoTest, MaybeTrackChildCordWithoutSamplingChildSampled) {}

TEST(CordzInfoTest, MaybeTrackChildCordWithSamplingChildSampled) {}

TEST(CordzInfoTest, UntrackCord) {}

TEST(CordzInfoTest, UntrackCordWithSnapshot) {}

TEST(CordzInfoTest, SetCordRep) {}

TEST(CordzInfoTest, SetCordRepNullUntracksCordOnUnlock) {}

TEST(CordzInfoTest, RefCordRep) {}

#if GTEST_HAS_DEATH_TEST

TEST(CordzInfoTest, SetCordRepRequiresMutex) {}

#endif  // GTEST_HAS_DEATH_TEST

TEST(CordzInfoTest, TrackUntrackHeadFirstV2) {}

TEST(CordzInfoTest, TrackUntrackTailFirstV2) {}

TEST(CordzInfoTest, StackV2) {}

// Local helper functions to get different stacks for child and parent.
CordzInfo* TrackChildCord(InlineData& data, const InlineData& parent) {}
CordzInfo* TrackParentCord(InlineData& data) {}

TEST(CordzInfoTest, GetStatistics) {}

TEST(CordzInfoTest, LockCountsMethod) {}

TEST(CordzInfoTest, FromParent) {}

}  // namespace
}  // namespace cord_internal
ABSL_NAMESPACE_END
}  // namespace absl