当前位置: 首页>>代码示例>>C++>>正文


C++ ERR_PRINTF1函数代码示例

本文整理汇总了C++中ERR_PRINTF1函数的典型用法代码示例。如果您正苦于以下问题:C++ ERR_PRINTF1函数的具体用法?C++ ERR_PRINTF1怎么用?C++ ERR_PRINTF1使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ERR_PRINTF1函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: INFO_PRINTF1

/** Verifies that GetAlarmSoundsSilentUntil API does not return KErrNone
*/
void CTestSystemChangeFor::VerifySilentUntil()
	{
	TTime getSilentUntil;
	if(iAlarmServerSession.GetAlarmSoundsSilentUntil(getSilentUntil)!=KErrNone)
		{
		INFO_PRINTF1(_L("GetAlarmSoundsSilentUntil() != KErrNone"));
		}
	else
		{
		ERR_PRINTF1(_L("GetAlarmSoundsSilentUntil() == KErrNone"));
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:14,代码来源:TestSystemChangeFor.cpp

示例2: TRfcommRemotePortParams

/**
Test TRfcommRemotePortParams()
*/
void CT_RfcommRemotePortParamsData::DoCmdTRfcommRemotePortParams()
	{
	DestroyData();
	INFO_PRINTF1(_L("TRfcommRemotePortParams Constructor Call"));
	iData = new (ELeave) TRfcommRemotePortParams();
	
	if ( iData == NULL ) 
		{
		ERR_PRINTF1(_L("TRfcommRemotePortParams is NULL"));
		SetBlockResult(EFail);
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:15,代码来源:T_RfcommRemotePortParamsData.cpp

示例3: DoCancelGetDeviceAddress

/**
  Virtual DoCancel - Request to cancel the asynchronous command
  @publishedInternal
  @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_InquirySockAddrData::DoCancel(CActive* aActive, TInt /*aIndex*/)
 	{
 	if ( aActive==iActive )
 		{
 		DoCancelGetDeviceAddress();
 		}
 	else
 		{
 		ERR_PRINTF1(_L("Stray signal"));
 		SetBlockResult(EFail);
 		}
 	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:21,代码来源:T_InquirySockAddrData.cpp

示例4: RunGetDeviceAddress

/**
 Virtual RunL - Called on completion of an a Synchronous command
 @publishedInternal
 @see MT_MMActiveCallback
 @param aActive Active Object that RunL has been called on
 @pre N/A
 @post N/A
 @leave system wide error code
*/
void CT_InquirySockAddrData::RunL(CActive* aActive, TInt aIndex)
 	{
 	if ( aActive==iActive )
 		{
 		RunGetDeviceAddress(aIndex);
 		}
 	else
 		{
 		ERR_PRINTF1(_L("Stray signal"));
 		SetBlockResult(EFail);
 		}
 	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:21,代码来源:T_InquirySockAddrData.cpp

示例5: INFO_PRINTF2

void CTestCalInterimApiSuiteStepBase::Progress(TInt aPercentageCompleted)
	{
	if ( iNotifyProgress )
		{
		INFO_PRINTF2(KInfoPercentageCompleted, aPercentageCompleted);
		}
	else
		{
		ERR_PRINTF1(KErrPercentageCompleted);
		SetTestStepResult(EFail);
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:12,代码来源:TestCalInterimApiSuiteStepBase.cpp

示例6: ReadStringParam

TInt CTestFloat_blr::jn_test()
	{
 	// Create temporary variables in stack
  	char chParam[MAX_SIZE];
  	FLOAT input1;
  	FLOAT input2;
  	FLOAT expected;
  	FLOAT max_ulp;
  	FLOAT gen_ulp;
  	
  	// Read parameters
  	
  	ReadStringParam ( chParam);
    ReadFloatParam ( input1);
    ReadFloatParam ( input2);
    ReadFloatParam ( expected);
    ReadFloatParam ( max_ulp);
    
    //
    TBuf<MAX_SIZE> buf;
    TInt len = strlen(chParam);
    
    for (TInt j =0; j<len;j++)
    	{
    	buf.Append(chParam[j]);
		}
    
    // Do some testing
    FLOAT res = FUNC(jn) (input1, input2);
        
    if(check_float(res, expected, max_ulp, gen_ulp))
    	{
    	INFO_PRINTF1(_L("Test passed."));
    	}
    else    
    	{
    	ERR_PRINTF1(_L("Test Failed."));
   		return KErrGeneral;
    	}
    
    
    INFO_PRINTF1(_L("_________________________________________\n"));
    INFO_PRINTF2(_L("TestCase		  : %S\n"), &buf );
    INFO_PRINTF2(_L("Input Value    : %f\n"), input1 );
    INFO_PRINTF2(_L("Input Value    : %f\n"), input2 );
    INFO_PRINTF2(_L("Expected Value : %f\n"), expected );
	INFO_PRINTF2(_L("Max ULP value  : %f\n"), max_ulp );
	INFO_PRINTF2(_L("Result  		  : %f\n"), res );
	INFO_PRINTF2(_L("Generated Ulp  : %f\n"), gen_ulp );
	INFO_PRINTF1(_L("_________________________________________\n"));
 
    return KErrNone;
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:53,代码来源:tfloat_double_blr_2arg.cpp

示例7: strcpy

TInt CTestSendsignal::TestNegativeSigqueue1 (  )
	{   
	int ret1 = KErrGeneral, pid, pid1, ret, status;
	union sigval sival;
	char **argv=(char**)malloc(3*sizeof(char*));
	argv[0]=(char*)malloc(34*sizeof(char));
	argv[1]=(char*)malloc(3*sizeof(char));
	argv[2]= 0;
	strcpy(argv[0], "z:\\sys\\bin\\receivesignal.exe");
	sprintf(argv[1], "%d", 0);	
	ret = posix_spawn(&pid, "z:\\sys\\bin\\receivesignal.exe", NULL, NULL, argv, (char**)NULL);
	if(ret != 0)
		{
		ERR_PRINTF2(_L("Error in posix spawn and errno is set to %d"),errno);
		goto close;
		}
	INFO_PRINTF2( _L("the value of pid returned by posix_spawn is %d"),  pid);
	sival.sival_int = 0;
	ret = sigqueue(pid,0,sival);
	INFO_PRINTF1(_L("Negative test on sigqueue()"));
	if(ret != 0)
		{
		ERR_PRINTF1(_L("Failed to set the return value"));	
		goto close;
		}
	pid1 = waitpid(pid, &status, WUNTRACED);
	if (pid1 != pid)
		{
		ERR_PRINTF1(_L("waitpid failed..."));	
		goto close;
		}	
	INFO_PRINTF1(_L("Kill() returned 0 as the process exists"));
	ret1 = KErrNone;

	close:
	free((void*)argv[0]);
	free((void*)argv[1]);
	free((void*)argv);
	return ret1;
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:40,代码来源:tsendsignalblocks.cpp

示例8: INFO_PRINTF1

/**
@SYMTestCaseID			PIM-APP-ENGINES-CALINTERIMAPI-CIT-0006-HP
@SYMTestType			CIT
@SYMTestPriority		Medium
@SYMPREQ				1098
@SYMFssID				3.2.1 006
@SYMTestCaseDesc		Lists all calendar  files
@SYMTestActions			List all aganda files
@SYMTestExpectedResults	Return all aganda files
*/
void CTestCalInterimApiFileAccess::ListsAllAgendaFilesL()
	{
	INFO_PRINTF1(KInfoListingAllAgendaFiles);
	CDesCArray* 	agendaFiles(GetSession().ListCalFilesL());
	CleanupStack::PushL(agendaFiles);
	TInt			count;
	for( count=0 ; count<agendaFiles->MdcaCount(); count++ )
		{
		INFO_PRINTF1(agendaFiles->MdcaPoint(count));
		}
	CleanupStack::PopAndDestroy(agendaFiles);
	if ( count==0 )
		{
		ERR_PRINTF1(KErrListingAllAgendaFiles);
		SetTestStepResult(EFail);
		}
	else
		{
		iSession->DeleteCalFileL(iCalenderFileName);
		INFO_PRINTF1(_L("Listing out the files after the deletion of the file in the previous list"));
		CDesCArray* 	agendaFileList(GetSession().ListCalFilesL());
		CleanupStack::PushL(agendaFileList);
		TInt 			fileCount;
		for( fileCount=0; fileCount<agendaFileList->MdcaCount(); fileCount++)
			{
			INFO_PRINTF1(agendaFileList->MdcaPoint(fileCount));
			}
		if( fileCount == (count-1) )
			{
			INFO_PRINTF1(_L("ListCalFileL() has listed the files correctly"));
			iSession->CreateCalFileL(iCalenderFileName);
			}
		else
			{
			ERR_PRINTF1(_L("Listing is not done properly"));
			SetTestStepResult(EFail);
			}
		CleanupStack::PopAndDestroy(agendaFileList);
		}	
	}
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:50,代码来源:TestCalInterimApiFileAccess.cpp

示例9: INFO_PRINTF1

/**
  Function : doTestStepL
  Description : Checks the provisioned SNAP information for the POP account settings of a test case.
  @return : TVerdict - Test step result
*/		
TVerdict CT_MsgCheckPopSNAPSetting::doTestStepL()
	{
	INFO_PRINTF1(_L("Test Step : CheckPopSNAPSetting"));
	if(ReadIni())
		{
		CEmailAccounts* accounts = CEmailAccounts::NewL();
		CleanupStack::PushL(accounts);
		
		CImIAPPreferences* popIapPrefs = CImIAPPreferences::NewLC();
					
		TPopAccount popAccountId;
		CT_MsgUtilsCentralRepository::GetPopAccountL((TDes&)iPopAccountName,popAccountId);
				
		accounts->LoadPopIapSettingsL(popAccountId, *popIapPrefs);	
		
		TBool actualSNAPDefintion = popIapPrefs->SNAPDefined();
		
		if (actualSNAPDefintion == iExpectedSNAPDefinition)
			{
			if (actualSNAPDefintion)
				{
				TInt expectedSNAPPreference = 0;
				if(!GetIntFromConfig(ConfigSection(), KSNAPPreference, expectedSNAPPreference))
					{
					ERR_PRINTF1(_L("An expected SNAP ID value is not specified"));
					SetTestStepResult(EFail);
					CleanupStack::PopAndDestroy(2,accounts); // popIapPrefs, accounts
					return TestStepResult();
					}
				TInt actualSNAPPreference = popIapPrefs->SNAPPreference();
				
				if (actualSNAPPreference != expectedSNAPPreference)
					{
					ERR_PRINTF3(_L("Actual SNAP ID [%d] does not equal Expected SNAP ID [%d]"),actualSNAPPreference,expectedSNAPPreference);
					SetTestStepResult(EFail);
					}
				else
					{
					INFO_PRINTF3(_L("Actual SNAP ID [%d] equals Expected SNAP ID [%d]"),actualSNAPPreference,expectedSNAPPreference);
					}
				}
			}
		else
			{
			ERR_PRINTF3(_L("Actual SNAP Defintion [%d] does not equal Expected SNAP Defintion [%d]"),actualSNAPDefintion,iExpectedSNAPDefinition);
			SetTestStepResult(EFail);
			}
	
		CleanupStack::PopAndDestroy(2,accounts); // popIapPrefs, accounts
		}
	return TestStepResult();
	}
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:57,代码来源:T_CheckPopSNAPSetting.cpp

示例10: SetTestPath

TVerdict CSysUtilsGetSWVersionNoNewLinesStep::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);
		}
	INFO_PRINTF1(_L("Deleted P&S properties successfully."));
	
	_LIT16(KDummy,"xxxxx");

	TBuf16<KSysUtilVersionTextLength> version;
	version.Insert(0,KDummy);

	err = SysUtil::GetSWVersion( version );
	
	if ( err == KErrNone)
		{
		_LIT(KSw, "SW");
		TPtrC16 line;
		TESTL( GetStringFromConfig(ConfigSection(), KSw, 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"));
			SetTestStepResult(EFail);
			}
		}
	else 
		{
		ERR_PRINTF2(_L("Error code = %d"), err);
		SetTestStepResult(EFail);
		}
	
		
	return TestStepResult();
	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:52,代码来源:te_sysutilsgetversionnonewlines.cpp

示例11: GetIntFromConfig

TInt CTestSendsignal::TestNegativeSigqueue3 (  )
	{  
	int Maxsig, Pid, Signum, ret, ret1 = KErrGeneral, Sigval;
	union sigval sival;
	ret = GetIntFromConfig(ConfigSection(), _L("Pid"), Pid);
	if(ret == 0)
		{
		ERR_PRINTF1(_L("Failed to read the Process id number")) ;
		goto close;
		}	
	ret = GetIntFromConfig(ConfigSection(),_L("Sigval"), Sigval);
	if(ret == 0)
		{
		ERR_PRINTF1(_L("Failed to read the signal number")) ;
		goto close;
		}
	ret = GetIntFromConfig(ConfigSection(),_L("Maxsig"), Maxsig);
	if(ret == 0)
		{
		ERR_PRINTF1(_L("Failed to read the Maximum sig value")) ;
		goto close;
		}
	INFO_PRINTF1(_L("Negative test on sigqueue()"));
	for(Signum=Sigval; Signum <= Maxsig; Signum++)
		{
		sival.sival_int = 0;
		ret = sigqueue(Pid,Signum,sival);
		if((ret != -1) || (errno != ESRCH))
			{
			ERR_PRINTF2(_L("Failed to set the return value for signal %d"), Signum);	
			goto close;
			}
		}
	INFO_PRINTF1(_L("Negative test: Both the errno and expected value of kill() are same validated for all signals"));
	ret1 = KErrNone;

	close:
	return ret1;
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:39,代码来源:tsendsignalblocks.cpp

示例12: ERR_PRINTF1

/** Converts the text encoded in a non-Unicode character set into the Unicode character set 
@param	aSource The non-Unicode source text to be converted
@param	aUnicode Contains the converted text in the Unicode character 
@test
*/
void CTestHtmlToCrtConverterBufferStep::ConvertBufferDirectly(const TDesC8& aSource, TDes& aUnicode)
	{
	TInt	state = CCnvCharacterSetConverter::KStateDefault;
	// Converts text encoded in a non-Unicode character set into the Unicode character set 
	TInt	returnValue = iCnvCharacterSetConverter->ConvertToUnicode(aUnicode, aSource, state);

	// return value is 0 if entire buffer converted
	if( returnValue != KErrNone )
		{
		ERR_PRINTF1(KErrInConversion);
		SetTestStepResult(EFail);
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:18,代码来源:TestHtmlToCrtConverterBufferStep.cpp

示例13: ERR_PRINTF1

void CTestBlockController::StoreActiveScheduler(TTEFBlockItem& aCommand)
	{
	if( IsSharedDataMode() )
		{
		// Don't delete the persistent active scheduler
		iDeleteSharedScheduler = EFalse;
		}
	else
		{
		aCommand.iError = KErrNotSupported;
		ERR_PRINTF1(KErrSharedMode);
		}
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:13,代码来源:testblockcontroller.cpp

示例14: ERR_PRINTF1

/**
  Function : ReadIni
  Description :Reads the corresponding .ini file and returns EPass or EFail if any of the inputs are missing
  @return : TBool
*/
TBool CT_MsgRemoveSmtpSNAPSetting::ReadIni()
	{
	TBool result = ETrue;
	
	if(!GetStringFromConfig(ConfigSection(), KSmtpAccountName, iSmtpAccountName))
		{
		ERR_PRINTF1(_L("Smtp account name is not specified"));
		SetTestStepResult(EFail);
		result = EFalse;
		}
		
	return result;
	}
开发者ID:fedor4ever,项目名称:default,代码行数:18,代码来源:T_RemoveSmtpSNAPSetting.cpp

示例15: INFO_PRINTF2

/** Calls CFbsFont::Handle() */
void CT_DataFbsFont::DoCmdHandle()
	{
	// call Handle()
	TInt	handle = iFbsFont->Handle();
	INFO_PRINTF2(_L("Calls CFbsFont::Handle() %d"), handle);

	// validate hanle
	if (handle == 0)
		{
		ERR_PRINTF1(_L("Handle is zero!"));
		SetBlockResult(EFail);
		}
	}
开发者ID:fedor4ever,项目名称:default,代码行数:14,代码来源:T_DataFbsFont.cpp


注:本文中的ERR_PRINTF1函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。