tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

video_adaptation_counters_unittest.cc (924B)


      1 /*
      2 *  Copyright (c) 2020 The WebRTC project authors. All Rights Reserved.
      3 *
      4 *  Use of this source code is governed by a BSD-style license
      5 *  that can be found in the LICENSE file in the root of the source
      6 *  tree. An additional intellectual property rights grant can be found
      7 *  in the file PATENTS.  All contributing project authors may
      8 *  be found in the AUTHORS file in the root of the source tree.
      9 */
     10 
     11 #include "api/video/video_adaptation_counters.h"
     12 
     13 #include "test/gtest.h"
     14 
     15 namespace webrtc {
     16 
     17 TEST(AdaptationCountersTest, Addition) {
     18  VideoAdaptationCounters a{0, 0};
     19  VideoAdaptationCounters b{1, 2};
     20  VideoAdaptationCounters total = a + b;
     21  EXPECT_EQ(1, total.resolution_adaptations);
     22  EXPECT_EQ(2, total.fps_adaptations);
     23 }
     24 
     25 TEST(AdaptationCountersTest, Equality) {
     26  VideoAdaptationCounters a{1, 2};
     27  VideoAdaptationCounters b{2, 1};
     28  EXPECT_EQ(a, a);
     29  EXPECT_NE(a, b);
     30 }
     31 
     32 }  // namespace webrtc