Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(274)

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtcp_packet/voip_metric_unittest.cc

Issue 2370313002: Reland of Unify rtcp packet setters (Closed)
Patch Set: Fix breaking mistype Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 metric.Gmin = 8; 44 metric.Gmin = 8;
45 metric.Rfactor = 9; 45 metric.Rfactor = 9;
46 metric.extRfactor = 10; 46 metric.extRfactor = 10;
47 metric.MOSLQ = 11; 47 metric.MOSLQ = 11;
48 metric.MOSCQ = 12; 48 metric.MOSCQ = 12;
49 metric.RXconfig = 13; 49 metric.RXconfig = 13;
50 metric.JBnominal = 0x5556; 50 metric.JBnominal = 0x5556;
51 metric.JBmax = 0x6667; 51 metric.JBmax = 0x6667;
52 metric.JBabsMax = 0x7778; 52 metric.JBabsMax = 0x7778;
53 VoipMetric metric_block; 53 VoipMetric metric_block;
54 metric_block.To(kRemoteSsrc); 54 metric_block.SetMediaSsrc(kRemoteSsrc);
55 metric_block.WithVoipMetric(metric); 55 metric_block.SetVoipMetric(metric);
56 56
57 metric_block.Create(buffer); 57 metric_block.Create(buffer);
58 EXPECT_EQ(0, memcmp(buffer, kBlock, kBlockSizeBytes)); 58 EXPECT_EQ(0, memcmp(buffer, kBlock, kBlockSizeBytes));
59 } 59 }
60 60
61 TEST(RtcpPacketVoipMetricTest, Parse) { 61 TEST(RtcpPacketVoipMetricTest, Parse) {
62 VoipMetric read_metric; 62 VoipMetric read_metric;
63 read_metric.Parse(kBlock); 63 read_metric.Parse(kBlock);
64 64
65 // Run checks on const object to ensure all accessors have const modifier. 65 // Run checks on const object to ensure all accessors have const modifier.
(...skipping 18 matching lines...) Expand all
84 EXPECT_EQ(12, parsed.voip_metric().MOSCQ); 84 EXPECT_EQ(12, parsed.voip_metric().MOSCQ);
85 EXPECT_EQ(13, parsed.voip_metric().RXconfig); 85 EXPECT_EQ(13, parsed.voip_metric().RXconfig);
86 EXPECT_EQ(0x5556, parsed.voip_metric().JBnominal); 86 EXPECT_EQ(0x5556, parsed.voip_metric().JBnominal);
87 EXPECT_EQ(0x6667, parsed.voip_metric().JBmax); 87 EXPECT_EQ(0x6667, parsed.voip_metric().JBmax);
88 EXPECT_EQ(0x7778, parsed.voip_metric().JBabsMax); 88 EXPECT_EQ(0x7778, parsed.voip_metric().JBabsMax);
89 } 89 }
90 90
91 } // namespace 91 } // namespace
92 } // namespace rtcp 92 } // namespace rtcp
93 } // namespace webrtc 93 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_packet/voip_metric.h ('k') | webrtc/modules/rtp_rtcp/source/rtcp_packet_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698