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

Side by Side Diff: net/base/ip_address_unittest.cc

Issue 2101863004: net: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | net/base/parse_number_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/base/ip_address.h" 5 #include "net/base/ip_address.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 "192.168.1.1/-1", 497 "192.168.1.1/-1",
498 "192.168.1.1/33", 498 "192.168.1.1/33",
499 "::1/-3", 499 "::1/-3",
500 "a::3/129", 500 "a::3/129",
501 "::1/x", 501 "::1/x",
502 "192.168.0.1//11", 502 "192.168.0.1//11",
503 "192.168.1.1/+1", 503 "192.168.1.1/+1",
504 "192.168.1.1/ +1", 504 "192.168.1.1/ +1",
505 "192.168.1.1/"}; 505 "192.168.1.1/"};
506 506
507 for (const auto& bad_literal : bad_literals) { 507 for (auto* bad_literal : bad_literals) {
508 IPAddress ip_address; 508 IPAddress ip_address;
509 size_t prefix_length_in_bits; 509 size_t prefix_length_in_bits;
510 510
511 EXPECT_FALSE( 511 EXPECT_FALSE(
512 ParseCIDRBlock(bad_literal, &ip_address, &prefix_length_in_bits)); 512 ParseCIDRBlock(bad_literal, &ip_address, &prefix_length_in_bits));
513 } 513 }
514 } 514 }
515 515
516 // Test parsing a valid CIDR notation literal. 516 // Test parsing a valid CIDR notation literal.
517 TEST(IPAddressTest, ParseCIDRBlock_Valid) { 517 TEST(IPAddressTest, ParseCIDRBlock_Valid) {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 593
594 // Prefix is longer than the address. 594 // Prefix is longer than the address.
595 uint8_t ipv6_prefix5[] = {42, 0, 20, 80, 64, 12, 12, 9, 0, 595 uint8_t ipv6_prefix5[] = {42, 0, 20, 80, 64, 12, 12, 9, 0,
596 0, 0, 0, 0, 0, 0, 0, 10}; 596 0, 0, 0, 0, 0, 0, 0, 10};
597 EXPECT_FALSE(IPAddressStartsWith(ipv6_address, ipv6_prefix5)); 597 EXPECT_FALSE(IPAddressStartsWith(ipv6_address, ipv6_prefix5));
598 } 598 }
599 599
600 } // anonymous namespace 600 } // anonymous namespace
601 601
602 } // namespace net 602 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/base/parse_number_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698