Commit fda5af48 authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #27724: test: fix sdp test

parent f26580d7
...@@ -141,7 +141,7 @@ void SDPTest::testInitialOfferFirstCodec() ...@@ -141,7 +141,7 @@ void SDPTest::testInitialOfferFirstCodec()
{ {
std::cout << "------------ SDPTest::testInitialOfferFirstCodec --------------" << std::endl; std::cout << "------------ SDPTest::testInitialOfferFirstCodec --------------" << std::endl;
CPPUNIT_ASSERT(session_->getLocalIP().empty()); CPPUNIT_ASSERT(session_->getPublishedIP().empty());
CPPUNIT_ASSERT(session_->getRemoteIP().empty()); CPPUNIT_ASSERT(session_->getRemoteIP().empty());
std::vector<int> codecSelection; std::vector<int> codecSelection;
...@@ -152,7 +152,7 @@ void SDPTest::testInitialOfferFirstCodec() ...@@ -152,7 +152,7 @@ void SDPTest::testInitialOfferFirstCodec()
std::vector<std::map<std::string, std::string> > videoCodecs(createVideoCodecs()); std::vector<std::map<std::string, std::string> > videoCodecs(createVideoCodecs());
session_->setLocalIP(LOCALHOST); session_->setPublishedIP(LOCALHOST);
session_->setLocalPublishedAudioPort(49567); session_->setLocalPublishedAudioPort(49567);
session_->createOffer(codecSelection, videoCodecs); session_->createOffer(codecSelection, videoCodecs);
...@@ -165,7 +165,7 @@ void SDPTest::testInitialOfferFirstCodec() ...@@ -165,7 +165,7 @@ void SDPTest::testInitialOfferFirstCodec()
session_->setMediaTransportInfoFromRemoteSdp(); session_->setMediaTransportInfoFromRemoteSdp();
CPPUNIT_ASSERT(session_->getLocalIP() == LOCALHOST); CPPUNIT_ASSERT(session_->getPublishedIP() == LOCALHOST);
CPPUNIT_ASSERT(session_->getRemoteIP() == "host.example.com"); CPPUNIT_ASSERT(session_->getRemoteIP() == "host.example.com");
} }
...@@ -173,7 +173,7 @@ void SDPTest::testInitialAnswerFirstCodec() ...@@ -173,7 +173,7 @@ void SDPTest::testInitialAnswerFirstCodec()
{ {
std::cout << "------------ SDPTest::testInitialAnswerFirstCodec -------------" << std::endl; std::cout << "------------ SDPTest::testInitialAnswerFirstCodec -------------" << std::endl;
CPPUNIT_ASSERT(session_->getLocalIP().empty()); CPPUNIT_ASSERT(session_->getPublishedIP().empty());
CPPUNIT_ASSERT(session_->getRemoteIP().empty()); CPPUNIT_ASSERT(session_->getRemoteIP().empty());
std::vector<int> codecSelection; std::vector<int> codecSelection;
...@@ -185,7 +185,7 @@ void SDPTest::testInitialAnswerFirstCodec() ...@@ -185,7 +185,7 @@ void SDPTest::testInitialAnswerFirstCodec()
pjmedia_sdp_parse(testPool_, (char*) sdp_offer1, strlen(sdp_offer1), &remoteOffer); pjmedia_sdp_parse(testPool_, (char*) sdp_offer1, strlen(sdp_offer1), &remoteOffer);
session_->setLocalIP(LOCALHOST); session_->setPublishedIP(LOCALHOST);
session_->setLocalPublishedAudioPort(49567); session_->setLocalPublishedAudioPort(49567);
session_->receiveOffer(remoteOffer, codecSelection, createVideoCodecs()); session_->receiveOffer(remoteOffer, codecSelection, createVideoCodecs());
...@@ -194,7 +194,7 @@ void SDPTest::testInitialAnswerFirstCodec() ...@@ -194,7 +194,7 @@ void SDPTest::testInitialAnswerFirstCodec()
session_->setMediaTransportInfoFromRemoteSdp(); session_->setMediaTransportInfoFromRemoteSdp();
CPPUNIT_ASSERT(session_->getLocalIP() == LOCALHOST); CPPUNIT_ASSERT(session_->getPublishedIP() == LOCALHOST);
CPPUNIT_ASSERT(session_->getRemoteIP() == "host.example.com"); CPPUNIT_ASSERT(session_->getRemoteIP() == "host.example.com");
} }
...@@ -202,7 +202,7 @@ void SDPTest::testInitialOfferLastCodec() ...@@ -202,7 +202,7 @@ void SDPTest::testInitialOfferLastCodec()
{ {
std::cout << "------------ SDPTest::testInitialOfferLastCodec --------------------" << std::endl; std::cout << "------------ SDPTest::testInitialOfferLastCodec --------------------" << std::endl;
CPPUNIT_ASSERT(session_->getLocalIP().empty()); CPPUNIT_ASSERT(session_->getPublishedIP().empty());
CPPUNIT_ASSERT(session_->getRemoteIP().empty()); CPPUNIT_ASSERT(session_->getRemoteIP().empty());
std::vector<int> codecSelection; std::vector<int> codecSelection;
...@@ -211,7 +211,7 @@ void SDPTest::testInitialOfferLastCodec() ...@@ -211,7 +211,7 @@ void SDPTest::testInitialOfferLastCodec()
codecSelection.push_back(PAYLOAD_CODEC_ALAW); codecSelection.push_back(PAYLOAD_CODEC_ALAW);
codecSelection.push_back(PAYLOAD_CODEC_G722); codecSelection.push_back(PAYLOAD_CODEC_G722);
session_->setLocalIP(LOCALHOST); session_->setPublishedIP(LOCALHOST);
session_->setLocalPublishedAudioPort(49567); session_->setLocalPublishedAudioPort(49567);
session_->createOffer(codecSelection, createVideoCodecs()); session_->createOffer(codecSelection, createVideoCodecs());
...@@ -224,7 +224,7 @@ void SDPTest::testInitialOfferLastCodec() ...@@ -224,7 +224,7 @@ void SDPTest::testInitialOfferLastCodec()
session_->setMediaTransportInfoFromRemoteSdp(); session_->setMediaTransportInfoFromRemoteSdp();
CPPUNIT_ASSERT(session_->getLocalIP() == LOCALHOST); CPPUNIT_ASSERT(session_->getPublishedIP() == LOCALHOST);
CPPUNIT_ASSERT(session_->getRemoteIP() == "host.example.com"); CPPUNIT_ASSERT(session_->getRemoteIP() == "host.example.com");
} }
...@@ -232,7 +232,7 @@ void SDPTest::testInitialAnswerLastCodec() ...@@ -232,7 +232,7 @@ void SDPTest::testInitialAnswerLastCodec()
{ {
std::cout << "------------ SDPTest::testInitialAnswerLastCodec ------------" << std::endl; std::cout << "------------ SDPTest::testInitialAnswerLastCodec ------------" << std::endl;
CPPUNIT_ASSERT(session_->getLocalIP().empty()); CPPUNIT_ASSERT(session_->getPublishedIP().empty());
CPPUNIT_ASSERT(session_->getRemoteIP().empty()); CPPUNIT_ASSERT(session_->getRemoteIP().empty());
std::vector<int> codecSelection; std::vector<int> codecSelection;
...@@ -244,7 +244,7 @@ void SDPTest::testInitialAnswerLastCodec() ...@@ -244,7 +244,7 @@ void SDPTest::testInitialAnswerLastCodec()
pjmedia_sdp_parse(testPool_, (char*)sdp_offer2, strlen(sdp_offer2), &remoteOffer); pjmedia_sdp_parse(testPool_, (char*)sdp_offer2, strlen(sdp_offer2), &remoteOffer);
session_->setLocalIP(LOCALHOST); session_->setPublishedIP(LOCALHOST);
session_->setLocalPublishedAudioPort(49567); session_->setLocalPublishedAudioPort(49567);
session_->receiveOffer(remoteOffer, codecSelection, createVideoCodecs()); session_->receiveOffer(remoteOffer, codecSelection, createVideoCodecs());
...@@ -253,7 +253,7 @@ void SDPTest::testInitialAnswerLastCodec() ...@@ -253,7 +253,7 @@ void SDPTest::testInitialAnswerLastCodec()
session_->setMediaTransportInfoFromRemoteSdp(); session_->setMediaTransportInfoFromRemoteSdp();
CPPUNIT_ASSERT(session_->getLocalIP() == LOCALHOST); CPPUNIT_ASSERT(session_->getPublishedIP() == LOCALHOST);
CPPUNIT_ASSERT(session_->getRemoteIP() == "host.example.com"); CPPUNIT_ASSERT(session_->getRemoteIP() == "host.example.com");
} }
...@@ -262,7 +262,7 @@ void SDPTest::testReinvite() ...@@ -262,7 +262,7 @@ void SDPTest::testReinvite()
{ {
std::cout << "------------ SDPTest::testReinvite --------------------" << std::endl; std::cout << "------------ SDPTest::testReinvite --------------------" << std::endl;
CPPUNIT_ASSERT(session_->getLocalIP().empty()); CPPUNIT_ASSERT(session_->getPublishedIP().empty());
CPPUNIT_ASSERT(session_->getRemoteIP().empty()); CPPUNIT_ASSERT(session_->getRemoteIP().empty());
std::vector<int> codecSelection; std::vector<int> codecSelection;
...@@ -270,7 +270,7 @@ void SDPTest::testReinvite() ...@@ -270,7 +270,7 @@ void SDPTest::testReinvite()
codecSelection.push_back(PAYLOAD_CODEC_ALAW); codecSelection.push_back(PAYLOAD_CODEC_ALAW);
codecSelection.push_back(PAYLOAD_CODEC_G722); codecSelection.push_back(PAYLOAD_CODEC_G722);
session_->setLocalIP(LOCALHOST); session_->setPublishedIP(LOCALHOST);
session_->setLocalPublishedAudioPort(49567); session_->setLocalPublishedAudioPort(49567);
std::vector<std::map<std::string, std::string> > videoCodecs(createVideoCodecs()); std::vector<std::map<std::string, std::string> > videoCodecs(createVideoCodecs());
...@@ -285,7 +285,7 @@ void SDPTest::testReinvite() ...@@ -285,7 +285,7 @@ void SDPTest::testReinvite()
session_->setMediaTransportInfoFromRemoteSdp(); session_->setMediaTransportInfoFromRemoteSdp();
CPPUNIT_ASSERT(session_->getLocalIP() == LOCALHOST); CPPUNIT_ASSERT(session_->getPublishedIP() == LOCALHOST);
CPPUNIT_ASSERT(session_->getRemoteIP() == "host.example.com"); CPPUNIT_ASSERT(session_->getRemoteIP() == "host.example.com");
std::vector<sfl::AudioCodec*> codecs; std::vector<sfl::AudioCodec*> codecs;
session_->getSessionAudioMedia(codecs); session_->getSessionAudioMedia(codecs);
......
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