PrintTo functions for RTCStats added in rtcstatscollector_unittest.cc

Future test code will do stuff like EXPECT_EQ(report, expected_report).
They're all defined in the unittest because it and stats' operator==
is only used for testing.

See https://cs.chromium.org/chromium/src/testing/gtest/include/gtest/gtest-printers.h?sq=package:chromium&dr=C&rcl=1477394469&l=707

BUG=chromium:627816

Review-Url: https://codereview.webrtc.org/2445343003
Cr-Commit-Position: refs/heads/master@{#14779}
diff --git a/webrtc/api/rtcstatscollector_unittest.cc b/webrtc/api/rtcstatscollector_unittest.cc
index 8686056..97ede90 100644
--- a/webrtc/api/rtcstatscollector_unittest.cc
+++ b/webrtc/api/rtcstatscollector_unittest.cc
@@ -11,6 +11,7 @@
 #include "webrtc/api/rtcstatscollector.h"
 
 #include <memory>
+#include <ostream>
 #include <string>
 #include <vector>
 
@@ -41,6 +42,35 @@
 
 namespace webrtc {
 
+// These are used by gtest code, such as if |EXPECT_EQ| fails.
+void PrintTo(const RTCCertificateStats& stats, ::std::ostream* os) {
+  *os << stats.ToString();
+}
+
+void PrintTo(const RTCDataChannelStats& stats, ::std::ostream* os) {
+  *os << stats.ToString();
+}
+
+void PrintTo(const RTCIceCandidatePairStats& stats, ::std::ostream* os) {
+  *os << stats.ToString();
+}
+
+void PrintTo(const RTCLocalIceCandidateStats& stats, ::std::ostream* os) {
+  *os << stats.ToString();
+}
+
+void PrintTo(const RTCRemoteIceCandidateStats& stats, ::std::ostream* os) {
+  *os << stats.ToString();
+}
+
+void PrintTo(const RTCPeerConnectionStats& stats, ::std::ostream* os) {
+  *os << stats.ToString();
+}
+
+void PrintTo(const RTCTransportStats& stats, ::std::ostream* os) {
+  *os << stats.ToString();
+}
+
 namespace {
 
 const int64_t kGetStatsReportTimeoutMs = 1000;