Modified the rtp_receiver_unittests.
Implemented operator == in RtpSource and use the gmock EXPECT_THAT to make the test cleaner.
Related CL: https://codereview.webrtc.org/2770233003/
BUG=chromium:703122
Review-Url: https://codereview.webrtc.org/2813753002
Cr-Commit-Position: refs/heads/master@{#17659}
diff --git a/webrtc/api/rtpreceiverinterface.h b/webrtc/api/rtpreceiverinterface.h
index fd233ab..66958ff 100644
--- a/webrtc/api/rtpreceiverinterface.h
+++ b/webrtc/api/rtpreceiverinterface.h
@@ -55,6 +55,11 @@
// TODO(zhihuang): Implement this to return real audio level.
rtc::Optional<int8_t> audio_level() const { return rtc::Optional<int8_t>(); }
+ bool operator==(const RtpSource& o) const {
+ return timestamp_ms_ == o.timestamp_ms() && source_id_ == o.source_id() &&
+ source_type_ == o.source_type();
+ }
+
private:
int64_t timestamp_ms_;
uint32_t source_id_;