本文整理汇总了C++中EUNIT_ASSERT函数的典型用法代码示例。如果您正苦于以下问题:C++ EUNIT_ASSERT函数的具体用法?C++ EUNIT_ASSERT怎么用?C++ EUNIT_ASSERT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了EUNIT_ASSERT函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: EUNIT_ASSERT
void UT_CNATFWUNSAFMessage::TestAddAttributeL()
{
EUNIT_ASSERT(iMsg->iAttributes.Count() == 0);
iMsg->AddAttributeL(iAttr);
CNATFWUNSAFAttribute* attr = iAttr;
iAttr = NULL;
EUNIT_ASSERT(iMsg->iAttributes.Count() == 1);
//Pointers much match
EUNIT_ASSERT(iMsg->iAttributes[0] == attr);
}
示例2: CleanupClosePushL
void T_CSPSettingsEngine::T_CSPSettingsEngine_HasVoIPAndVmbxPropertyNameL( )
{
RPropertyNameArray names;
CleanupClosePushL( names );
EUNIT_ASSERT( !iCSPSettingsEngine->HasVoIPAndVmbxPropertyName( names ) );
names.AppendL( EPropertyUnknown );
names.AppendL( EPropertyVoIPSubServicePluginId );
EUNIT_ASSERT( iCSPSettingsEngine->HasVoIPAndVmbxPropertyName( names ) );
CleanupStack::PopAndDestroy( &names );
}
示例3: CleanupClosePushL
void UT_CCFContextManager::UT_CCFContextManager_DefineContextL2L( )
{
RThread thread;
CleanupClosePushL(thread);
TUid uid = TUid::Uid( 123 );
// define context 1
static _LIT_SECURITY_POLICY_PASS( alwaysPass );
EUNIT_ASSERT_NO_LEAVE (
iCFContextManagerInterface->DefineContextL( _L("testsource"),
_L("testtype"), alwaysPass, alwaysPass, this, uid ) );
// try to redefine
EUNIT_ASSERT_NO_LEAVE (
iCFContextManagerInterface->DefineContextL( _L("testsource"),
_L("testtype"), alwaysPass, alwaysPass, this, uid ) );
// try to redefine with another UID
TUid anotherUid = TUid::Uid( 345 );
EUNIT_ASSERT_LEAVE (
iCFContextManagerInterface->DefineContextL( _L("testsource"),
_L("testtype"), alwaysPass, alwaysPass, this, anotherUid ) );
// check that we get the subscribers notification
CCFContextSubscription* subscription = CCFContextSubscription::NewLC();
subscription->SetContextSourceL(_L("testsource"));
subscription->SetContextTypeL(_L("testtype"));
CleanupStack::Pop( subscription );
iSubscribersCalled = EFalse;
iExpectedSubscribersSource.Copy(_L("testsource"));
iExpectedSubscribersType.Copy(_L("testtype"));
// make subscription
EUNIT_ASSERT_NO_LEAVE (
iCFContextManagerInterface->SubscribeContextL(subscription,
this, thread) );
EUNIT_ASSERT( iSubscribersCalled );
iSubscribersCalled = EFalse;
iNoSubscribersCalled = EFalse;
EUNIT_ASSERT_NO_LEAVE (
iCFContextManagerInterface->RemoveSubscription( *subscription,
*this) );
EUNIT_ASSERT( iNoSubscribersCalled );
CleanupStack::PopAndDestroy( &thread );
}
示例4: EUNIT_ASSERT
void UT_CMceStateError::UT_CMceStateError_ExitLL()
{
iSipSession->iBody = CMceComSession::NewL( CMceComSession::EOutSession );
EUNIT_ASSERT ( iSipSession->CurrentState().Id() == KMceStateError );
TMceStateTransitionEvent event1( *iSipSession, EMceMediaError );
iState->ExitL( event1 );
EUNIT_ASSERT ( iSipSession->CurrentState().Id() == KMceStateError );
}
示例5: EUNIT_ASSERT
void UT_CNATBindingCRLFRefresher::TestSetRefreshL()
{
EUNIT_ASSERT(!iRefresher->IsRefreshed());
iRefresher->SetRefresh(ETrue);
EUNIT_ASSERT(iRefresher->IsRefreshed());
iRefresher->SetRefresh(ETrue);
EUNIT_ASSERT(iRefresher->IsRefreshed());
iRefresher->SetRefresh(EFalse);
EUNIT_ASSERT(!iRefresher->IsRefreshed());
iRefresher->SetRefresh(EFalse);
EUNIT_ASSERT(!iRefresher->IsRefreshed());
}
示例6: EUNIT_ASSERT
// ----------------------------------------------------------------------------
// CMceOutSessionTest::RemainTestL
// ----------------------------------------------------------------------------
//
void CMceSecureOutSessionTest::RemainTestL()
{
// inside dialog
MCE_CREATE_PROFILE;
EUNIT_ASSERT( iStorage->iSessionId == 0 );
CMceEvent* event = CMceOutEvent::NewL( *iManager, *profile, KMceRecipient, KMceEventHeader, 1000 );
CleanupStack::PushL( event );
CMceRefer* refer = CMceOutRefer::NewL( *iManager, *profile, KMceRecipient, KMceReferTo, CMceRefer::EMultipleRefer );
CleanupStack::PushL( refer );
// with event
CMceSecureOutSession* outSession1= CMceSecureOutSession::NewL( *event );
CleanupStack::PushL( outSession1 );
EUNIT_ASSERT( outSession1->Profile() == event->ProfileId() );
EUNIT_ASSERT( outSession1->DialogId() == event->DialogId() );
EUNIT_ASSERT( outSession1->Recipient() == event->Recipient() );
EUNIT_ASSERT( outSession1->Originator() == event->Originator() );
// with refer
CMceSecureOutSession* outSession2= CMceSecureOutSession::NewL( *refer );
CleanupStack::PushL( outSession2 );
EUNIT_ASSERT( outSession2->Profile() == refer->ProfileId() );
EUNIT_ASSERT( outSession2->DialogId() == refer->DialogId() );
EUNIT_ASSERT( outSession2->Recipient() == refer->Recipient() );
EUNIT_ASSERT( outSession2->Originator() == refer->Originator() );
// leave with not assigned dialog id
TUint32 id = refer->DialogId();
refer->iDialogId = KMceNotAssigned;
CMceOutSession* outSession3 = NULL;
TRAPD( err, outSession3 = CMceOutSession::NewL( *refer ) );
MCE_TEST_HANDLE_ALLOC_FAILURE( err )
EUNIT_ASSERT_EQUALS( err, KErrArgument );
EUNIT_ASSERT( !outSession3 );
// set refer id back
refer->iDialogId = id;
// clean
CleanupStack::Pop( outSession2 );
CleanupStack::Pop( outSession1 );
CleanupStack::Pop( refer );
CleanupStack::Pop( event );
event->iState = CMceEvent::EActive;
MCE_TEST_DELETE( event );
MCE_TEST_DELETE( refer );
MCE_TEST_DELETE( outSession1 );
MCE_TEST_DELETE( outSession2 );
MCE_DELETE_PROFILE;
}
示例7: EUNIT_ASSERT
void UT_CG711PayloadFormatWrite::UT_CG711PayloadFormatWrite_ConfigurePayloadFormatLL( )
{
if ( iAlloc )
{
EUNIT_ASSERT( ETrue );
}
else
{
TMccCodecInfo codec;
codec.iAlgoUsed = ENoAlgoUsed;
codec.iBitrate = 6400;
codec.iCNFrameSize = 0;
codec.iCodecMode = 3;
codec.iEnableDTX = 1;
codec.iFourCC = 31313747;
codec.iFrameSize = 0;
codec.iHwFrameTime = 20;
codec.iMaxPtime = 200;
codec.iPayloadType = 8;
codec.iPtime = 20;
codec.iRedundancyCount = 0;
codec.iRedundantPayload = 0;
codec.iComfortNoiseGenerationPt = KPayloadTypeUndefined;
TMccCodecInfoBuffer buffer( codec );
EUNIT_ASSERT_NO_LEAVE( iWrite->ConfigurePayloadFormatL( buffer, *iRtpMediaClock ) );
// test updating of values
codec.iIsUpdate = ETrue;
codec.iPtime = 40;
codec.iPayloadType = 0;
codec.iComfortNoiseGenerationPt = 13;
buffer = codec;
iWrite->ConfigurePayloadFormatL( buffer, *iRtpMediaClock );
EUNIT_ASSERT( iWrite->iCInfo.iPtime == 40 );
EUNIT_ASSERT( iWrite->iCInfo.iPayloadType == 0 );
EUNIT_ASSERT( iWrite->iCInfo.iComfortNoiseGenerationPt == 13 );
// test redundancy payload format usage
codec.iIsUpdate = EFalse;
codec.iAlgoUsed = EGenRedUsed;
codec.iRedundancyCount = 1;
buffer = codec;
CMccRtpDataSink* rtpDataSinkStub = static_cast<CMccRtpDataSink*>(MDataSink::NewSinkL( KRtpDataSink, KNullDesC8 ));
CleanupStack::PushL( rtpDataSinkStub );
CMccRedPayloadWrite* redEncoder = CMccRedPayloadWrite::NewL( rtpDataSinkStub );
CleanupStack::PushL( redEncoder );
CG711PayloadFormatWrite* write = CG711PayloadFormatWrite::NewL( redEncoder );
CleanupStack::PushL( write );
EUNIT_ASSERT_NO_LEAVE( write->ConfigurePayloadFormatL( buffer, *iRtpMediaClock ) );
CleanupStack::PopAndDestroy( 3 );
}
}
示例8: EUNIT_ASSERT
void T_CSPSettingsEngine::T_CSPSettingsEngine_IsFeatureSupportedLL( )
{
EUNIT_ASSERT( !iCSPSettingsEngine->IsFeatureSupportedL( ESupportInternetCallFeature, EFalse ) );
EUNIT_ASSERT_LEAVE( iCSPSettingsEngine->IsFeatureSupportedL( ESupportInternetCallFeature, ETrue ) );
EUNIT_ASSERT( !iCSPSettingsEngine->IsFeatureSupportedL( ESupportCallOutFeature, EFalse ) );
EUNIT_ASSERT_LEAVE( iCSPSettingsEngine->IsFeatureSupportedL( ESupportCallOutFeature, ETrue ) );
EUNIT_ASSERT( !iCSPSettingsEngine->IsFeatureSupportedL( ESupportVoIPSSFeature, EFalse ) );
EUNIT_ASSERT_LEAVE( iCSPSettingsEngine->IsFeatureSupportedL( ESupportVoIPSSFeature, ETrue ) );
EUNIT_ASSERT( iCSPSettingsEngine->IsFeatureSupportedL( ESupportVoIPFeature, EFalse ) );
}
示例9: EUNIT_ASSERT
void UT_CNSPPluginStub::UT_CNSPPluginStub_NewSessionLL( )
{
EUNIT_ASSERT( iInitializedReceived == 0 );
iNatSessionId = iPlugin->NewSessionL(*this, 6, _L8("stun.nokia.com"), KProtocolInetUdp);
if ( iPlugin->iRequestType != CNSPPluginStub::EResolve )
{
CActiveScheduler::Start();
}
EUNIT_ASSERT( iNatSessionId == iPlugin->iSessionId );
EUNIT_ASSERT( iPlugin->iReservStatus == 0 );
EUNIT_ASSERT( iPlugin->iReservStatus == KDefaultReserveStatus );
EUNIT_ASSERT( iPlugin->iDelay == KDefaultDelay );
}
示例10: _L
void T_CSPSettings::T_CSPSettings_DeleteEntryLL( )
{
CSPEntry* entry = CSPEntry::NewLC();
User::LeaveIfError( entry->SetServiceName( _L("Nimi") ) );
TInt id = entry->GetServiceId();
EUNIT_ASSERT( KErrNotFound == iCSPSettings->DeleteEntryL( id ) );
iCSPSettings->AddEntryL( *entry );
id = entry->GetServiceId();
EUNIT_ASSERT( KErrNone == iCSPSettings->DeleteEntryL( id ) );
CleanupStack::PopAndDestroy( entry );
}
示例11: EUNIT_ASSERT_SPECIFIC_LEAVE
void UT_CMccResourceItem::UT_CMccResourceItem_GetMultiplexerLL( )
{
CMccMultiplexer* multiplexer = NULL;
EUNIT_ASSERT_SPECIFIC_LEAVE( multiplexer = iItem->GetMultiplexerL(), KErrNotReady );
EUNIT_ASSERT( multiplexer == NULL );
delete iItem;
iItem = NULL;
iItem = CMccResourceItem::NewL( 0, NULL, iSourceStub, 1, ETrue );
EUNIT_ASSERT_NO_LEAVE(multiplexer = iItem->GetMultiplexerL());
EUNIT_ASSERT( multiplexer != NULL );
}
示例12: param
void UT_CMccResourceItem::UT_CMccResourceItem_UserMatchL( )
{
TMccResourceParams param(0,0,0,0,EFalse,0);
TMccResourceParams param2(0,0,0,0,EFalse,0);
EUNIT_ASSERT(iItem->UserMatch(param, param2));
param.iStreamId = 2;
param2.iStreamId = 3;
EUNIT_ASSERT(!iItem->UserMatch(param, param2));
}
示例13: EUNIT_ASSERT
void MT_MProEngAlertToneSeeker::FetchAlertToneListTestL()
{
iSeeker->FetchAlertToneListL( *iObserver );
MT_CSchedulerUtility::InstanceL()->Start();
EUNIT_ASSERT( iObserver->iNotified );
EUNIT_ASSERT( iObserver->iToneList );
TInt count( iObserver->iToneList->MdcaCount() );
EUNIT_PRINT( _L( "*** Tones: ***" ) );
for( TInt i(0); i<count; ++i )
{
TPtrC tone( iObserver->iToneList->MdcaPoint( i ) );
EUNIT_PRINT( _L( "%S" ), &tone );
}
}
示例14: isSilent
void T_MProfile::IsSilentTestL()
{
__UHEAP_MARK;
TBool isSilent( iProfile->IsSilent() );
__UHEAP_MARKEND;
if( iActiveId == 1 || iActiveId == 4 )
{
EUNIT_ASSERT( isSilent );
}
else
{
EUNIT_ASSERT( !isSilent );
}
}
示例15: RMessage2
void UT_CMceCsReceiverBase::UT_CMceCsReceiverBase_CancelClientReceiveLL()
{
iReceiver->ClientReadyToReceiveL( RMessage2() );
EUNIT_ASSERT( iReceiver->iClientReadyToReceive );
iReceiver->CancelClientReceiveL();
EUNIT_ASSERT( !iReceiver->iClientReadyToReceive );
iReceiver->iClientReadyToReceive = EFalse;
EUNIT_ASSERT_LEAVE( iReceiver->CancelClientReceiveL() );
EUNIT_ASSERT( !iReceiver->iClientReadyToReceive );
}