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

Side by Side Diff: webrtc/voice_engine/test/channel_transport/udp_transport_unittest.cc

Issue 2685783014: Replace NULL with nullptr in all C++ files. (Closed)
Patch Set: Fixing android. 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 (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 TEST_F(UDPTransportTest, CreateTransport) { 111 TEST_F(UDPTransportTest, CreateTransport) {
112 int32_t id = 0; 112 int32_t id = 0;
113 uint8_t threads = 1; 113 uint8_t threads = 1;
114 UdpTransport* transport = UdpTransport::Create(id, threads); 114 UdpTransport* transport = UdpTransport::Create(id, threads);
115 UdpTransport::Destroy(transport); 115 UdpTransport::Destroy(transport);
116 } 116 }
117 117
118 // This test verifies that the mock_socket is not called from the constructor. 118 // This test verifies that the mock_socket is not called from the constructor.
119 TEST_F(UDPTransportTest, ConstructorDoesNotCreateSocket) { 119 TEST_F(UDPTransportTest, ConstructorDoesNotCreateSocket) {
120 int32_t id = 0; 120 int32_t id = 0;
121 UdpTransportImpl::SocketFactoryInterface* null_maker = NULL; 121 UdpTransportImpl::SocketFactoryInterface* null_maker = nullptr;
122 UdpSocketManager* null_manager = NULL; 122 UdpSocketManager* null_manager = nullptr;
123 UdpTransport* transport = new UdpTransportImpl(id, 123 UdpTransport* transport = new UdpTransportImpl(id,
124 null_maker, 124 null_maker,
125 null_manager); 125 null_manager);
126 delete transport; 126 delete transport;
127 } 127 }
128 128
129 TEST_F(UDPTransportTest, InitializeSourcePorts) { 129 TEST_F(UDPTransportTest, InitializeSourcePorts) {
130 int32_t id = 0; 130 int32_t id = 0;
131 UdpTransportImpl::SocketFactoryInterface* mock_maker 131 UdpTransportImpl::SocketFactoryInterface* mock_maker
132 = new MockSocketFactory(sockets_created()); 132 = new MockSocketFactory(sockets_created());
133 MockUdpSocketManager* mock_manager = new MockUdpSocketManager(); 133 MockUdpSocketManager* mock_manager = new MockUdpSocketManager();
134 UdpTransport* transport = new UdpTransportImpl(id, 134 UdpTransport* transport = new UdpTransportImpl(id,
135 mock_maker, 135 mock_maker,
136 mock_manager); 136 mock_manager);
137 EXPECT_EQ(0, transport->InitializeSourcePorts(4711, 4712)); 137 EXPECT_EQ(0, transport->InitializeSourcePorts(4711, 4712));
138 EXPECT_EQ(2u, NumSocketsCreated()); 138 EXPECT_EQ(2u, NumSocketsCreated());
139 139
140 delete transport; 140 delete transport;
141 mock_manager->Destroy(); 141 mock_manager->Destroy();
142 } 142 }
143 143
144 } // namespace test 144 } // namespace test
145 } // namespace webrtc 145 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698