Break up conjunctive DCHECK expressions.
DCHECK(A && B); => DCHECK(A); DCHECK(B);
The motivation is more useful output in case of failure.
Note that just like before this change, B is evaluated iff A is true. Before
this change because of the lazy evaluation rule, afterwards because DCHECK(A)
blows up if A is false.
gfe-relnote: n/a, no functional change.
PiperOrigin-RevId: 290103915
Change-Id: I18bdbfbd5cdf3411b45ec4cbfa7ffebc009ed9a9
diff --git a/quic/core/quic_received_packet_manager_test.cc b/quic/core/quic_received_packet_manager_test.cc
index 9ce50dd..fd27663 100644
--- a/quic/core/quic_received_packet_manager_test.cc
+++ b/quic/core/quic_received_packet_manager_test.cc
@@ -94,7 +94,8 @@
}
void CheckAckTimeout(QuicTime time) {
- DCHECK(HasPendingAck() && received_manager_.ack_timeout() == time);
+ DCHECK(HasPendingAck());
+ DCHECK_EQ(received_manager_.ack_timeout(), time);
if (time <= clock_.ApproximateNow()) {
// ACK timeout expires, send an ACK.
received_manager_.ResetAckStates();