Fix some WebRTC tests to build with GCC 7.0.

This commit is contained in:
trav90 2018-03-04 15:34:58 -06:00 • committed by Roy Tam
commit ebf0f6c35a
2 changed files with 14 additions and 8 deletions

View file

@ -550,14 +550,16 @@ class TransportConduitTest : public ::testing::Test
mozilla::SyncRunnable::DispatchToThread(gMainThread, mozilla::SyncRunnable::DispatchToThread(gMainThread,
WrapRunnableNMRet(&mAudioSession, WrapRunnableNMRet(&mAudioSession,
&mozilla::AudioSessionConduit::Create)); &mozilla::AudioSessionConduit::Create));
if( !mAudioSession ) if( !mAudioSession ) {
ASSERT_NE(mAudioSession, (void*)nullptr); ASSERT_NE(mAudioSession, (void*)nullptr);
}
mozilla::SyncRunnable::DispatchToThread(gMainThread, mozilla::SyncRunnable::DispatchToThread(gMainThread,
WrapRunnableNMRet(&mAudioSession2, WrapRunnableNMRet(&mAudioSession2,
&mozilla::AudioSessionConduit::Create)); &mozilla::AudioSessionConduit::Create));
if( !mAudioSession2 ) if( !mAudioSession2 ) {
ASSERT_NE(mAudioSession2, (void*)nullptr); ASSERT_NE(mAudioSession2, (void*)nullptr);
}
WebrtcMediaTransport* xport = new WebrtcMediaTransport(); WebrtcMediaTransport* xport = new WebrtcMediaTransport();
ASSERT_NE(xport, (void*)nullptr); ASSERT_NE(xport, (void*)nullptr);
@ -615,15 +617,17 @@ class TransportConduitTest : public ::testing::Test
mozilla::SyncRunnable::DispatchToThread(gMainThread, mozilla::SyncRunnable::DispatchToThread(gMainThread,
WrapRunnableNMRet(&mVideoSession, WrapRunnableNMRet(&mVideoSession,
&mozilla::VideoSessionConduit::Create)); &mozilla::VideoSessionConduit::Create));
if( !mVideoSession ) if( !mVideoSession ) {
ASSERT_NE(mVideoSession, (void*)nullptr); ASSERT_NE(mVideoSession, (void*)nullptr);
}
// This session is for other one // This session is for other one
mozilla::SyncRunnable::DispatchToThread(gMainThread, mozilla::SyncRunnable::DispatchToThread(gMainThread,
WrapRunnableNMRet(&mVideoSession2, WrapRunnableNMRet(&mVideoSession2,
&mozilla::VideoSessionConduit::Create)); &mozilla::VideoSessionConduit::Create));
if( !mVideoSession2 ) if( !mVideoSession2 ) {
ASSERT_NE(mVideoSession2,(void*)nullptr); ASSERT_NE(mVideoSession2,(void*)nullptr);
}
if (!send_vp8) { if (!send_vp8) {
SetGmpCodecs(); SetGmpCodecs();
@ -716,8 +720,9 @@ class TransportConduitTest : public ::testing::Test
mozilla::SyncRunnable::DispatchToThread(gMainThread, mozilla::SyncRunnable::DispatchToThread(gMainThread,
WrapRunnableNMRet(&videoSession, WrapRunnableNMRet(&videoSession,
&mozilla::VideoSessionConduit::Create)); &mozilla::VideoSessionConduit::Create));
if( !videoSession ) if( !videoSession ) {
ASSERT_NE(videoSession, (void*)nullptr); ASSERT_NE(videoSession, (void*)nullptr);
}
//Test Configure Recv Codec APIS //Test Configure Recv Codec APIS
cerr << " *************************************************" << endl; cerr << " *************************************************" << endl;
@ -831,8 +836,9 @@ class TransportConduitTest : public ::testing::Test
mozilla::SyncRunnable::DispatchToThread(gMainThread, mozilla::SyncRunnable::DispatchToThread(gMainThread,
WrapRunnableNMRet(&mVideoSession, WrapRunnableNMRet(&mVideoSession,
&mozilla::VideoSessionConduit::Create)); &mozilla::VideoSessionConduit::Create));
if( !mVideoSession ) if( !mVideoSession ) {
ASSERT_NE(mVideoSession, (void*)nullptr); ASSERT_NE(mVideoSession, (void*)nullptr);
}
mozilla::EncodingConstraints constraints; mozilla::EncodingConstraints constraints;
constraints.maxFs = max_fs; constraints.maxFs = max_fs;

View file

@ -1475,8 +1475,8 @@ class SignalingAgent {
pObserver->addIceCandidateState = TestObserver::stateNoResponse; pObserver->addIceCandidateState = TestObserver::stateNoResponse;
pc->AddIceCandidate(candidate.c_str(), mid.c_str(), level); pc->AddIceCandidate(candidate.c_str(), mid.c_str(), level);
ASSERT_TRUE(pObserver->addIceCandidateState == ASSERT_TRUE(pObserver->addIceCandidateState ==
expectSuccess ? TestObserver::stateSuccess : (expectSuccess ? TestObserver::stateSuccess :
TestObserver::stateError TestObserver::stateError)
); );
// Verify that adding ICE candidates does not change the signaling state // Verify that adding ICE candidates does not change the signaling state