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

Side by Side Diff: talk/media/base/rtputils_unittest.cc

Issue 1362503003: Use suffixed {uint,int}{8,16,32,64}_t types. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase + revert basictypes.h (to be landed separately just in case of a revert due to unexpected us… Created 5 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
« no previous file with comments | « talk/media/base/rtputils.cc ('k') | talk/media/base/streamparams.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2004 Google Inc. 3 * Copyright 2004 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 EXPECT_TRUE(GetRtpPayloadType(kPcmuFrame, sizeof(kPcmuFrame), &pt)); 81 EXPECT_TRUE(GetRtpPayloadType(kPcmuFrame, sizeof(kPcmuFrame), &pt));
82 EXPECT_EQ(0, pt); 82 EXPECT_EQ(0, pt);
83 EXPECT_TRUE(GetRtpPayloadType(kRtpPacketWithMarker, 83 EXPECT_TRUE(GetRtpPayloadType(kRtpPacketWithMarker,
84 sizeof(kRtpPacketWithMarker), &pt)); 84 sizeof(kRtpPacketWithMarker), &pt));
85 EXPECT_EQ(0, pt); 85 EXPECT_EQ(0, pt);
86 86
87 int seq_num; 87 int seq_num;
88 EXPECT_TRUE(GetRtpSeqNum(kPcmuFrame, sizeof(kPcmuFrame), &seq_num)); 88 EXPECT_TRUE(GetRtpSeqNum(kPcmuFrame, sizeof(kPcmuFrame), &seq_num));
89 EXPECT_EQ(1, seq_num); 89 EXPECT_EQ(1, seq_num);
90 90
91 uint32 ts; 91 uint32_t ts;
92 EXPECT_TRUE(GetRtpTimestamp(kPcmuFrame, sizeof(kPcmuFrame), &ts)); 92 EXPECT_TRUE(GetRtpTimestamp(kPcmuFrame, sizeof(kPcmuFrame), &ts));
93 EXPECT_EQ(0u, ts); 93 EXPECT_EQ(0u, ts);
94 94
95 uint32 ssrc; 95 uint32_t ssrc;
96 EXPECT_TRUE(GetRtpSsrc(kPcmuFrame, sizeof(kPcmuFrame), &ssrc)); 96 EXPECT_TRUE(GetRtpSsrc(kPcmuFrame, sizeof(kPcmuFrame), &ssrc));
97 EXPECT_EQ(1u, ssrc); 97 EXPECT_EQ(1u, ssrc);
98 98
99 RtpHeader header; 99 RtpHeader header;
100 EXPECT_TRUE(GetRtpHeader(kPcmuFrame, sizeof(kPcmuFrame), &header)); 100 EXPECT_TRUE(GetRtpHeader(kPcmuFrame, sizeof(kPcmuFrame), &header));
101 EXPECT_EQ(0, header.payload_type); 101 EXPECT_EQ(0, header.payload_type);
102 EXPECT_EQ(1, header.seq_num); 102 EXPECT_EQ(1, header.seq_num);
103 EXPECT_EQ(0u, header.timestamp); 103 EXPECT_EQ(0u, header.timestamp);
104 EXPECT_EQ(1u, header.ssrc); 104 EXPECT_EQ(1u, header.ssrc);
105 105
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 &len)); 150 &len));
151 } 151 }
152 152
153 TEST(RtpUtilsTest, GetRtcp) { 153 TEST(RtpUtilsTest, GetRtcp) {
154 int pt; 154 int pt;
155 EXPECT_TRUE(GetRtcpType(kRtcpReport, sizeof(kRtcpReport), &pt)); 155 EXPECT_TRUE(GetRtcpType(kRtcpReport, sizeof(kRtcpReport), &pt));
156 EXPECT_EQ(0xc9, pt); 156 EXPECT_EQ(0xc9, pt);
157 157
158 EXPECT_FALSE(GetRtcpType(kInvalidPacket, sizeof(kInvalidPacket), &pt)); 158 EXPECT_FALSE(GetRtcpType(kInvalidPacket, sizeof(kInvalidPacket), &pt));
159 159
160 uint32 ssrc; 160 uint32_t ssrc;
161 EXPECT_TRUE(GetRtcpSsrc(kNonCompoundRtcpPliFeedbackPacket, 161 EXPECT_TRUE(GetRtcpSsrc(kNonCompoundRtcpPliFeedbackPacket,
162 sizeof(kNonCompoundRtcpPliFeedbackPacket), 162 sizeof(kNonCompoundRtcpPliFeedbackPacket),
163 &ssrc)); 163 &ssrc));
164 EXPECT_TRUE(GetRtcpSsrc(kNonCompoundRtcpAppPacket, 164 EXPECT_TRUE(GetRtcpSsrc(kNonCompoundRtcpAppPacket,
165 sizeof(kNonCompoundRtcpAppPacket), 165 sizeof(kNonCompoundRtcpAppPacket),
166 &ssrc)); 166 &ssrc));
167 EXPECT_FALSE(GetRtcpSsrc(kNonCompoundRtcpSDESPacket, 167 EXPECT_FALSE(GetRtcpSsrc(kNonCompoundRtcpSDESPacket,
168 sizeof(kNonCompoundRtcpSDESPacket), 168 sizeof(kNonCompoundRtcpSDESPacket),
169 &ssrc)); 169 &ssrc));
170 } 170 }
171 171
172 } // namespace cricket 172 } // namespace cricket
OLDNEW
« no previous file with comments | « talk/media/base/rtputils.cc ('k') | talk/media/base/streamparams.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698