Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(519)

Unified Diff: net/quic/quic_protocol.cc

Issue 11973021: Teach gtest how to print QuicConsumedData and QuicEncryptedPacket. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Export the gtest printers Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/quic/quic_protocol.cc
===================================================================
--- net/quic/quic_protocol.cc (revision 177300)
+++ net/quic/quic_protocol.cc (working copy)
@@ -12,6 +12,12 @@
namespace net {
+ostream& operator<<(ostream& os, const QuicConsumedData& s) {
+ os << "bytes_consumed: " << s.bytes_consumed
+ << " fin_consumed: " << s.fin_consumed;
+ return os;
+}
+
QuicStreamFrame::QuicStreamFrame() {}
QuicStreamFrame::QuicStreamFrame(QuicStreamId stream_id,
@@ -79,7 +85,7 @@
}
ostream& operator<<(ostream& os, const SentPacketInfo& sent_info) {
- os << "least_waiting: " << sent_info.least_unacked;
+ os << "least_unacked: " << sent_info.least_unacked;
return os;
}
@@ -173,4 +179,9 @@
}
}
+ostream& operator<<(ostream& os, const QuicEncryptedPacket& s) {
+ os << s.length() << "-byte data";
+ return os;
+}
+
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698