Convert some EXPECTs to ASSERTs to avoid crashes when object creation fails.
BUG=none
TEST=none
R=perkj@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/39649004
Cr-Commit-Position: refs/heads/master@{#8222}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8222 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/talk/app/webrtc/peerconnectioninterface_unittest.cc b/talk/app/webrtc/peerconnectioninterface_unittest.cc
index 09cd137..3b5c354 100644
--- a/talk/app/webrtc/peerconnectioninterface_unittest.cc
+++ b/talk/app/webrtc/peerconnectioninterface_unittest.cc
@@ -433,7 +433,7 @@
void CreateOfferAsRemoteDescription() {
rtc::scoped_ptr<SessionDescriptionInterface> offer;
- EXPECT_TRUE(DoCreateOffer(offer.use()));
+ ASSERT_TRUE(DoCreateOffer(offer.use()));
std::string sdp;
EXPECT_TRUE(offer->ToString(&sdp));
SessionDescriptionInterface* remote_offer =
@@ -445,7 +445,7 @@
void CreateAnswerAsLocalDescription() {
scoped_ptr<SessionDescriptionInterface> answer;
- EXPECT_TRUE(DoCreateAnswer(answer.use()));
+ ASSERT_TRUE(DoCreateAnswer(answer.use()));
// TODO(perkj): Currently SetLocalDescription fails if any parameters in an
// audio codec change, even if the parameter has nothing to do with
@@ -465,7 +465,7 @@
void CreatePrAnswerAsLocalDescription() {
scoped_ptr<SessionDescriptionInterface> answer;
- EXPECT_TRUE(DoCreateAnswer(answer.use()));
+ ASSERT_TRUE(DoCreateAnswer(answer.use()));
std::string sdp;
EXPECT_TRUE(answer->ToString(&sdp));
@@ -711,7 +711,7 @@
// Test CreateOffer
scoped_ptr<SessionDescriptionInterface> offer;
- EXPECT_TRUE(DoCreateOffer(offer.use()));
+ ASSERT_TRUE(DoCreateOffer(offer.use()));
int audio_ssrc = 0;
int video_ssrc = 0;
EXPECT_TRUE(GetFirstSsrc(GetFirstAudioContent(offer->description()),
@@ -723,7 +723,7 @@
// Test CreateAnswer
EXPECT_TRUE(DoSetRemoteDescription(offer.release()));
scoped_ptr<SessionDescriptionInterface> answer;
- EXPECT_TRUE(DoCreateAnswer(answer.use()));
+ ASSERT_TRUE(DoCreateAnswer(answer.use()));
audio_ssrc = 0;
video_ssrc = 0;
EXPECT_TRUE(GetFirstSsrc(GetFirstAudioContent(answer->description()),