From fd8ed05cee7c6a2af3f9143ea3b68bc4ac085ce3 Mon Sep 17 00:00:00 2001 From: Artem Titov Date: Wed, 1 Jun 2022 14:11:14 +0200 Subject: [PATCH] [PCLF] Add equals method for VideoSubscription Bug: b/231394729 Change-Id: I0957d96640e962d331f05c9541c36e8420e9f5aa Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264557 Commit-Queue: Artem Titov Reviewed-by: Mirko Bonadei Cr-Commit-Position: refs/heads/main@{#37075} --- api/test/peerconnection_quality_test_fixture.cc | 6 ++++++ api/test/peerconnection_quality_test_fixture.h | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/api/test/peerconnection_quality_test_fixture.cc b/api/test/peerconnection_quality_test_fixture.cc index 59526f9f52..3158109e89 100644 --- a/api/test/peerconnection_quality_test_fixture.cc +++ b/api/test/peerconnection_quality_test_fixture.cc @@ -41,6 +41,12 @@ bool PeerConnectionE2EQualityTestFixture::VideoResolution::operator==( fps_ == other.fps_ && spec_ == other.spec_; } +bool PeerConnectionE2EQualityTestFixture::VideoSubscription::operator==( + const VideoSubscription& other) const { + return default_resolution_ == other.default_resolution_ && + peers_resolution_ == other.peers_resolution_; +} + absl::optional PeerConnectionE2EQualityTestFixture::VideoSubscription::GetMaxResolution( rtc::ArrayView video_configs) { diff --git a/api/test/peerconnection_quality_test_fixture.h b/api/test/peerconnection_quality_test_fixture.h index fee911a8b8..29fff7da03 100644 --- a/api/test/peerconnection_quality_test_fixture.h +++ b/api/test/peerconnection_quality_test_fixture.h @@ -377,6 +377,11 @@ class PeerConnectionE2EQualityTestFixture { static absl::optional GetMaxResolution( rtc::ArrayView resolutions); + bool operator==(const VideoSubscription& other) const; + bool operator!=(const VideoSubscription& other) const { + return !(*this == other); + } + // Subscribes receiver to all streams sent by the specified peer with // specified resolution. It will override any resolution that was used in // `SubscribeToAll` independently from methods call order.