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

Side by Side Diff: webrtc/base/network_unittest.cc

Issue 2623473004: Replace all use of the VERIFY macro. (Closed)
Patch Set: Delete a DCHECK, instead log and return failure. And fix compile error in previous patch set. Created 3 years, 10 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
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 for (const auto& kv : network_manager.networks_map_) { 97 for (const auto& kv : network_manager.networks_map_) {
98 delete kv.second; 98 delete kv.second;
99 } 99 }
100 network_manager.networks_.clear(); 100 network_manager.networks_.clear();
101 network_manager.networks_map_.clear(); 101 network_manager.networks_map_.clear();
102 } 102 }
103 103
104 AdapterType GetAdapterType(BasicNetworkManager& network_manager) { 104 AdapterType GetAdapterType(BasicNetworkManager& network_manager) {
105 BasicNetworkManager::NetworkList list; 105 BasicNetworkManager::NetworkList list;
106 network_manager.GetNetworks(&list); 106 network_manager.GetNetworks(&list);
107 RTC_CHECK(list.size() == 1u); 107 RTC_CHECK_EQ(1, list.size());
108 return list[0]->type(); 108 return list[0]->type();
109 } 109 }
110 110
111 #if defined(WEBRTC_POSIX) 111 #if defined(WEBRTC_POSIX)
112 // Separated from CreateNetworks for tests. 112 // Separated from CreateNetworks for tests.
113 static void CallConvertIfAddrs(const BasicNetworkManager& network_manager, 113 static void CallConvertIfAddrs(const BasicNetworkManager& network_manager,
114 struct ifaddrs* interfaces, 114 struct ifaddrs* interfaces,
115 bool include_ignored, 115 bool include_ignored,
116 NetworkManager::NetworkList* networks) { 116 NetworkManager::NetworkList* networks) {
117 // Use the base IfAddrsConverter for test cases. 117 // Use the base IfAddrsConverter for test cases.
(...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after
1145 // If the set default address is in a network, GetDefaultLocalAddress will 1145 // If the set default address is in a network, GetDefaultLocalAddress will
1146 // return the best IP in that network. 1146 // return the best IP in that network.
1147 manager.set_default_local_addresses(GetLoopbackIP(AF_INET), ip2); 1147 manager.set_default_local_addresses(GetLoopbackIP(AF_INET), ip2);
1148 EXPECT_TRUE(manager.GetDefaultLocalAddress(AF_INET6, &ip)); 1148 EXPECT_TRUE(manager.GetDefaultLocalAddress(AF_INET6, &ip));
1149 EXPECT_EQ(static_cast<IPAddress>(ip1), ip); 1149 EXPECT_EQ(static_cast<IPAddress>(ip1), ip);
1150 1150
1151 manager.StopUpdating(); 1151 manager.StopUpdating();
1152 } 1152 }
1153 1153
1154 } // namespace rtc 1154 } // namespace rtc
OLDNEW
« no previous file with comments | « webrtc/base/httpserver.cc ('k') | webrtc/base/openssladapter.cc » ('j') | webrtc/pc/webrtcsdp.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698