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

Unified Diff: webrtc/p2p/base/turnport_unittest.cc

Issue 2622413005: Replace use of ASSERT in test code. (Closed)
Patch Set: Created 3 years, 11 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: webrtc/p2p/base/turnport_unittest.cc
diff --git a/webrtc/p2p/base/turnport_unittest.cc b/webrtc/p2p/base/turnport_unittest.cc
index edad8122da80870bad96a80382703054fac2850e..69b25ea0d8ef35a00e78eb312fd322cb76e35bee 100644
--- a/webrtc/p2p/base/turnport_unittest.cc
+++ b/webrtc/p2p/base/turnport_unittest.cc
@@ -22,6 +22,7 @@
#include "webrtc/p2p/base/udpport.h"
#include "webrtc/base/asynctcpsocket.h"
#include "webrtc/base/buffer.h"
+#include "webrtc/base/checks.h"
#include "webrtc/base/dscp.h"
#include "webrtc/base/fakeclock.h"
#include "webrtc/base/firewallsocketserver.h"
@@ -163,7 +164,7 @@ class TurnPortTest : public testing::Test,
}
virtual void OnMessage(rtc::Message* msg) {
- ASSERT(msg->message_id == MSG_TESTFINISH);
+ RTC_CHECK(msg->message_id == MSG_TESTFINISH);
if (msg->message_id == MSG_TESTFINISH)
test_finish_ = true;
}
@@ -273,7 +274,7 @@ class TurnPortTest : public testing::Test,
void CreateSharedTurnPort(const std::string& username,
const std::string& password,
const ProtocolAddress& server_address) {
- ASSERT(server_address.proto == PROTO_UDP);
+ RTC_CHECK(server_address.proto == PROTO_UDP);
kwiberg-webrtc 2017/01/17 09:39:25 ASSERT_* is used elsewhere in this function.
nisse-webrtc 2017/01/17 12:19:21 And that use is probably broken...
kwiberg-webrtc 2017/01/17 13:52:47 In that case, EXPECT_* may be better.
if (!socket_) {
socket_.reset(socket_factory_.CreateUdpSocket(

Powered by Google App Engine
This is Rietveld 408576698