Ejemplo n.º 1
0
TInt CTestMessSharedData::DeleteEntryL(CTestStep& aStep)
	{
	TInt	ret=KErrNone;
	TPtrC	name;

	if ( !aStep.GetStringFromConfig(aStep.ConfigSection(), KName, name) )
		{
		aStep.ERR_PRINTF1(_L("Name not found"));
		aStep.SetTestStepResult(EFail);
		ret=KErrArgument;
		}
	else
		{
		aStep.INFO_PRINTF2(_L("Name : %S"), &name);

		CMsgEntry*	msgParent=NULL;
		CMsgEntry*	msgEntry=iList;
		TBool		found=EFalse;

		while ( (msgEntry!=NULL) && !found )
			{
			if ( msgEntry->iName.Compare(name) == 0 )
				{
				if ( msgParent!=NULL )
					{
					msgParent->iNext=msgEntry->iNext;
					}
				else
					{
					iList=msgEntry->iNext;
					}
				iDeleteTestStep=ETrue;
				iAnyPostStepToDo=msgEntry;
				found=ETrue;
				}
			else
				{
				msgParent=msgEntry;
				msgEntry=msgEntry->iNext;
				}
			}

		if ( !found )
			{
			aStep.ERR_PRINTF1(_L("Message Entry not found"));
			aStep.SetTestStepResult(EFail);
			ret=KErrNotFound;
			}
		}

	return ret;
	}
Ejemplo n.º 2
0
void CTestMessSharedData::CMsgEntry::ConstructL(CTestStep& aStep)
	{
	TPtrC	name;

	//	Read in name tag
	if ( !aStep.GetStringFromConfig(aStep.ConfigSection(), KName, name) )
		{
		aStep.ERR_PRINTF1(_L("Name not found"));
		aStep.SetTestStepResult(EFail);
		}
	else
		{
		aStep.INFO_PRINTF2(_L("Name : %S"), &name);
		iName.Copy(name);
		}
	}