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}
This commit is contained in:
zhihuang
2017-04-11 11:28:10 -07:00
committed by Commit bot
parent 00d802b6ee
commit 0426222f4c
3 changed files with 122 additions and 127 deletions

View File

@ -55,6 +55,11 @@ class RtpSource {
// 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_;