Switch from GTEST_FLAG to GTEST_FLAG_SET.

::testing::GTEST_FLAG is deprecated and it will be removed in future
versions of gtest.

Bug: None
Change-Id: Icb2ad2a7607073cf9ad63753a4de34f37bda411c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227083
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34600}
This commit is contained in:
Mirko Bonadei 2021-07-28 08:55:52 +02:00 committed by WebRTC LUCI CQ
parent 56c2406f8c
commit 386b5c3f4e

View File

@ -446,7 +446,7 @@ TEST(ThreadTest, Invoke) {
// not deadlock but crash.
#if RTC_DCHECK_IS_ON && GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID)
TEST(ThreadTest, TwoThreadsInvokeDeathTest) {
::testing::GTEST_FLAG(death_test_style) = "threadsafe";
GTEST_FLAG_SET(death_test_style, "threadsafe");
AutoThread thread;
Thread* main_thread = Thread::Current();
auto other_thread = Thread::CreateWithSocketServer();
@ -457,7 +457,7 @@ TEST(ThreadTest, TwoThreadsInvokeDeathTest) {
}
TEST(ThreadTest, ThreeThreadsInvokeDeathTest) {
::testing::GTEST_FLAG(death_test_style) = "threadsafe";
GTEST_FLAG_SET(death_test_style, "threadsafe");
AutoThread thread;
Thread* first = Thread::Current();