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

Side by Side Diff: webrtc/p2p/base/stun_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 | « webrtc/p2p/base/stun.cc ('k') | webrtc/p2p/base/stunport.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 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 static const unsigned char kStunMessageWithPaddedByteStringAttribute[] = { 158 static const unsigned char kStunMessageWithPaddedByteStringAttribute[] = {
159 0x00, 0x01, 0x00, 0x08, 159 0x00, 0x01, 0x00, 0x08,
160 0x21, 0x12, 0xa4, 0x42, 160 0x21, 0x12, 0xa4, 0x42,
161 0xe3, 0xa9, 0x46, 0xe1, 161 0xe3, 0xa9, 0x46, 0xe1,
162 0x7c, 0x00, 0xc2, 0x62, 162 0x7c, 0x00, 0xc2, 0x62,
163 0x54, 0x08, 0x01, 0x00, 163 0x54, 0x08, 0x01, 0x00,
164 0x00, 0x06, 0x00, 0x03, // username attribute (length 3) 164 0x00, 0x06, 0x00, 0x03, // username attribute (length 3)
165 0x61, 0x62, 0x63, 0xcc // abc 165 0x61, 0x62, 0x63, 0xcc // abc
166 }; 166 };
167 167
168 // Message with an Unknown Attributes (uint16 list) attribute. 168 // Message with an Unknown Attributes (uint16_t list) attribute.
169 static const unsigned char kStunMessageWithUInt16ListAttribute[] = { 169 static const unsigned char kStunMessageWithUInt16ListAttribute[] = {
170 0x00, 0x01, 0x00, 0x0c, 170 0x00, 0x01, 0x00, 0x0c,
171 0x21, 0x12, 0xa4, 0x42, 171 0x21, 0x12, 0xa4, 0x42,
172 0xe3, 0xa9, 0x46, 0xe1, 172 0xe3, 0xa9, 0x46, 0xe1,
173 0x7c, 0x00, 0xc2, 0x62, 173 0x7c, 0x00, 0xc2, 0x62,
174 0x54, 0x08, 0x01, 0x00, 174 0x54, 0x08, 0x01, 0x00,
175 0x00, 0x0a, 0x00, 0x06, // username attribute (length 6) 175 0x00, 0x0a, 0x00, 0x06, // username attribute (length 6)
176 0x00, 0x01, 0x10, 0x00, // three attributes plus padding 176 0x00, 0x01, 0x10, 0x00, // three attributes plus padding
177 0xAB, 0xCU, 0xBE, 0xEF 177 0xAB, 0xCU, 0xBE, 0xEF
178 }; 178 };
(...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after
1437 rtc::ByteBuffer out2; 1437 rtc::ByteBuffer out2;
1438 EXPECT_TRUE(msg2.Write(&out2)); 1438 EXPECT_TRUE(msg2.Write(&out2));
1439 EXPECT_EQ(size, out2.Length()); 1439 EXPECT_EQ(size, out2.Length());
1440 size_t len2 = out2.Length(); 1440 size_t len2 = out2.Length();
1441 std::string outstring2; 1441 std::string outstring2;
1442 out2.ReadString(&outstring2, len2); 1442 out2.ReadString(&outstring2, len2);
1443 EXPECT_EQ(0, memcmp(outstring2.c_str(), input, len2)); 1443 EXPECT_EQ(0, memcmp(outstring2.c_str(), input, len2));
1444 } 1444 }
1445 1445
1446 } // namespace cricket 1446 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/stun.cc ('k') | webrtc/p2p/base/stunport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698