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

Unified Diff: webrtc/p2p/base/dtlstransportchannel_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/p2p/base/dtlstransportchannel.cc ('k') | webrtc/p2p/base/faketransportcontroller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/dtlstransportchannel_unittest.cc
diff --git a/webrtc/p2p/base/dtlstransportchannel_unittest.cc b/webrtc/p2p/base/dtlstransportchannel_unittest.cc
index cad5b563a5c2494b2e5f06c786a71690fd9a94b9..460e294a0048c99badecd63cc1543ea6d538ff0e 100644
--- a/webrtc/p2p/base/dtlstransportchannel_unittest.cc
+++ b/webrtc/p2p/base/dtlstransportchannel_unittest.cc
@@ -34,7 +34,7 @@ static const char kIcePwd1[] = "TESTICEPWD00000000000001";
static const size_t kPacketNumOffset = 8;
static const size_t kPacketHeaderLen = 12;
-static bool IsRtpLeadByte(uint8 b) {
+static bool IsRtpLeadByte(uint8_t b) {
return ((b & 0xC0) == 0x80);
}
@@ -254,7 +254,7 @@ class DtlsTestClient : public sigslot::has_slots<> {
memset(packet.get(), sent & 0xff, size);
packet[0] = (srtp) ? 0x80 : 0x00;
rtc::SetBE32(packet.get() + kPacketNumOffset,
- static_cast<uint32>(sent));
+ static_cast<uint32_t>(sent));
// Only set the bypass flag if we've activated DTLS.
int flags = (certificate_ && srtp) ? cricket::PF_SRTP_BYPASS : 0;
@@ -287,14 +287,14 @@ class DtlsTestClient : public sigslot::has_slots<> {
return received_.size();
}
- bool VerifyPacket(const char* data, size_t size, uint32* out_num) {
+ bool VerifyPacket(const char* data, size_t size, uint32_t* out_num) {
if (size != packet_size_ ||
- (data[0] != 0 && static_cast<uint8>(data[0]) != 0x80)) {
+ (data[0] != 0 && static_cast<uint8_t>(data[0]) != 0x80)) {
return false;
}
- uint32 packet_num = rtc::GetBE32(data + kPacketNumOffset);
+ uint32_t packet_num = rtc::GetBE32(data + kPacketNumOffset);
for (size_t i = kPacketHeaderLen; i < size; ++i) {
- if (static_cast<uint8>(data[i]) != (packet_num & 0xff)) {
+ if (static_cast<uint8_t>(data[i]) != (packet_num & 0xff)) {
return false;
}
}
@@ -309,10 +309,10 @@ class DtlsTestClient : public sigslot::has_slots<> {
if (size <= packet_size_) {
return false;
}
- uint32 packet_num = rtc::GetBE32(data + kPacketNumOffset);
+ uint32_t packet_num = rtc::GetBE32(data + kPacketNumOffset);
int num_matches = 0;
for (size_t i = kPacketNumOffset; i < size; ++i) {
- if (static_cast<uint8>(data[i]) == (packet_num & 0xff)) {
+ if (static_cast<uint8_t>(data[i]) == (packet_num & 0xff)) {
++num_matches;
}
}
@@ -329,7 +329,7 @@ class DtlsTestClient : public sigslot::has_slots<> {
const char* data, size_t size,
const rtc::PacketTime& packet_time,
int flags) {
- uint32 packet_num = 0;
+ uint32_t packet_num = 0;
ASSERT_TRUE(VerifyPacket(data, size, &packet_num));
received_.insert(packet_num);
// Only DTLS-SRTP packets should have the bypass flag set.
« no previous file with comments | « webrtc/p2p/base/dtlstransportchannel.cc ('k') | webrtc/p2p/base/faketransportcontroller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698