Platformize DCHECK and other macros.

PiperOrigin-RevId: 354720441
Change-Id: I6db498ac96b025432d5bfb3da0a4deeef57c114f
diff --git a/quic/test_tools/crypto_test_utils.h b/quic/test_tools/crypto_test_utils.h
index 0c5534f..d839c6c 100644
--- a/quic/test_tools/crypto_test_utils.h
+++ b/quic/test_tools/crypto_test_utils.h
@@ -147,7 +147,7 @@
 
 // ParseTag returns a QuicTag from parsing |tagstr|. |tagstr| may either be
 // in the format "EXMP" (i.e. ASCII format), or "#11223344" (an explicit hex
-// format). It CHECK fails if there's a parse error.
+// format). It QUICHE_CHECK fails if there's a parse error.
 QuicTag ParseTag(const char* tagstr);
 
 // Message constructs a CHLO message from a provided vector of tag/value pairs.
diff --git a/quic/test_tools/first_flight.h b/quic/test_tools/first_flight.h
index 0ffeb5e..c18c879 100644
--- a/quic/test_tools/first_flight.h
+++ b/quic/test_tools/first_flight.h
@@ -37,7 +37,7 @@
   // |delegate| MUST be valid for the duration of the DelegatedPacketWriter's
   // lifetime.
   explicit DelegatedPacketWriter(Delegate* delegate) : delegate_(delegate) {
-    CHECK_NE(delegate_, nullptr);
+    QUICHE_CHECK_NE(delegate_, nullptr);
   }
 
   // Overrides for QuicPacketWriter.
diff --git a/quic/test_tools/packet_dropping_test_writer.h b/quic/test_tools/packet_dropping_test_writer.h
index a66fb78..c15b5de 100644
--- a/quic/test_tools/packet_dropping_test_writer.h
+++ b/quic/test_tools/packet_dropping_test_writer.h
@@ -93,22 +93,22 @@
   // to WRITE_STATUS_BLOCKED.
   void set_fake_blocked_socket_percentage(
       int32_t fake_blocked_socket_percentage) {
-    DCHECK(clock_);
+    QUICHE_DCHECK(clock_);
     QuicWriterMutexLock lock(&config_mutex_);
     fake_blocked_socket_percentage_ = fake_blocked_socket_percentage;
   }
 
   // The percent of time a packet is simulated as being reordered.
   void set_fake_reorder_percentage(int32_t fake_packet_reorder_percentage) {
-    DCHECK(clock_);
+    QUICHE_DCHECK(clock_);
     QuicWriterMutexLock lock(&config_mutex_);
-    DCHECK(!fake_packet_delay_.IsZero());
+    QUICHE_DCHECK(!fake_packet_delay_.IsZero());
     fake_packet_reorder_percentage_ = fake_packet_reorder_percentage;
   }
 
   // The delay before writing this packet.
   void set_fake_packet_delay(QuicTime::Delta fake_packet_delay) {
-    DCHECK(clock_);
+    QUICHE_DCHECK(clock_);
     QuicWriterMutexLock lock(&config_mutex_);
     fake_packet_delay_ = fake_packet_delay;
   }
@@ -119,7 +119,7 @@
   // dropped.
   void set_max_bandwidth_and_buffer_size(QuicBandwidth fake_bandwidth,
                                          QuicByteCount buffer_size) {
-    DCHECK(clock_);
+    QUICHE_DCHECK(clock_);
     QuicWriterMutexLock lock(&config_mutex_);
     fake_bandwidth_ = fake_bandwidth;
     buffer_size_ = buffer_size;
diff --git a/quic/test_tools/simulator/switch.h b/quic/test_tools/simulator/switch.h
index 79968f8..f50df6b 100644
--- a/quic/test_tools/simulator/switch.h
+++ b/quic/test_tools/simulator/switch.h
@@ -30,7 +30,7 @@
   // Returns Endpoint associated with the port under number |port_number|.  Just
   // like on most real switches, port numbering starts with 1.
   inline Endpoint* port(SwitchPortNumber port_number) {
-    DCHECK_NE(port_number, 0u);
+    QUICHE_DCHECK_NE(port_number, 0u);
     return &ports_[port_number - 1];
   }