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 <stefan@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Commit-Queue: Stefan Holmer <stefan@webrtc.org> Cr-Commit-Position: refs/heads/main@{#40936}
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 8dbfaec..3737d66 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 @@ 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 @@ NtpTime ntp(static_cast<uint64_t>(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};