本文整理汇总了C++中EUNIT_ASSERT_EQUALS函数的典型用法代码示例。如果您正苦于以下问题:C++ EUNIT_ASSERT_EQUALS函数的具体用法?C++ EUNIT_ASSERT_EQUALS怎么用?C++ EUNIT_ASSERT_EQUALS使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了EUNIT_ASSERT_EQUALS函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: refCount
void UT_CMccRtpKeepalive::UT_CMccRtpKeepalive_StopKeepaliveL()
{
TInt refCount( 0 );
if ( iAlloc )
{
iKeepaliveHandler->StartKeepaliveL(
*static_cast<CMccRtpDataSource*>( iRtpSource ), *iRtpMediaClock );
iKeepaliveHandler->StopKeepalive( *static_cast<CMccRtpDataSource*>( iRtpSource ), refCount );
EUNIT_ASSERT_EQUALS( refCount, 0 );
}
else
{
EUNIT_ASSERT_EQUALS(
iKeepaliveHandler->StopKeepalive( *static_cast<CMccRtpDataSource*>( iRtpSource ), refCount ),
KErrNotFound );
iKeepaliveHandler->StartKeepaliveL( *static_cast<CMccRtpDataSource*>( iRtpSource ), *iRtpMediaClock );
EUNIT_ASSERT_EQUALS( iKeepaliveHandler->iUsers.Count(), 1 );
iKeepaliveHandler->StopKeepalive( *static_cast<CMccRtpDataSource*>( iRtpSource ), refCount );
EUNIT_ASSERT_EQUALS( refCount, 0 );
}
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:26,代码来源:UT_CMccRtpKeepalive.cpp
示例2: _LIT
// -----------------------------------------------------------------------------
// UT_CQwertyKeyMap::UT_CheckSpecialCharactersL
// Check that the special characters from HbKeyboardSctLandscape are mapped.
// -----------------------------------------------------------------------------
//
void UT_CQwertyKeyMap::UT_CheckSpecialCharactersL()
{
// NOTE: these test cases pass in english, but not necesary with other
// languages, as each language has its own keymap with some differences.
_LIT(KInputWithSpecialChars, "<A1>C#W*2-($)&");
_LIT(KMappedResult, "#a1#c#w#2-###&");
HBufC* mapped = iKeyMap->GetMappedStringL(KInputWithSpecialChars);
CleanupStack::PushL(mapped);
EUNIT_ASSERT_EQUALS(*mapped, KMappedResult);
CleanupStack::PopAndDestroy(mapped);
mapped = NULL;
// Those special characters (e.g '.') that are present in virtual
// QWERTY keymap, have been mapped to individual keys.
// That depends on the used language.
_LIT(KInputWithSpecialChars2, ".8Hg %01 kK£");
_LIT(KMappedResult2, ".8hg #01 kk#");
mapped = iKeyMap->GetMappedStringL(KInputWithSpecialChars2);
CleanupStack::PushL(mapped);
EUNIT_ASSERT_EQUALS(*mapped, KMappedResult2);
CleanupStack::PopAndDestroy(mapped);
mapped = NULL;
}
开发者ID:KDE,项目名称:android-qt-mobility,代码行数:31,代码来源:t_cqwertykeymap.cpp
示例3: mediaIdAudio
void UT_CG711PayloadFormatWrite::UT_CG711PayloadFormatWrite_FrameTimeIntervalL( )
{
//iWrite->iFrameTimeInterval = 20000 * 2; // 20k * Channels
TTimeIntervalMicroSeconds catchAfish;
TMediaId mediaIdAudio( KUidMediaTypeAudio, 1 );
TMediaId mediaIdVideo( KUidMediaTypeVideo, 1 );
if ( !iAlloc )
{
catchAfish = iWrite->FrameTimeInterval ( mediaIdAudio );
EUNIT_ASSERT_EQUALS( catchAfish.Int64(), 0 );
catchAfish = iWrite->FrameTimeInterval ( mediaIdVideo );
EUNIT_ASSERT_EQUALS( catchAfish.Int64(), 0 );
}
else
{
EUNIT_ASSERT_NO_LEAVE( iWrite->FrameTimeInterval ( mediaIdAudio ) );
EUNIT_ASSERT_NO_LEAVE( iWrite->FrameTimeInterval ( mediaIdVideo ) );
}
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:25,代码来源:UT_CG711PayloadFormatWrite.cpp
示例4: EUNIT_ASSERT_SPECIFIC_LEAVE
void UT_CMccRtpDataSource::UT_CMccRtpDataSource_SourcePlayLL()
{
// Not logged on
EUNIT_ASSERT_SPECIFIC_LEAVE( iSource->SourcePlayL(), KErrNotFound );
// Not allowed if not yet prepared
InitializeL();
EUNIT_ASSERT_SPECIFIC_LEAVE( iSource->SourcePlayL(), KErrNotReady );
// Ok when already prepared
iSource->iState = MMccRtpInterface::ERtpStatePrimed;
EUNIT_ASSERT_NO_LEAVE( iSource->SourcePlayL() );
EUNIT_ASSERT_EQUALS( iEventHandler->iLastEvent.iEventType, KMccStreamStarted );
// Resuming
iSource->iState = MMccRtpInterface::ERtpStatePaused;
EUNIT_ASSERT_NO_LEAVE( iSource->SourcePlayL() );
EUNIT_ASSERT_EQUALS( iEventHandler->iLastEvent.iEventType, KMccStreamResumed );
EUNIT_ASSERT( iRtpKeepaliveMechanism->iStopped == EFalse )
// State downgrade is ignored
EUNIT_ASSERT_NO_LEAVE( iSource->SourcePrimeL() );
EUNIT_ASSERT( MMccRtpInterface::ERtpStatePlaying == iSource->State() );
// "Secure session"
iRtpKeepaliveMechanism->iStopped = ETrue;
TInt fakeSecSession( 3 );
iSource->iSecSession = reinterpret_cast<CSRTPSession*>( &fakeSecSession );
EUNIT_ASSERT_NO_LEAVE( iSource->SourcePlayL() );
EUNIT_ASSERT( iRtpKeepaliveMechanism->iStopped == ETrue )
iSource->iSecSession = NULL;
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:33,代码来源:UT_CMccRtpDataSource.cpp
示例5: returnValue
void UT_CMccJitterCalculator::UT_CMccJitterCalculator_CalculateFerL()
{
TUint32 returnValue( 0 );
// packet lost
TUint32 prevValue( 0 );
TBool valueToadd( ETrue );
TBool flagToAdd( ETrue );
returnValue = iCalculator->CalculateFer( prevValue, valueToadd, flagToAdd );
EUNIT_ASSERT_EQUALS( returnValue, 2000 );
// packet lost
// returnValue == 2000
returnValue = iCalculator->CalculateFer( returnValue, valueToadd, flagToAdd );
EUNIT_ASSERT_EQUALS( returnValue, 3992 );
// no packet lost - late packet - remove FER
// decrease fer
flagToAdd = EFalse;
// returnValue == 3996
returnValue = iCalculator->CalculateFer( returnValue, valueToadd, flagToAdd );
EUNIT_ASSERT_EQUALS( returnValue, 2008 );
// no packet lost - late packet - remove FER
// decrease fer
flagToAdd = EFalse;
// returnValue == 5
returnValue = 5;
returnValue = iCalculator->CalculateFer( returnValue, valueToadd, flagToAdd );
EUNIT_ASSERT_EQUALS( returnValue, 0);
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:33,代码来源:UT_CMccJitterCalculator.cpp
示例6: EUNIT_ASSERT
// -----------------------------------------------------------------------------
// CMceVideoCodecTest:: GettersTestL
// -----------------------------------------------------------------------------
//
void CMceVideoCodecTest::GettersTestL()
{
CMceComVideoCodec* flatData =
static_cast<CMceComVideoCodec*>( iVideoCodec->iFlatData );
// AllowedFrameRates
flatData->iAllowedFrameRates = KSomeAllowedFrameRates;
EUNIT_ASSERT( iVideoCodec->AllowedFrameRates() == KSomeAllowedFrameRates );
// FrameRate
flatData->iFrameRate = KSomeFrameRate;
EUNIT_ASSERT( iVideoCodec->FrameRate() == KSomeFrameRate);
// MaxBitRate
flatData->iMaxBitRate = KSomeMaxBitRate;
EUNIT_ASSERT( iVideoCodec->MaxBitRate() == KSomeMaxBitRate );
// AllowedResolutions
flatData->iAllowedResolutions = KSomeAllowedResolutions;
EUNIT_ASSERT( iVideoCodec->AllowedResolutions() == KSomeAllowedResolutions );
// Resolution
flatData->iResolutionWidth = KSomeResolutionWidth;
flatData->iResolutionHeight = KSomeResolutionHeight;
EUNIT_ASSERT_EQUALS( KSomeResolutionWidth, iVideoCodec->Resolution().iWidth );
EUNIT_ASSERT_EQUALS( KSomeResolutionHeight, iVideoCodec->Resolution().iHeight );
}
开发者ID:piashishi,项目名称:mce,代码行数:32,代码来源:mcevideocodectest.cpp
示例7: CleanupClosePushL
void UT_CMccRtpDataSource::UT_CMccRtpDataSource_RegisterPayloadTypesLL()
{
RArray<TUint> payloads;
CleanupClosePushL( payloads );
payloads.AppendL( KPcmuPayloadType );
payloads.AppendL( KDefaultAmrNbPT );
iSource->RegisterPayloadTypesL( payloads );
EUNIT_ASSERT_EQUALS( iSource->iUsers.Count(), 2 );
// Do again, multiple entries are not created
iSource->RegisterPayloadTypesL( payloads );
EUNIT_ASSERT_EQUALS( iSource->iUsers.Count(), 2 );
// Try to unregister not registered payload type
RArray<TUint> payloads2;
CleanupClosePushL( payloads2 );
payloads2.AppendL( KPcmaPayloadType );
iSource->UnRegisterPayloadTypes( payloads2 );
EUNIT_ASSERT_EQUALS( iSource->iUsers.Count(), 2 );
CleanupStack::PopAndDestroy( &payloads2 );
// Unregister registered payload types
iSource->UnRegisterPayloadTypes( payloads );
EUNIT_ASSERT_EQUALS( iSource->iUsers.Count(), 0 );
CleanupStack::PopAndDestroy( &payloads );
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:26,代码来源:UT_CMccRtpDataSource.cpp
示例8: EUNIT_ASSERT
void UT_CMceCsReceiveQueue::UT_CMceCsReceiveQueue_IsEmptyL( )
{
TMceIds ids;
// Test empty
EUNIT_ASSERT (iReceiveQueue->IsEmpty());
EUNIT_ASSERT_EQUALS (0, iReceiveQueue->iReceiveItems.Count());
// Add first item
HBufC8* headers = HBufC8::NewL(1);
CleanupStack::PushL (headers);
HBufC8* content = HBufC8::NewLC(1);
TMceCSReceiveItem item1(ids,headers,content,ETrue);
User::LeaveIfError(iReceiveQueue->AddLast(item1));
CleanupStack::Pop (2); // content, headers
EUNIT_ASSERT (!iReceiveQueue->IsEmpty());
EUNIT_ASSERT_EQUALS (1, iReceiveQueue->iReceiveItems.Count());
// Add second item
TMceCSReceiveItem item2(ids,KErrGeneral);
User::LeaveIfError(iReceiveQueue->AddLast(item2));
EUNIT_ASSERT (!iReceiveQueue->IsEmpty());
EUNIT_ASSERT_EQUALS (2, iReceiveQueue->iReceiveItems.Count());
// Test remove first item
iReceiveQueue->RemoveFirst();
EUNIT_ASSERT (!iReceiveQueue->IsEmpty());
EUNIT_ASSERT_EQUALS (1, iReceiveQueue->iReceiveItems.Count());
// Test remove second item
iReceiveQueue->RemoveFirst();
EUNIT_ASSERT (iReceiveQueue->IsEmpty());
EUNIT_ASSERT_EQUALS (0, iReceiveQueue->iReceiveItems.Count());
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:34,代码来源:UT_CMCECSReceiveQueue.cpp
示例9: nullData
void UT_CDTMFPayloadFormatRead::UT_CDTMFPayloadFormatRead_SetPayloadFormatL()
{
TDTMFPayloadFormat nullData( EDTMFPayloadFormatNotDefined );
EUNIT_ASSERT_EQUALS( iRead->SetPayloadFormat( nullData ), KErrNotSupported );
TDTMFPayloadFormat validData( EDTMFPayloadFormatTone );
EUNIT_ASSERT_EQUALS( iRead->SetPayloadFormat( validData ), KErrNone );
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:8,代码来源:UT_CDTMFPayloadFormatRead.cpp
示例10: _L
void UT_CDTMFPayloadFormatRead::UT_CDTMFPayloadFormatRead_FrameTimeIntervalL( )
{
TInt64 interval = iRead->FrameTimeInterval( KUidMediaTypeAudio ).Int64();
RDebug::Print( _L( "Frametime Interval value = %d" ), interval );
EUNIT_ASSERT_EQUALS( iRead->FrameTimeInterval( KUidMediaTypeAudio ).Int64(), interval );
EUNIT_ASSERT_EQUALS( iRead->FrameTimeInterval( KUidMediaTypeVideo ).Int64(), 0 );
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:8,代码来源:UT_CDTMFPayloadFormatRead.cpp
示例11: EUNIT_ASSERT_EQUALS
// -----------------------------------------------------------------------------
// UT_CQwertyKeyMap::UT_CheckAmountOfMappedKeysL
// Check the internal qwerty keymap does not have unnecessary (empty) entries.
// -----------------------------------------------------------------------------
//
void UT_CQwertyKeyMap::UT_CheckAmountOfMappedKeysL()
{
TInt amountOfMappedKeys = iKeyMap->iAmountOfKeys;
EUNIT_ASSERT_EQUALS(amountOfMappedKeys, iKeyMap->iKeyNames.count());
EUNIT_ASSERT_EQUALS(amountOfMappedKeys, iKeyMap->iKeyValues.count());
//EUNIT_ASSERT_EQUALS(amountOfMappedKeys, iKeyMap->iKeyMapping.count());
}
开发者ID:KDE,项目名称:android-qt-mobility,代码行数:13,代码来源:t_cqwertykeymap.cpp
示例12: data
void Ut_CSpsBufferedPublisher::Ut_CSpsBufferedPublisher_DataSizeL()
{
const TUint32 data( 0xFFFFFFFF );
CSpsBufferedPublisher::SetL( KUidSystemCategory, KSPNotifyChangeKey, data );
RArray<TUint32> array;
iPublisher->GetL( array );
EUNIT_ASSERT_EQUALS( 1, array.Count() );
EUNIT_ASSERT_EQUALS( data, array[0] );
array.Close();
}
开发者ID:kuailexs,项目名称:symbiandump-mw2,代码行数:10,代码来源:ut_spsbufferedpublisher.cpp
示例13: _LIT8
void CNSmlDummyDataProvider_Test::TestStoreSupportMimeTypeL()
{
_LIT8( KNSmlvCard21Name, "text/x-vcard" );
_LIT8( KNSmlvCard21Ver, "2.1" );
const CSmlDataStoreFormat& storeFormat = iCNSmlDummyDataProvider->DoStoreFormatL();
EUNIT_ASSERT_EQUALS( storeFormat.MimeFormatCount() ,1 );
EUNIT_ASSERT_EQUALS( storeFormat.MimeFormat(0).MimeType().DesC(), KNSmlvCard21Name() );
EUNIT_ASSERT_EQUALS( storeFormat.MimeFormat(0).MimeVersion().DesC(), KNSmlvCard21Ver() );
}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:10,代码来源:cnsmldummydataprovider_test.cpp
示例14: EUNIT_ASSERT_EQUALS
void UT_CMccJitterCalculator::UT_CMccJitterCalculator_StartObservingL()
{
// Test delete of inactive calculator
delete iCalculator;
iCalculator = NULL;
iCalculator = CMccJitterCalculator::NewL( *this );
// Jitter reports
iCalculator->iReportType = EMccJitterReport;
EUNIT_ASSERT_EQUALS( iCalculator->StartObserving(), KErrNone );
EUNIT_ASSERT_EQUALS( iCalculator->iJitterObsOn, ETrue );
// Packet loss reports
iCalculator->iReportType = EMccPacketLossReport;
EUNIT_ASSERT_EQUALS( iCalculator->StartObserving(), KErrNone );
EUNIT_ASSERT_EQUALS( iCalculator->iFrameLossObsOn, ETrue );
// All reports
iCalculator->iFrameLossObsOn = EFalse;
iCalculator->iJitterObsOn = EFalse;
iCalculator->iMediaQualityObservingStarted = EFalse;
iCalculator->iReportType = EMccQualityReportAll;
EUNIT_ASSERT_EQUALS( iCalculator->StartObserving(), KErrNone );
EUNIT_ASSERT_EQUALS( iCalculator->iJitterObsOn, ETrue );
EUNIT_ASSERT_EQUALS( iCalculator->iFrameLossObsOn, ETrue );
EUNIT_ASSERT_EQUALS( iCalculator->iMediaQualityObservingStarted, ETrue );
// Not supported reports
iCalculator->iReportType = 998;
EUNIT_ASSERT_EQUALS( iCalculator->StartObserving(), KErrArgument );
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:32,代码来源:UT_CMccJitterCalculator.cpp
示例15: InitializeL
void UT_CMccRtpDataSource::UT_CMccRtpDataSource_TestBaseClassL()
{
// Test some base class functions which are hard to test by other means
// Internal event to all clients (no users)
iSource->SendInternalRtpEventToAllClients(
iSource->iUsers, KMccRtpSourceUid, EMccInternalEventNone, KMccStreamError, 0, KErrGeneral );
// Users exist
InitializeL();
iSource->SendInternalRtpEventToAllClients(
iSource->iUsers, KMccRtpSourceUid, EMccInternalEventNone, KMccStreamError, 0, KErrGeneral );
EUNIT_ASSERT_EQUALS( iEventHandler->iLastEvent.iEventType, KMccStreamError );
// Secure events
iSource->SendSecureRtpEventToClient(
NULL, KMccRtpSourceUid, EMccInternalEventNone, KMccStreamPaused, 0 );
iSource->SendSecureRtpEventToClient(
iEventHandler, KMccRtpSourceUid, EMccInternalEventNone, KMccStreamPaused, 0 );
EUNIT_ASSERT_EQUALS( iEventHandler->iLastEvent.iEventType, KMccStreamPaused );
// SendJitterEventToClient()
iSource->SendJitterEventToClient( iEventHandler, KMccRtpSourceUid,
EMccInternalEventNone, KMccEventNone, 0, 0, 1,2,3,4,5,6 );
EUNIT_ASSERT_EQUALS( iEventHandler->iLastEvent.iEventType, KMccEventNone );
const TMccRtpEventDataExtended& rtpEvent =
(*reinterpret_cast<const TMccRtpEventDataExtendedPackage*>( &iEventHandler->iLastEvent.iEventData ))();
EUNIT_ASSERT_EQUALS( rtpEvent.iJitterEstimate, 1 );
EUNIT_ASSERT_EQUALS( rtpEvent.iPacketsReceived, 2 );
EUNIT_ASSERT_EQUALS( rtpEvent.iPrevTransTime, 3 );
EUNIT_ASSERT_EQUALS( rtpEvent.iTriggeredJitterLevel, 4 );
EUNIT_ASSERT_EQUALS( rtpEvent.iPacketLoss, 5 );
EUNIT_ASSERT_EQUALS( rtpEvent.iTriggeredPacketLoss, 6 );
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:35,代码来源:UT_CMccRtpDataSource.cpp
示例16: media
void UT_CMccRtpDataSource::UT_CMccRtpDataSource_SetSourceDataTypeCodeL()
{
TFourCC codec;
TMediaId media( KUidMediaTypeVideo ); // wrong media type
EUNIT_ASSERT_EQUALS( iSource->SetSourceDataTypeCode( codec, media ), KErrNone );
// Set the correct media type
TMediaId media2( KUidMediaTypeAudio );
EUNIT_ASSERT_EQUALS( iSource->SetSourceDataTypeCode( codec, media2 ), KErrNone );
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:11,代码来源:UT_CMccRtpDataSource.cpp
示例17: mediaId
void UT_CMccRtpDataSource::UT_CMccRtpDataSource_SourceDataTypeCodeL()
{
TMediaId mediaId( KUidMediaTypeVideo );
EUNIT_ASSERT_EQUALS( iSource->SourceDataTypeCode( mediaId ), TFourCC() );
iSource->SourceThreadLogoff();
TFourCC codec( ' ','A','M','R' );
TMediaId media2( KUidMediaTypeAudio );
iSource->SetSourceDataTypeCode( codec, media2 );
// The codecs SHOULD be equal
EUNIT_ASSERT_EQUALS( iSource->SourceDataTypeCode( media2 ), codec );
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:13,代码来源:UT_CMccRtpDataSource.cpp
示例18: percentage
void UT_CMccJitterCalculator::UT_CMccJitterCalculator_CountPacketLossPercentageL()
{
TInt percentage( 0 );
iCalculator->iHomeTime.HomeTime();
// Not active
iCalculator->JitterObserving();
iCalculator->iPrevFerValue = 0;
iCalculator->iStartingSeqNum = 80;
iCalculator->iCurrentSeqNum = 100;
// no packets lost
iCalculator->iPrevExpectedPackets = 20;
iCalculator->iReceivedPacketCounter = 20;
iCalculator->CountPacketLossPercentage();
EUNIT_ASSERT_EQUALS( iCalculator->iPrevFerValue, 0 );
EUNIT_ASSERT_EQUALS( iCalculator->iPrevExpectedPackets, 20 );
EUNIT_ASSERT_EQUALS( iCalculator->iPrevPacketsReceived, 20 );
// no packets lost, inorder
iCalculator->iCurrentSeqNum = 102;
iCalculator->iPrevExpectedPackets = 22;
iCalculator->CountPacketLossPercentage();
EUNIT_ASSERT_EQUALS( iCalculator->iPrevFerValue, 0 );
EUNIT_ASSERT_EQUALS( iCalculator->iPrevExpectedPackets, 22 );
EUNIT_ASSERT_EQUALS( iCalculator->iPrevPacketsReceived, 20 );
// packet lost - add FER by number of packets lost.
// 5 packets lost
iCalculator->iPrevFerValue = 0;
iCalculator->iStartingSeqNum = 80;
iCalculator->iCurrentSeqNum = 105;
iCalculator->iPrevExpectedPackets = 20;
iCalculator->iReceivedPacketCounter = 20;
percentage = iCalculator->CountPacketLossPercentage();
EUNIT_ASSERT_EQUALS( percentage, 1 );
EUNIT_ASSERT_EQUALS( iCalculator->iPrevFerValue, 7952 );
EUNIT_ASSERT_EQUALS( iCalculator->iPrevExpectedPackets, 25 );
EUNIT_ASSERT_EQUALS( iCalculator->iPrevPacketsReceived, 20 );
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:51,代码来源:UT_CMccJitterCalculator.cpp
示例19: mediaId
void UT_CG711PayloadFormatWrite::UT_CG711PayloadFormatWrite_SetSinkDataTypeCodeL( )
{
TFourCC fourcc;
TMediaId mediaId( KUidMediaTypeAudio, 1 );
TMediaId mediaIdVideo( KUidMediaTypeVideo, 1 );
if ( !iAlloc )
{
fourcc = iWrite->SinkDataTypeCode( mediaId );
EUNIT_ASSERT_EQUALS( iWrite->SetSinkDataTypeCode( fourcc, mediaId ), KErrNone );
EUNIT_ASSERT_EQUALS( iWrite->SetSinkDataTypeCode( fourcc, mediaIdVideo ), KErrNotSupported );
fourcc = iWrite->SinkDataTypeCode( mediaIdVideo );
EUNIT_ASSERT_EQUALS( iWrite->SetSinkDataTypeCode( fourcc, mediaId ), KErrNone );
EUNIT_ASSERT_EQUALS( iWrite->SetSinkDataTypeCode( fourcc, mediaIdVideo ), KErrNotSupported );
}
else
{
fourcc = iWrite->SinkDataTypeCode( mediaIdVideo );
EUNIT_ASSERT_EQUALS( iWrite->SetSinkDataTypeCode( fourcc, mediaIdVideo ), KErrNotSupported );
EUNIT_ASSERT_EQUALS( iWrite->SetSinkDataTypeCode( fourcc, mediaId ), KErrNone );
fourcc = iWrite->SinkDataTypeCode( mediaId );
EUNIT_ASSERT_EQUALS( iWrite->SetSinkDataTypeCode( fourcc, mediaId ), KErrNone );
EUNIT_ASSERT_EQUALS( iWrite->SetSinkDataTypeCode( fourcc, mediaIdVideo ), KErrNotSupported );
}
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:30,代码来源:UT_CG711PayloadFormatWrite.cpp
示例20: EUNIT_ASSERT_EQUALS
void UT_CMccRtpDataSource::UT_CMccRtpDataSource_TestSendEventL()
{
iSource->SourceThreadLogon( *iEventHandler );
// No target payload
iSource->SendStreamEventToClient( KMccStreamPaused, KErrNone, KMccPTNotDefined );
EUNIT_ASSERT_EQUALS( iEventHandler->iLastEvent.iEventType, KMccStreamPaused );
EUNIT_ASSERT_EQUALS( iEventHandler->iLastEvent.iEventNumData, 0 );
// Target payload
iSource->SendStreamEventToClient( KMccStreamResumed, KErrNone, 100 );
EUNIT_ASSERT_EQUALS( iEventHandler->iLastEvent.iEventType, KMccStreamResumed );
EUNIT_ASSERT_EQUALS( iEventHandler->iLastEvent.iEventNumData, KMccPayloadSpecificEvent );
EUNIT_ASSERT_EQUALS( iEventHandler->iLastEvent.iReserved, 100 );
// No event handler
iSource->iEventHandler = NULL;
iSource->SendStreamEventToClient( KMccStreamStopped, KErrNone, KMccPTNotDefined );
EUNIT_ASSERT_EQUALS( iEventHandler->iLastEvent.iEventType, KMccStreamResumed );
// Jitter event when no event handler
TMccRtpEventDataExtended eventData;
iSource->SendJitterEvent( eventData, KErrNone );
EUNIT_ASSERT_EQUALS( iEventHandler->iLastEvent.iEventType, KMccStreamResumed );
// Event handler exists
iSource->iEventHandler = iEventHandler;
iSource->SendJitterEvent( eventData, KErrNone );
EUNIT_ASSERT_EQUALS( iEventHandler->iLastEvent.iEventType, KMccMediaQualityStatus );
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:30,代码来源:UT_CMccRtpDataSource.cpp
注:本文中的EUNIT_ASSERT_EQUALS函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论