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

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

Issue 2622413005: Replace use of ASSERT in test code. (Closed)
Patch Set: Fixed another signed/unsigned comparison. 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
« no previous file with comments | « webrtc/base/testutils.h ('k') | webrtc/p2p/base/p2ptransportchannel_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/dtlstransportchannel_unittest.cc
diff --git a/webrtc/p2p/base/dtlstransportchannel_unittest.cc b/webrtc/p2p/base/dtlstransportchannel_unittest.cc
index bff2e7da5d27ff18285a402d1f65c78a0a54ea0a..4eba26d241db00574070fda57bd12c53c32f90ea 100644
--- a/webrtc/p2p/base/dtlstransportchannel_unittest.cc
+++ b/webrtc/p2p/base/dtlstransportchannel_unittest.cc
@@ -14,6 +14,7 @@
#include "webrtc/p2p/base/dtlstransportchannel.h"
#include "webrtc/p2p/base/faketransportcontroller.h"
#include "webrtc/p2p/base/packettransportinterface.h"
+#include "webrtc/base/checks.h"
#include "webrtc/base/common.h"
#include "webrtc/base/dscp.h"
#include "webrtc/base/gunit.h"
@@ -78,7 +79,7 @@ class DtlsTestClient : public sigslot::has_slots<> {
return certificate_;
}
void SetupSrtp() {
- ASSERT(certificate_);
+ EXPECT_TRUE(certificate_ != nullptr);
use_dtls_srtp_ = true;
}
void SetupMaxProtocolVersion(rtc::SSLProtocolVersion version) {
@@ -300,7 +301,7 @@ class DtlsTestClient : public sigslot::has_slots<> {
}
void SendPackets(size_t channel, size_t size, size_t count, bool srtp) {
- ASSERT(channel < channels_.size());
+ RTC_CHECK(channel < channels_.size());
std::unique_ptr<char[]> packet(new char[size]);
size_t sent = 0;
do {
@@ -324,7 +325,7 @@ class DtlsTestClient : public sigslot::has_slots<> {
}
int SendInvalidSrtpPacket(size_t channel, size_t size) {
- ASSERT(channel < channels_.size());
+ RTC_CHECK(channel < channels_.size());
std::unique_ptr<char[]> packet(new char[size]);
// Fill the packet with 0 to form an invalid SRTP packet.
memset(packet.get(), 0, size);
« no previous file with comments | « webrtc/base/testutils.h ('k') | webrtc/p2p/base/p2ptransportchannel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698