xref: /aosp_15_r20/external/angle/third_party/abseil-cpp/absl/base/internal/tracing_weak_test.cc (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1 // Copyright 2024 The Abseil Authors
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     https://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #include "gtest/gtest.h"
16 #include "absl/base/internal/tracing.h"
17 
18 namespace {
19 
TEST(TracingInternal,HasDefaultImplementation)20 TEST(TracingInternal, HasDefaultImplementation) {
21   auto kind = absl::base_internal::ObjectKind::kUnknown;
22   absl::base_internal::TraceWait(nullptr, kind);
23   absl::base_internal::TraceContinue(nullptr, kind);
24   absl::base_internal::TraceSignal(nullptr, kind);
25   absl::base_internal::TraceObserved(nullptr, kind);
26 
27   int object = 0;
28   absl::base_internal::TraceWait(&object, kind);
29   absl::base_internal::TraceContinue(&object, kind);
30   absl::base_internal::TraceSignal(&object, kind);
31   absl::base_internal::TraceObserved(&object, kind);
32 }
33 
34 }  // namespace
35