Commit 791790ec authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #11841: don't put code with side effects in assert()

This code will not be evaluated if NDEBUG is defined
parent 796d60a8
......@@ -34,8 +34,6 @@
#include <cppunit/TestCase.h>
#include <cppunit/TestSuite.h>
#include <cassert>
// Application import
#include "noncopyable.h"
......
......@@ -34,8 +34,6 @@
#include <cppunit/TestCase.h>
#include <cppunit/TestSuite.h>
#include <assert.h>
// Application import
#include "numbercleaner.h"
// #include "../src/conference.h"
......
......@@ -32,7 +32,6 @@
#include <stdio.h>
#include <sstream>
#include <ccrtp/rtp.h>
#include <assert.h>
#include <string>
#include <cstring>
#include <math.h>
......
......@@ -118,9 +118,9 @@ void SDPTest::tearDown()
void SDPTest::receiveAnswerAfterInitialOffer(const pjmedia_sdp_session* remote)
{
assert(pjmedia_sdp_neg_get_state(session_->negotiator_) == PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER);
assert(pjmedia_sdp_neg_set_remote_answer(session_->memPool_, session_->negotiator_, remote) == PJ_SUCCESS);
assert(pjmedia_sdp_neg_get_state(session_->negotiator_) == PJMEDIA_SDP_NEG_STATE_WAIT_NEGO);
CPPUNIT_ASSERT(pjmedia_sdp_neg_get_state(session_->negotiator_) == PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER);
CPPUNIT_ASSERT(pjmedia_sdp_neg_set_remote_answer(session_->memPool_, session_->negotiator_, remote) == PJ_SUCCESS);
CPPUNIT_ASSERT(pjmedia_sdp_neg_get_state(session_->negotiator_) == PJMEDIA_SDP_NEG_STATE_WAIT_NEGO);
}
void SDPTest::testInitialOfferFirstCodec()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment