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

Unified Diff: net/base/ip_endpoint_unittest.cc

Issue 1158923005: Use the exact-width integer types defined in <stdint.h> rather than (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweak comments. Exclude mime_sniffer*. Rebase. Created 5 years, 7 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
Index: net/base/ip_endpoint_unittest.cc
diff --git a/net/base/ip_endpoint_unittest.cc b/net/base/ip_endpoint_unittest.cc
index 17b325cddd809255856bab882f2ef0a5235ed609..2b5b83e0de592c10374800ac09d5e31dc9dc7a57 100644
--- a/net/base/ip_endpoint_unittest.cc
+++ b/net/base/ip_endpoint_unittest.cc
@@ -29,7 +29,7 @@ struct TestData {
{ "::1", "[::1]", true },
{ "2001:db8:0::42", "[2001:db8::42]", true },
};
-uint16 test_count = static_cast<uint16>(arraysize(tests));
+uint16_t test_count = static_cast<uint16_t>(arraysize(tests));
class IPEndPointTest : public PlatformTest {
public:
@@ -46,7 +46,7 @@ TEST_F(IPEndPointTest, Constructor) {
IPEndPoint endpoint;
EXPECT_EQ(0, endpoint.port());
- for (uint16 index = 0; index < test_count; ++index) {
+ for (uint16_t index = 0; index < test_count; ++index) {
IPEndPoint endpoint(tests[index].ip_address, 80);
EXPECT_EQ(80, endpoint.port());
EXPECT_EQ(tests[index].ip_address, endpoint.address());
@@ -54,7 +54,7 @@ TEST_F(IPEndPointTest, Constructor) {
}
TEST_F(IPEndPointTest, Assignment) {
- for (uint16 index = 0; index < test_count; ++index) {
+ for (uint16_t index = 0; index < test_count; ++index) {
IPEndPoint src(tests[index].ip_address, index);
IPEndPoint dest = src;
@@ -64,7 +64,7 @@ TEST_F(IPEndPointTest, Assignment) {
}
TEST_F(IPEndPointTest, Copy) {
- for (uint16 index = 0; index < test_count; ++index) {
+ for (uint16_t index = 0; index < test_count; ++index) {
IPEndPoint src(tests[index].ip_address, index);
IPEndPoint dest(src);
@@ -74,7 +74,7 @@ TEST_F(IPEndPointTest, Copy) {
}
TEST_F(IPEndPointTest, ToFromSockAddr) {
- for (uint16 index = 0; index < test_count; ++index) {
+ for (uint16_t index = 0; index < test_count; ++index) {
IPEndPoint ip_endpoint(tests[index].ip_address, index);
// Convert to a sockaddr.
@@ -97,7 +97,7 @@ TEST_F(IPEndPointTest, ToFromSockAddr) {
}
TEST_F(IPEndPointTest, ToSockAddrBufTooSmall) {
- for (uint16 index = 0; index < test_count; ++index) {
+ for (uint16_t index = 0; index < test_count; ++index) {
IPEndPoint ip_endpoint(tests[index].ip_address, index);
SockaddrStorage storage;
@@ -116,7 +116,7 @@ TEST_F(IPEndPointTest, FromSockAddrBufTooSmall) {
}
TEST_F(IPEndPointTest, Equality) {
- for (uint16 index = 0; index < test_count; ++index) {
+ for (uint16_t index = 0; index < test_count; ++index) {
IPEndPoint src(tests[index].ip_address, index);
IPEndPoint dest(src);
EXPECT_TRUE(src == dest);
@@ -159,8 +159,8 @@ TEST_F(IPEndPointTest, ToString) {
IPEndPoint endpoint;
EXPECT_EQ(0, endpoint.port());
- for (uint16 index = 0; index < test_count; ++index) {
- uint16 port = 100 + index;
+ for (uint16_t index = 0; index < test_count; ++index) {
+ uint16_t port = 100 + index;
IPEndPoint endpoint(tests[index].ip_address, port);
const std::string result = endpoint.ToString();
EXPECT_EQ(tests[index].host_normalized + ":" + base::IntToString(port),
« no previous file with comments | « net/base/ip_endpoint.cc ('k') | net/base/ip_pattern.h » ('j') | net/cert/crl_set_storage.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698