chromium/third_party/abseil-cpp/absl/base/internal/tracing_strong_test.cc

// Copyright 2024 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 <tuple>
#include <vector>

#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "absl/base/attributes.h"
#include "absl/base/config.h"
#include "absl/base/internal/tracing.h"

#if ABSL_HAVE_ATTRIBUTE_WEAK

namespace {

ElementsAre;

ObjectKind;

enum Function {};

Record;

thread_local std::vector<Record>* tls_records =;

}  // namespace

namespace absl {
ABSL_NAMESPACE_BEGIN
namespace base_internal {

// Strong extern "C" implementation.
extern "C" {

void ABSL_INTERNAL_C_SYMBOL(AbslInternalTraceWait)(const void* object,
                                                   ObjectKind kind) {}

void ABSL_INTERNAL_C_SYMBOL(AbslInternalTraceContinue)(const void* object,
                                                       ObjectKind kind) {}

void ABSL_INTERNAL_C_SYMBOL(AbslInternalTraceSignal)(const void* object,
                                                     ObjectKind kind) {}

void ABSL_INTERNAL_C_SYMBOL(AbslInternalTraceObserved)(const void* object,
                                                       ObjectKind kind) {}

}  // extern "C"

}  // namespace base_internal
ABSL_NAMESPACE_END
}  // namespace absl

namespace {

TEST(TracingInternal, InvokesStrongFunctionWithNullptr) {}

TEST(TracingInternal, InvokesStrongFunctionWithObjectAddress) {}

}  // namespace

#endif  // ABSL_HAVE_ATTRIBUTE_WEAK