From 6113e199ff3de99db3ef6274e48192547f2015f5 Mon Sep 17 00:00:00 2001 From: Dor Hen Date: Sun, 15 Oct 2023 14:23:50 +0300 Subject: [PATCH] Replace RTC_DCHECK with EXPECT_TRUE in time estimator UT code Replacing RTC_DCHECK code with EXPECT_TRUE in the remote ntp time estimator unittest code. This to prevent test failures when building and testing in non-debug mode. Bug: webrtc:15572 Change-Id: I372fcd6ee29a4ddc07d6b27ddd492dcea13d399f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323181 Reviewed-by: Stefan Holmer Reviewed-by: Danil Chapovalov Commit-Queue: Stefan Holmer Cr-Commit-Position: refs/heads/main@{#40936} --- modules/rtp_rtcp/source/remote_ntp_time_estimator_unittest.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/rtp_rtcp/source/remote_ntp_time_estimator_unittest.cc b/modules/rtp_rtcp/source/remote_ntp_time_estimator_unittest.cc index 8dbfaec940..3737d66f07 100644 --- a/modules/rtp_rtcp/source/remote_ntp_time_estimator_unittest.cc +++ b/modules/rtp_rtcp/source/remote_ntp_time_estimator_unittest.cc @@ -44,7 +44,7 @@ class RemoteNtpTimeEstimatorTest : public ::testing::Test { NtpTime ntp = remote_clock_.CurrentNtpTime(); AdvanceTime(kTestRtt / 2); - RTC_DCHECK(estimator_.UpdateRtcpTimestamp(kTestRtt, ntp, rtcp_timestamp)); + EXPECT_TRUE(estimator_.UpdateRtcpTimestamp(kTestRtt, ntp, rtcp_timestamp)); } void SendRtcpSrInaccurately(TimeDelta ntp_error, TimeDelta networking_delay) { @@ -53,7 +53,7 @@ class RemoteNtpTimeEstimatorTest : public ::testing::Test { NtpTime ntp(static_cast(remote_clock_.CurrentNtpTime()) + ntp_error_fractions); AdvanceTime(kTestRtt / 2 + networking_delay); - RTC_DCHECK(estimator_.UpdateRtcpTimestamp(kTestRtt, ntp, rtcp_timestamp)); + EXPECT_TRUE(estimator_.UpdateRtcpTimestamp(kTestRtt, ntp, rtcp_timestamp)); } SimulatedClock local_clock_{kLocalClockInitialTime};