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:
@ -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_;
|
||||
|
||||
Reference in New Issue
Block a user