Refactor pc/media_session_unittest.cc and introduce Yoda-test swapping tool.
This CL improves pc/media_session_unittest.cc by modernizing its structure
and improving assertion readability:
1. Transitioned several global and local Codec and RtpExtension constants
from raw arrays to std::vector.
2. Updated the CodecListsMatch matcher to use .Matches() for comparison,
making it resilient to dynamic payload type assignments.
3. Swapped GTest assertion arguments to follow the (value, constant) pattern,
eliminating "Yoda tests".
4. Refactored CodecLookupHelperForTesting to support explicit expectation
registration, improving test reliability under field trials.
5. Const-qualified PayloadType methods in api/payload_type.h to support
usage in refined test logic.
To facilitate and verify the argument swapping, a new tool and its unit
tests are added to the tools_webrtc directory.
Bug: None
Change-Id: I5e83ac5cebd67d7a38eafb7d2801d7e1c4bc0e54
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/470160
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#47646}
WebRTC is a free, open software project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. The WebRTC components have been optimized to best serve this purpose.
Our mission: To enable rich, high-quality RTC applications to be developed for the browser, mobile platforms, and IoT devices, and allow them all to communicate via a common set of protocols.
The WebRTC initiative is a project supported by Google, Mozilla and Opera, amongst others.
See here for instructions on how to get started developing with the native code.
Authoritative list of directories that contain the native API header files.