这篇教程C++ ERR_PRINTF2函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中ERR_PRINTF2函数的典型用法代码示例。如果您正苦于以下问题:C++ ERR_PRINTF2函数的具体用法?C++ ERR_PRINTF2怎么用?C++ ERR_PRINTF2使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了ERR_PRINTF2函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: ERR_PRINTF1void CTe_locsrvSuiteStepBase::CheckExpectedResult(TInt aResult, TInt aExpectedResult, const TDesC& aLabel) { if (aResult!=aExpectedResult) { ERR_PRINTF1(aLabel); ERR_PRINTF2(KValueReturned, aResult); ERR_PRINTF2(KValueExpected, aExpectedResult); SetTestStepResult(EFail); } }
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:10,
示例2: SetTestPathTVerdict CSysUtilsGetLangSWVersionNoNewLinesStep::doTestStepL() { TInt err = SetTestPath(ETrue); if( err != KErrNone ) { ERR_PRINTF2(_L("Could not turn test path on. Error = %d"), err); SetTestStepResult(EAbort); return TestStepResult(); } INFO_PRINTF1(_L("Test path turned on.")); err = DeletePSProperties(); if( err != KErrNone ) { ERR_PRINTF2(_L("Could not delete P&S properties. Error = %d"), err); SetTestStepResult(EAbort); return TestStepResult(); } INFO_PRINTF1(_L("Deleted P&S properties successfully.")); _LIT16(KDummy,"xxxxx"); TBuf16<KSysUtilVersionTextLength> version; version.Insert(0,KDummy); err = SysUtil::GetLangSWVersion( version ); if ( err == KErrNone) { _LIT(KLangSw, "LangSW"); TPtrC16 line; TESTL( GetStringFromConfig(ConfigSection(), KLangSw, line) ); TBuf16<KSysUtilVersionTextLength> testBuf(line); if (version.Compare(testBuf)==0) { INFO_PRINTF1(_L("Got version ")); INFO_PRINTF1(version); } else { ERR_PRINTF1(_L("Version not correct")); INFO_PRINTF1(version); SetTestStepResult(EFail); } } else { ERR_PRINTF2(_L("Error code = %d"), err); SetTestStepResult(EFail); } return TestStepResult(); }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:54,
示例3: INFO_PRINTF1/** * * DoTestStepL * @result TVerdict * */TVerdict CTestStepSDevSoundPlayDTMFTones::DoTestStepL() { INFO_PRINTF1(_L("Testing DTMF Playback")); TPtrC dtmfString = (_L("0123456789,abcdef,*#")); //Initialize TVerdict initializeOK = InitializeDevSound(EMMFStateTonePlaying); if (initializeOK != EPass) { return EInconclusive; } iMMFDevSound->SetVolume(iMMFDevSound->MaxVolume()); iExpectedValue = KErrUnderflow; iCallbackError = KErrNone; iCallbackArray.Reset(); // Set request active iAL->InitialiseActiveListener(); INFO_PRINTF1(_L("Playing DTMF String")); TRAPD(err, iMMFDevSound->PlayDTMFStringL(dtmfString)); // Start the active scheduler and catch the callback CActiveScheduler::Start(); if (err) { WARN_PRINTF2 (_L("DevSound PlayDTMFStringL left with error = %d"), err); return EInconclusive; } else { if (iCallbackError != iExpectedValue) { ERR_PRINTF3 (_L("DevSound ToneFinished returned %d, expected %d"), iCallbackError, iExpectedValue); return EFail; } if (iCallbackArray[EToneFinished] != 1) { ERR_PRINTF2 (_L("DevSound ToneFinished was called %d times, expected 1"), iCallbackArray[EToneFinished]); return EFail; } TInt total = 0; for (TInt i = EInitComplete; i < EDeviceMsg; i++) { total += iCallbackArray[i]; } if (total > 1) { ERR_PRINTF2 (_L("DevSound called %d callbacks, expected 1"), total); return EFail; } } return EPass; }
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:60,
示例4: __UHEAP_SETFAILTVerdict COomTestStep::ImplOomTestL()/** Runs the test step under OOM Conditions checking that each heap allocation is fail safe. */ { // Pre and Post test heap cell allocation counts TInt cellCountAfter = 0; TInt cellCountBefore = 0; // The loop tests each heap allocation under out of memory conditions to determine whether // the test framework cleans up correctly without leaking memory. // // The 'for' loop terminates as soon as any of the following events occur: // a) The pre and post heap cell counts mismatch signalling a memory leakage // b) Any leave with an error code other than 'KErrNoMemory' // c) All heap allocations have been tested and the test returns 'KErrNone' for (TInt testCount = 0; ; ++testCount) { __UHEAP_MARK; __UHEAP_SETFAIL(RHeap::EDeterministic, testCount+1); cellCountBefore = User::CountAllocCells(); TRAPD(err, ImplTestStepL()); cellCountAfter = User::CountAllocCells(); __UHEAP_MARKEND; INFO_PRINTF3(_L("OOM Test %d: Status = %d"),testCount,err); if (err == KErrNone) { INFO_PRINTF1(_L("OOM Test Finished")); break; } else if(err == KErrNoMemory) { if (cellCountBefore != cellCountAfter) { ERR_PRINTF2(_L("OOM Test Result: Failed - Memory leakage on iteration %d"), testCount); ERR_PRINTF2(_L("Pre-Test Heap Cell Count: %d"), cellCountBefore); ERR_PRINTF2(_L("Post-Test Heap Cell Count: %d"), cellCountAfter); SetTestStepResult(EFail); break; } } else { User::Leave(err); break; } } return TestStepResult(); }
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:54,
示例5: InitializeDevSound/** * * DigitalPlayback * @param aNumSamples * @param aFilename * @param aDataType * @result TVerdict * */ TVerdict CTestStepSDevSoundPlayEOFPCM16::DigitalPlayback(TInt aNumSamples, TDesC& aFilename, TFourCC& aDataType) { TVerdict initializeOK = InitializeDevSound(aDataType, EMMFStatePlaying); if (initializeOK != EPass) { return EInconclusive; } SetVolume(iMMFDevSound->MaxVolume()); //Get a buffer to fill initializeOK = PlayInit(); if (initializeOK != EPass) { return EInconclusive; } TInt error = iFs.Connect(); if (error != KErrNone) { ERR_PRINTF2 (_L("Could not connect to Filesystem. Error is %d"), error); return EInconclusive; } TInt err = iFile.Open(iFs, aFilename, EFileRead); if (err != KErrNone) { ERR_PRINTF2 (_L("Could not open input file. Error is %d"), err); return EInconclusive; } TInt bufferCount = 0; if (aNumSamples < 0) {// Play to EOF while (initializeOK == KErrNone && iCallbackError == KErrNone) { //read sizeof buffer from file CMMFDataBuffer* buffer = STATIC_CAST (CMMFDataBuffer*, iBuffer); iFile.Read(buffer->Data()); if (buffer->Data().Length()!= buffer->RequestSize()) { INFO_PRINTF3(_L("Data length copied from file = %d. Expected %d. Must be EOF"), buffer->Data().Length(), buffer->RequestSize()); iBuffer->SetLastBuffer(ETrue); } //DevSound Play initializeOK = PlayData(); bufferCount ++; } } else { while (bufferCount < aNumSamples && initializeOK == KErrNone && iCallbackError == KErrNone)
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:62,
示例6: ERR_PRINTF2// Perform some random value checks////TVerdict CGpsUtcModelFinalCheckAndCleanupStep::doTestStepL()/** * @return - TVerdict code * Override of base class pure virtual * Our implementation only gets called if the base class doTestStepPreambleL() did * not leave. That being the case, the current test result value will be EPass. */ { // Check that all the fieds exists and their values are correct TUEPositioningGpsUtcModel::TFieldId* fieldIdPtr; TUint value; // From EA1 to EDeltaLSF there are 8 field ids // for (TUint ii = 0; ii < 8; ii++) { fieldIdPtr = reinterpret_cast<TUEPositioningGpsUtcModel::TFieldId*>(&ii); if(!iGpsUtcModelReader.FieldExists(*fieldIdPtr)) { ERR_PRINTF2(_L("Missing field number %D ."),ii); SetTestStepResult(EFail); } else { iGpsUtcModelReader.GetField(*fieldIdPtr,value); if(value != (ii+1)) { ERR_PRINTF2(_L("Wrong value in field number %D ."),ii); SetTestStepResult(EFail); } else { //Clear this field from the builder and get the data // again back in the reader. // iGpsUtcModelBuilder.ClearField(*fieldIdPtr); iGpsUtcModelReader.DataBuffer() = iGpsUtcModelBuilder.DataBuffer(); // Check that this field no longer exists // if(iGpsUtcModelReader.FieldExists(*fieldIdPtr)) { ERR_PRINTF2(_L("Field number %D was cleared but still exists."),ii); SetTestStepResult(EFail); } } } } return TestStepResult(); }
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:56,
示例7: INFO_PRINTF1/** * Verifies that the downloaded file is not corrupted by using a previously calculated checksum. * @param aSection - The section in config file to look for the Data Verify Type, the file to verify and the checksum. * @return error - Error code. KErrNone if checksum is equal. */void CT_DataVerify::DoCmdVerifyData(const TTEFSectionName& aSection) { INFO_PRINTF1(_L("*START* CT_TransferData::DoCmdVerifyData")); TBool dataOk =ETrue; TPtrC type; if(!GetStringFromConfig(aSection, KDataVerifyType, type )) { ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KDataVerifyType); SetBlockResult(EFail); dataOk = EFalse; } TPtrC filename; if(!GetStringFromConfig(aSection, KDataVerifyFile, filename )) { ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KDataVerifyFile); SetBlockResult(EFail); dataOk = EFalse; } TPtrC checksumParameter; if(!GetStringFromConfig(aSection, KChecksum, checksumParameter )) { ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KChecksum); SetBlockResult(EFail); dataOk = EFalse; } if(dataOk) { TBuf8<DataVerify::KMD5Size> checksum; checksum.Append(checksumParameter); if (type == KMD5Type) { INFO_PRINTF1(_L("MD5 selected")); TRAPD(error, VerifyChecksumL(checksum, filename)); if (error == KErrNone) { INFO_PRINTF1(_L("Data verify succeeded")); } else { ERR_PRINTF2(_L("VerifyData failed [%d]"), error); SetError(error); } } } INFO_PRINTF1(_L("*END* CT_TransferData::DoCmdVerifyData")); }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:57,
示例8: INFO_PRINTF1//== Mobile Line functionsvoid CT_RMobilePhoneData::DoCmdOpen(const TDesC& aSection) { INFO_PRINTF1(_L("*START*CT_RMobilePhoneData::DoCmdOpen")); // Check that first phone is available and log phone name. RTelServer::TPhoneInfo info; // Reading phone info for the first available phone TInt error(0); TBool dataOk = ETrue; TInt parPhone = 0; if ( !GetIntFromConfig(aSection, KPhone(), parPhone) ) { ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KPhone); SetBlockResult(EFail); dataOk = EFalse; } TPtrC telServerName; if ( !GetStringFromConfig(aSection, KTelServerKey(), telServerName) ) { ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KTelServerKey); SetBlockResult(EFail); dataOk = EFalse; } if ( dataOk ) { RTelServer* telServerObject = static_cast<RTelServer*>(GetDataObjectL(telServerName)); INFO_PRINTF1(_L("Check if phone info was found.")); error = telServerObject->GetPhoneInfo(parPhone, info); if (error != KErrNone) { ERR_PRINTF2(_L("Failed to read phone info for phone KFirstPhone with error %d"), error); SetError(error); } else { // Connect to RMobilePhone interface. INFO_PRINTF1(_L("Opening connection to phone")); error = iMobilePhone->Open(*telServerObject, info.iName); if (error != KErrNone) { ERR_PRINTF2(_L("Connection to phone failed with error %d"), error); SetError(error); } else { INFO_PRINTF1(_L("Opening connection to phone sucessfull")); } } } INFO_PRINTF1(_L("*END*CT_RMobilePhoneData::DoCmdOpen")); }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:51,
示例9: ERR_PRINTF2void CCmdLineTestStep::GetCmdLineL() { TPtrC data; if (!GetStringFromConfig(ConfigSection(), KConversionCmd, data)) { ERR_PRINTF2(KMissingKey, &KConversionCmd); SetTestStepResult(EFail); User::Leave(KErrCorrupt); } iCmdLine.Set(data); TLex lex(data); TBool pass = ETrue; // Skip "-o" _LIT(KMinusOh, "-o"); if (lex.NextToken().Compare(KMinusOh) != 0) { pass = EFalse; } else { iOutFileName.Set(lex.NextToken()); iInFileName.Set(lex.NextToken()); if (iInFileName.Length() == 0) { pass = EFalse; } } if (!pass) { ERR_PRINTF3(KCorruptEntry, &KConversionCmd, &data); SetTestStepResult(EFail); User::Leave(KErrCorrupt); } if (!GetStringFromConfig(ConfigSection(), KExpectedResult, data)) { ERR_PRINTF2(KMissingKey, &KExpectedResult); SetTestStepResult(EFail); User::Leave(KErrCorrupt); } else { iExpectPass = (data == Kpass); } }
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:49,
示例10: ERR_PRINTF1/**RHostResolver::Open()*/void CT_InquirySockAddrData::DoCmdOpenHostResolver(const TDesC& aSection) { RSocketServ sockServ; TPtrC bluetoothSocketName; if(GetStringFromConfig(aSection, KBTSocket(), bluetoothSocketName)) { CT_BluetoothSocketNotifier* bluetoothSocketData=static_cast<CT_BluetoothSocketNotifier*>(GetDataObjectL(bluetoothSocketName)); if ( bluetoothSocketData!=NULL ) { sockServ = bluetoothSocketData->iSocketServer; } else { ERR_PRINTF1(_L("CT_CBluetoothSocketDataPersistentObject is NULL")); SetBlockResult(EFail); } } // Find protocol from socket TProtocolDesc protocolDesc; TInt err=sockServ.FindProtocol(_L("BTLinkManager"), protocolDesc); if ( err!=KErrNone ) { ERR_PRINTF2(_L("iSockServ.FindProtocol(aProtocolName, protocolDesc) = %d"), err); SetBlockResult(EFail); } if ( protocolDesc.iAddrFamily != KBTAddrFamily ) { ERR_PRINTF1(_L("Wrong iAddrFamily")); SetBlockResult(EFail); } INFO_PRINTF1(_L("Close a RHostResolver first...")); iHostResolver.Close(); // Open host resolver INFO_PRINTF1(_L("Create and initialise an RHostResolver")); err=iHostResolver.Open(sockServ, protocolDesc.iAddrFamily, protocolDesc.iProtocol); if ( err!=KErrNone ) { ERR_PRINTF2(_L("iHostResolver.Open(iSockServ, protocolDesc.iAddrFamily, protocolDesc.iProtocol) = %d"), err); SetError(err); } else { iHostResolverOpen = ETrue; INFO_PRINTF1(_L("Create and initialise an RHostResolver Completed...")); } }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:52,
示例11: INFO_PRINTF1void RA3FDevSoundTestBase::ToneFinished(TInt aError) { INFO_PRINTF1(_L("========== DevSound ToneFinished() callback ==========")); if (aError == KErrUnderflow) { INFO_PRINTF2(_L("DevSound called CMMFDevSound::ToneFinished with error = %d as expected"), aError); StopTest(aError,EPass); } else { ERR_PRINTF2(_L("DevSound called CMMFDevSound::ToneFinished with error = %d"), aError); ERR_PRINTF2(_L("Expected error = %d"), KErrUnderflow); StopTest(aError); } }
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:15,
示例12: INFO_PRINTF2void CT_DataSdpAgent::AttributeRequestComplete(TSdpServRecordHandle aHandle, TInt aError) { INFO_PRINTF2(_L("MSdpAttributeValueVisitor::AttributeRequestComplete Call: aHandle = %d"),aHandle); DecOutstanding(); if ( aHandle!=iSSRHandle) { ERR_PRINTF2(_L("Service record handle not as expected: expected = %d"), iSSRHandle); SetAsyncError(iAttrReqIndex, KErrGeneral); } if ( aError!=KErrNone) { ERR_PRINTF2(_L("AttributeRequestComplete Call failed: aError = %d"),aError); SetAsyncError(iAttrReqIndex, aError); } }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:15,
示例13: tkey/** * @return - nothing * Check repository settings as defined in the config file. For example, * we might expect 37 strings in the repository. Their keys will be * 'StringKey0' through 'StringKey36'. We'll expect to see hex values for * all of these names (or we will LEAVE). Those keys will be expected * to exist in the repository and have values 'StringVal0' through 'StringVal36' * (or whatever). */void CRepositoryCheckStep::CheckRepositoryStringSettings(CRepository *arepository, TInt ancheck) { // Careful if the prefix here changes, we don't want to // blow this buffer. Also note the 'Delete' at the end of the loop. TBuf<REPCHECKCREATE_KEYBUFLEN> tkey(KStringKeyPrefix); TBuf<REPCHECKCREATE_VALBUFLEN> tval(KStringValPrefix); TInt keyslen = tkey.Length(); TInt valslen = tval.Length(); for( TInt count=0 ; count < ancheck ; count++ ) { tkey.AppendNum(count); // e.g "StringKey21" tval.AppendNum(count); // e.g "StringVal47" TInt r=0; TInt key; TInt bRet = GetHexFromConfig(ConfigSection(), tkey, key ); if(bRet != 1) { ERR_PRINTF2(_L("Failed to get key%d"), count ); SetTestStepResult(EFail); } TBuf<REPCHECKCREATE_MAXSTRINGLEN> expectedbuf; TPtrC expected(expectedbuf); bRet = GetStringFromConfig(ConfigSection(), tval, expected ); TBuf<REPCHECKCREATE_MAXSTRINGLEN> sval; r = arepository->Get( key, sval ); if(r!=KErrNone) { INFO_PRINTF1(HTML_RED); ERR_PRINTF2(_L("Repository doesn't have StringKey 0x%x"), key ); INFO_PRINTF1(HTML_RED_OFF); SetTestStepResult(EFail); } else if(sval!=expected) { INFO_PRINTF1(HTML_RED); ERR_PRINTF4(_L("String match failure, key 0x%x, got %S, expected %S"), key, &sval, &expected); INFO_PRINTF1(HTML_RED_OFF); SetTestStepResult(EFail); } // Restore the key and value names (i.e strip the digits from the end) tkey.Delete(keyslen, REPCHECKCREATE_KEYBUFLEN); tval.Delete(valslen, REPCHECKCREATE_VALBUFLEN); } // Should we return something? return; }
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:57,
示例14: INFO_PRINTF1void CT_DataWindowGc::DoCmdBitBltL(const TDesC& aCommand, const TDesC& aSection, const TInt aAsyncErrorIndex) { TBool dataOk=ETrue; CWsBitmap* wsBitmap=NULL; if ( !CT_GraphicsUtil::GetWsBitmapL(*this, aSection, KFldWsBitmap, wsBitmap) ) { CT_DataBitmapContext::DoCommandL(aCommand, aSection, aAsyncErrorIndex); } else { TPoint point; if ( GetPointFromConfig(aSection, KFldPoint, point) ) { if ( dataOk ) { // Execute command and log parameters INFO_PRINTF1(_L("execute BitBlt(TPoint, CWsBitmap*)")); iWindowGc->BitBlt(point, wsBitmap); } } else { TPoint destination; if ( !GetPointFromConfig(aSection, KFldDestination, destination) ) { dataOk=EFalse; ERR_PRINTF2(KLogMissingParameter, &KFldDestination()); SetBlockResult(EFail); } TRect source; if ( !GetRectFromConfig(aSection, KFldSource, source) ) { dataOk=EFalse; ERR_PRINTF2(KLogMissingParameter, &KFldSource()); SetBlockResult(EFail); } if ( dataOk ) { // Execute command and log parameters INFO_PRINTF1(_L("execute BitBlt(TRect, CWsBitmap*, TRect)")); iWindowGc->BitBlt(destination, wsBitmap, source); } } } }
开发者ID:fedor4ever,项目名称:default,代码行数:48,
示例15: INFO_PRINTF1void CT_RMobileCallData::DoCmdAnswerIncomingCallPost(const TTEFFunction& aSection, const TInt aAsyncErrorIndex) { INFO_PRINTF1(_L("*START*CT_RMobileCallData::DoCmdAnswerIncomingCallPost")); TInt callNameParameter; if ( !GetIntFromConfig(aSection, KCallName, callNameParameter)) { ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KCallName); SetBlockResult(EFail); } else { INFO_PRINTF1(_L("Getting mobile call")); TRAPD( error, iMobileCall = GetMobileCallL(callNameParameter) ); if(error != KErrNone) { ERR_PRINTF2(_L("GetMobileCallL left when trying to obtain the MobileCall with error %d"), error); SetBlockResult(EFail); } else { INFO_PRINTF1(_L("Read call status to check if the other party hanged up.")); RCall::TStatus callStatus; error = iMobileCall->GetStatus(callStatus); if ( error != KErrNone) { ERR_PRINTF2(_L("Failed to read mobile call's status [%d]"), error); SetError(error); } else { // Normal status of the connection is EStatusConnected. if ( callStatus == RCall::EStatusConnected) { INFO_PRINTF1(_L("Mobile call is connected.")); } else { INFO_PRINTF1(_L("Mobile call was disconnected, hanging up.")); iMobileCall->HangUp (iActiveCallback->iStatus); iActiveCallback->Activate (aAsyncErrorIndex); IncOutstanding (); } } } } INFO_PRINTF1(_L("*END*CT_RMobileCallData::DoCmdAnswerIncomingCallPost")); }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:48,
示例16: INFO_PRINTF1/** Virtual DoCancel - Request to cancel the asynchronous command @internalComponent @see - MTPActiveCallback @param aActive Active Object that DoCancel has been called on @pre - N/A @post - N/A @leave system wide error code */ void CT_DataRSocketServ::DoCancel(CActive* aActive, TInt aAsyncErrorIndex) { TBool straySignal = EFalse; if( aActive==iActiveStartProtocol ) { INFO_PRINTF1(_L("DoCancel StartProtocol called")); } else if( aActive==iActiveStopProtocol ) { INFO_PRINTF1(_L("DoCancel StopProtocol called")); } else if( aActive==iActiveSetExclusiveMode ) { INFO_PRINTF1(_L("DoCancel SetExclusiveMode called")); } else { ERR_PRINTF1(_L("Stray DoCancel signal")); SetBlockResult(EFail); straySignal = ETrue; } if( !straySignal ) { TInt err = aActive->iStatus.Int(); if ( err != KErrNone ) { ERR_PRINTF2(_L("DoCancel Error %d"), err); SetAsyncError(aAsyncErrorIndex, err); } DecOutstanding(); } }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:43,
示例17: CreateDataLvoid CTestBlockController::CreateObjectL(TTEFBlockItem& aCommand) { // Retrieve the object name from the ini file TPtrC name; if( GetStringFromConfig(aCommand.iSection, KName, name) && 0 != aCommand.iSection.Compare(KTEFNull) ) { // Create the wrapper CDataWrapper* data = CreateDataL(aCommand.iObjectType); if( NULL != data) { CleanupStack::PushL(data); data->SetTestBlockController(this); data->SetDataDictionary(&iDataDictionary); data->InitialiseL(); // Add it to the dictionary with the lookup name provided iDataDictionary.AddDataL(name, data); CleanupStack::Pop(data); } else { aCommand.iError = KErrNotFound; ERR_PRINTF2( KErrWrapperCreate, &name ); } } else { ERR_PRINTF1(KErrNoName); aCommand.iError = KErrNotFound; } }
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:31,
示例18: DestroyDatavoid CT_DataAnimDll::DoCmdnewL(const TDesC& aSection) { DestroyData(); // Get test data for command input parameter(s) TPtrC wsName; RWsSession* ws = NULL; if ( GetStringFromConfig(aSection, KFldWs, wsName) ) { ws = static_cast<RWsSession*>(GetDataObjectL(wsName)); } TInt err = KErrNone; if ( ws!= NULL ) { // Execute command and log parameters INFO_PRINTF1(KLogInfoCmdnewL1); TRAP( err, iAnimDll = new (ELeave) RAnimDll(*ws) ); } else { // Execute command and log parameters INFO_PRINTF1(KLogInfoCmdnewL2); TRAP(err, iAnimDll = new (ELeave) RAnimDll()); } // Check the command return code if ( err!=KErrNone ) { ERR_PRINTF2(KLogErrNum, err); SetError(err); } }
开发者ID:fedor4ever,项目名称:default,代码行数:33,
示例19: pcm16/** * * TestInitialize * @param aDataType * @param aMode * @result TVerdict * */TVerdict CTestStepSDevSoundPlayDataCap::TestInitialize(TMMFState aMode){ TFourCC pcm16(KMMFFourCCCodePCM16); //default to pcm16 data type iCallbackError = KErrNone; iExpectedValue = KErrNone; ResetCallbacks(); iAL->InitialiseActiveListener(); INFO_PRINTF1(_L("Initializing DevSound")); // Initialize TRAPD(err, iMMFDevSound->InitializeL(*this, pcm16, aMode)); if (err) { WARN_PRINTF2 (_L("DevSound InitializeL left with error = %d"), err); return EInconclusive; } else { CActiveScheduler::Start(); if (iCallbackError != iExpectedValue) { ERR_PRINTF3 (_L("DevSound InitializeComplete returned %d, expected %d"), iCallbackError, iExpectedValue); return EFail; } if (iCallbackArray[EInitComplete] != 1) { ERR_PRINTF2 (_L("DevSound InitializeComplete was called %d times, expected 1"), iCallbackArray[EInitComplete]); return EFail; } } return EPass;}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:42,
示例20: INFO_PRINTF1void CT_DataSdpAttrValue::DoCmdDes(const TDesC& aSection) { TPtrC8 actual=GetSdpAttrValue()->Des(); HBufC* buffer=HBufC::NewLC(actual.Length()); TPtr bufferPtr=buffer->Des(); bufferPtr.Copy(actual); INFO_PRINTF1(_L("CSdpAttrValue::Des result:")); INFO_PRINTF1(bufferPtr); TPtrC expected; if ( GetStringFromConfig(aSection, KExpected(), expected) ) { if ( bufferPtr!=expected ) { ERR_PRINTF1(_L("Des is not as expected!")); SetBlockResult(EFail); } } else { ERR_PRINTF2(_L("Missing expected value %S"), &KExpected()); SetBlockResult(EFail); } CleanupStack::PopAndDestroy(buffer); }
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:25,
示例21: INFO_PRINTF1/** Creates a default palette for the display mode specified */void CT_DataPalette::DoCmdNewDefault(const TDesC& aSection) { INFO_PRINTF1(_L("Calls CPalette::NewDefaultL() creating a default palette for the display mode specified")); // cleanup if any delete iPalette; iPalette = NULL; // get display mode from parameters TDisplayMode displayMode; if ( !CT_GraphicsUtil::ReadDisplayMode(*this, aSection, KDisplayMode(), displayMode) ) { ERR_PRINTF1(_L("No display mode")); SetBlockResult(EFail); } else { // create new palette TRAPD(err, iPalette = CPalette::NewDefaultL(displayMode)); // check error code if (err != KErrNone) { ERR_PRINTF2(_L("CPalette::NewDefaultL error: %d"), err); SetBlockResult(EFail); } } }
开发者ID:fedor4ever,项目名称:default,代码行数:29,
示例22: StartCountdownL/**either release resource after countdown has reached the necessary valueor timeout test if countdown is not started after the timeout period has passed*/void CConcurrentTimeOutNotifierStep::ProcessWaitL(const TBool aTransaction) { StartCountdownL(); iEnd.UniversalTime(); const TInt64 KLockTime = iEnd.MicroSecondsFrom( iStart ).Int64(); const TInt64 KTestTime = iEnd.MicroSecondsFrom( iTestStart ).Int64(); if( iCountdown && ( KLockTime >= ((iSeconds - KTimeDiff) * KOneSecond) ) ) { iWaiting = EFalse; iCountdown = EFalse; if(aTransaction) { iContactsDatabase->DatabaseCommitL( EFalse );//unlock database } else { CloseL( ETrue );//unlock contact } ++iNextTest; SetSharedTextL(KSharedNextTest, KDoubleChar, EFalse); } else if( KTestTime > KTimeout ) //test has timed out { _LIT(KTimedOut,"Notifier test %d has timed out"); ERR_PRINTF2(KTimedOut, ++iNextTest); iWaiting = EFalse; iCountdown = EFalse; TESTPRINT( EFalse ); SetSharedTextL(KSharedNextTest, KDoubleChar, EFalse); iNextTest = iTests->Count(); } //else test is not complete and has not timed out... continue waiting }
开发者ID:Esclapion,项目名称:qt-mobility,代码行数:37,
示例23: TokenizeStringL/** Check the updated categories extended name@param aCalEntry Pointer to CCalEntry@param aCategories Expected category name*/void CTestCalInterimApiFetchEntryAndCheckData::CheckCategoriesL(CCalEntry* aCalEntry, const TDesC& aCategories) { RArray<TPtrC> categoryList; TokenizeStringL(aCategories, categoryList); RPointerArray<CCalCategory> entryCatList; CleanupStack::PushL(TCleanupItem(ResetAndDestroyCategoryArray, &entryCatList)); entryCatList = aCalEntry->CategoryListL(); for(TInt ii = 0; ii < categoryList.Count(); ++ii) { TInt jj = 0; for(; jj < entryCatList.Count(); ++jj) { if(entryCatList[jj]->ExtendedCategoryName() == categoryList[ii]) { INFO_PRINTF2(KInfoCategoryExists, &(categoryList[ii])); break; // break jj } } // jj if(jj >= entryCatList.Count()) { ERR_PRINTF2(KErrCategoryNotExists, &(categoryList[ii])); SetTestStepResult(EFail); } }// ii CleanupStack::PopAndDestroy(&entryCatList); }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:33,
示例24: doTestStepL/**doTestStepL()Performs the comparison of POP messages@returnReturns the teststep result.*/TVerdict CT_MsgComparePopEmailMsgs::doTestStepL() { INFO_PRINTF1(_L("Test Step: Compare Pop Email Msgs")); if(LoadParametersL()) { User::LeaveIfError(iFs.Connect()); CleanupClosePushL(iFs); // Normally do not push an object that is a data member of another object. // But in this case we want to close early if we get a leave. // Otherwise the iFs would be open till the thread had begun to die. if(TestStepResult() == EPass) { CMsvEntry* recvMsvEntry = iSharedDataPOP.iSession->GetEntryL(KMsvRootIndexEntryId); CleanupStack::PushL(recvMsvEntry); CMsvEntry* sentMsvEntry = iSharedDataPOP.iSession->GetEntryL(KMsvRootIndexEntryId); CleanupStack::PushL(sentMsvEntry); for(TInt i = 0;i < iInboxSelectionList->Count();i++) { recvMsvEntry->SetEntryL(iInboxSelectionList->At(i)); TMsvEntry recvEntry = recvMsvEntry->Entry(); for(TInt j = 0;j < iSentSelectionList->Count();j++) { sentMsvEntry->SetEntryL(iSentSelectionList->At(j)); TMsvEntry sentEntry = sentMsvEntry->Entry(); if(recvEntry.iDescription.Compare(sentEntry.iDescription) == 0) { CExpPop3MailInfo* pExpMailInfo = NULL; for(int k = 0;k < iExpResults.Count();k++) { if(iExpResults[k]->GetDescription().Compare(recvEntry.iDescription) == 0) { pExpMailInfo = iExpResults[k]; break; } } if(! pExpMailInfo) { ERR_PRINTF2(_L("Test %d failed could not retrieve expected mail info"), j+1); SetTestStepResult(EFail); break; } if(! DoCompareL(recvEntry, *pExpMailInfo, sentEntry)) { INFO_PRINTF2(_L("Test %d failed"), j + 1); SetTestStepResult(EFail); } } } } CleanupStack::PopAndDestroy(2, recvMsvEntry); // recvMsvEntry, sentMsvEntry } CleanupStack::PopAndDestroy(); } INFO_PRINTF1(_L("T_ComparePopEmailMsgs Completed")); return TestStepResult(); }
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:67,
示例25: TRAPTVerdict CListsStep::doTestStepL()/** * @return - TVerdict code * Override of base class pure virtual * Our implementation only gets called if the base class doTestStepPreambleL() did * not leave. That being the case, the current test result value will be EPass. */ { if (TestStepResult()==EPass) { TInt ret = KErrNone; __UHEAP_MARK; TRAP(ret, ClientAppL()); if(KErrNone != ret) { SetTestStepResult(EFail); ERR_PRINTF2(_L("Error %d from CListsStep->ClientAppL()"), ret); } __UHEAP_MARKEND; } return TestStepResult(); }
开发者ID:fedor4ever,项目名称:devicedbgsrvs,代码行数:28,
示例26: ERR_PRINTF2void CT_DataAnimDll::DoCmdLoad(const TDesC& aSection) { TInt err = KErrNone; // Get test data for command input parameter(s) TPtrC fileName; if(!GetStringFromConfig(aSection, KPlugInFileName(), fileName)) { ERR_PRINTF2(KLogErrMissingPara, &KPlugInFileName()); SetBlockResult(EFail); } else { // Execute command and log parameters if (iAnimDll != NULL) { INFO_PRINTF1(KLogInfoCmdLoad1); err = iAnimDll->Load(fileName); } // Check the command return code if(err != KErrNone) { ERR_PRINTF3(KLogErrLoad, err, &fileName); SetError(err); } } }
开发者ID:fedor4ever,项目名称:default,代码行数:28,
示例27: doTestStepL/**doTestStepL()Reads the POP account name from the ini file. If ALL string is mentioned in the .ini file it deletes all the IMAP accounts, Else deletes the IMAP account whose name is mentioned in the ini file@returnReturns the test step result*/TVerdict CT_MsgDeletePopAccount::doTestStepL() { INFO_PRINTF1(_L("Test Step: Delete Pop Account")); TPtrC popAccountName; // Read Pop Account Name from ini file if(!GetStringFromConfig(ConfigSection(), KPopAccountName, popAccountName)) { ERR_PRINTF1(_L("Account name not specified")); SetTestStepResult(EFail); } else { CEmailAccounts* account = CEmailAccounts::NewLC(); RArray<TPopAccount> arrayPop3Accounts; CleanupClosePushL(arrayPop3Accounts); account->GetPopAccountsL(arrayPop3Accounts); TInt count=arrayPop3Accounts.Count(); TBuf<12> temp(popAccountName); temp.UpperCase(); // Making case insensitive if(temp.CompareC(_L("ALL")) == 0) { INFO_PRINTF2(_L("Deleting all accounts. Total = %d"), count); for(TInt i=0; i<count; i++) { TPopAccount id = arrayPop3Accounts[i]; account->DeletePopAccountL(id); } } else { TBool deleteFlag = EFalse; for(TInt i = 0; i < count; i++) { if(popAccountName.CompareC(arrayPop3Accounts[i].iPopAccountName) == 0) { account->DeletePopAccountL(arrayPop3Accounts[i]); // Just ensure that if we try to delete it again we hopefuly get an error // or can see that it has been deleted. arrayPop3Accounts.Remove(i); deleteFlag = ETrue; break; } } if(deleteFlag) { INFO_PRINTF2(_L("Pop acount /" %S /" deleted"), &popAccountName); } else { ERR_PRINTF2(_L("Pop acount /" %S /" not found"), &popAccountName); SetTestStepResult(EFail); User::Leave(KErrNotFound); } } CleanupStack::PopAndDestroy(2, account); //arrayPop3Accounts,account } return TestStepResult(); }
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:69,
注:本文中的ERR_PRINTF2函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ ERR_PRINTF3函数代码示例 C++ ERR_PRINTF1函数代码示例 |