summaryrefslogtreecommitdiff
path: root/absl/synchronization/lifetime_test.cc
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@google.com>2023-09-07 13:16:09 -0400
committerGravatar Benjamin Barenblat <bbaren@google.com>2023-09-07 13:16:09 -0400
commit6fdbff8bbce2a1debdc060df381f39e3dcfb65af (patch)
tree71f1ef38477a65d5cce472fc042c90087c2bb351 /absl/synchronization/lifetime_test.cc
parent8d4a80fe37176b1170d7dce0772dea9584ec3e32 (diff)
parent29bf8085f3bf17b84d30e34b3d7ff8248fda404e (diff)
Merge new upstream LTS 20230802.0
Diffstat (limited to 'absl/synchronization/lifetime_test.cc')
-rw-r--r--absl/synchronization/lifetime_test.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/absl/synchronization/lifetime_test.cc b/absl/synchronization/lifetime_test.cc
index e6274232..d5ce35a1 100644
--- a/absl/synchronization/lifetime_test.cc
+++ b/absl/synchronization/lifetime_test.cc
@@ -18,8 +18,8 @@
#include "absl/base/attributes.h"
#include "absl/base/const_init.h"
-#include "absl/base/internal/raw_logging.h"
#include "absl/base/thread_annotations.h"
+#include "absl/log/check.h"
#include "absl/synchronization/mutex.h"
#include "absl/synchronization/notification.h"
@@ -35,20 +35,20 @@ namespace {
// Thread two waits on 'notification', then sets 'state' inside the 'mutex',
// signalling the change via 'condvar'.
//
-// These tests use ABSL_RAW_CHECK to validate invariants, rather than EXPECT or
-// ASSERT from gUnit, because we need to invoke them during global destructors,
-// when gUnit teardown would have already begun.
+// These tests use CHECK to validate invariants, rather than EXPECT or ASSERT
+// from gUnit, because we need to invoke them during global destructors, when
+// gUnit teardown would have already begun.
void ThreadOne(absl::Mutex* mutex, absl::CondVar* condvar,
absl::Notification* notification, bool* state) {
// Test that the notification is in a valid initial state.
- ABSL_RAW_CHECK(!notification->HasBeenNotified(), "invalid Notification");
- ABSL_RAW_CHECK(*state == false, "*state not initialized");
+ CHECK(!notification->HasBeenNotified()) << "invalid Notification";
+ CHECK(!*state) << "*state not initialized";
{
absl::MutexLock lock(mutex);
notification->Notify();
- ABSL_RAW_CHECK(notification->HasBeenNotified(), "invalid Notification");
+ CHECK(notification->HasBeenNotified()) << "invalid Notification";
while (*state == false) {
condvar->Wait(mutex);
@@ -58,11 +58,11 @@ void ThreadOne(absl::Mutex* mutex, absl::CondVar* condvar,
void ThreadTwo(absl::Mutex* mutex, absl::CondVar* condvar,
absl::Notification* notification, bool* state) {
- ABSL_RAW_CHECK(*state == false, "*state not initialized");
+ CHECK(!*state) << "*state not initialized";
// Wake thread one
notification->WaitForNotification();
- ABSL_RAW_CHECK(notification->HasBeenNotified(), "invalid Notification");
+ CHECK(notification->HasBeenNotified()) << "invalid Notification";
{
absl::MutexLock lock(mutex);
*state = true;