apicompatanamdw/bcdrivers/os/lbs/LocAcquisition/src/testpositiongenericinfo.cpp
changeset 2 0cb2248d0edc
equal deleted inserted replaced
1:61e9400fe245 2:0cb2248d0edc
       
     1 /*
       
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Test Class For HPositionGenericInfo
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // System Includes
       
    20 
       
    21 
       
    22 // User Includes
       
    23 #include "testpositiongenericinfo.h"
       
    24 
       
    25 
       
    26 // Constant Declarations
       
    27 
       
    28     
       
    29 // ======== MEMBER FUNCTIONS ========
       
    30 
       
    31 // ---------------------------------------------------------------------------
       
    32 // C++ Default Constructor
       
    33 // ---------------------------------------------------------------------------
       
    34 //
       
    35 CTestPositionGenericInfo::CTestPositionGenericInfo(CStifLogger* aLog)
       
    36     : iPositionGenericInfo(NULL),iLog(aLog)
       
    37     {
       
    38 
       
    39     }
       
    40 
       
    41 // ---------------------------------------------------------------------------
       
    42 // C++ Destructor
       
    43 // ---------------------------------------------------------------------------
       
    44 //
       
    45 CTestPositionGenericInfo::~CTestPositionGenericInfo()
       
    46     {
       
    47 	if(iPositionGenericInfo)
       
    48 		{
       
    49 		delete iPositionGenericInfo;
       
    50 		iPositionGenericInfo = NULL;
       
    51 		}
       
    52     }
       
    53 
       
    54 // ---------------------------------------------------------
       
    55 // CTestPositionGenericInfo::CheckNewL
       
    56 //
       
    57 // (other items were commented in a header).
       
    58 // ---------------------------------------------------------
       
    59 //
       
    60 TInt CTestPositionGenericInfo::CheckNewL( CStifItemParser& aItem )
       
    61 	{
       
    62 	TInt bufferSize;
       
    63 	TInt maxFields;
       
    64 	TInt ret;
       
    65 	if( aItem.GetNextInt(bufferSize) != KErrNotFound && 
       
    66 		aItem.GetNextInt(maxFields) != KErrNotFound )
       
    67 		{
       
    68 		ret = CreateLC( bufferSize, maxFields );
       
    69 		}
       
    70 	else if ( aItem.GetNextInt(bufferSize) != KErrNotFound )
       
    71 		{
       
    72 		ret = CreateLC( bufferSize );
       
    73 		}	
       
    74 	else
       
    75 		{
       
    76 		ret = CreateLC( );
       
    77 		}
       
    78 	return ret;
       
    79 	}
       
    80 
       
    81 // ---------------------------------------------------------
       
    82 // CTestPositionGenericInfo::CreateLC
       
    83 //
       
    84 // (other items were commented in a header).
       
    85 // ---------------------------------------------------------
       
    86 //
       
    87 TInt CTestPositionGenericInfo::CreateLC( TInt aBufferSize, TInt aMaxFields )
       
    88 	{
       
    89 	HPositionGenericInfo* PositionGenericInfo = HPositionGenericInfo::NewLC( aBufferSize, aMaxFields );
       
    90 	if( aBufferSize == PositionGenericInfo->BufferSize() && 
       
    91 		aMaxFields == PositionGenericInfo->MaxFields() )
       
    92 		{
       
    93 		CleanupStack::PopAndDestroy(PositionGenericInfo);
       
    94 		iLog->Log(_L("CheckNewLC - Passed"));
       
    95 		return KErrNone;
       
    96 		}
       
    97 	else
       
    98 		{
       
    99 		CleanupStack::PopAndDestroy(PositionGenericInfo);
       
   100 		iLog->Log(_L("CheckNewLC - Failed"));	
       
   101 		return KErrGeneral;
       
   102 		}
       
   103 	}
       
   104 
       
   105 // ---------------------------------------------------------
       
   106 // CTestPositionGenericInfo::CreateLC
       
   107 //
       
   108 // (other items were commented in a header).
       
   109 // ---------------------------------------------------------
       
   110 //
       
   111 TInt CTestPositionGenericInfo::CreateLC( TInt aBufferSize )
       
   112 	{
       
   113 	HPositionGenericInfo* PositionGenericInfo = HPositionGenericInfo::NewLC( aBufferSize );
       
   114 	if(aBufferSize == PositionGenericInfo->BufferSize() && 
       
   115 		KPositionGenericInfoDefaultMaxFields == PositionGenericInfo->MaxFields() )
       
   116 		{
       
   117 		CleanupStack::PopAndDestroy(PositionGenericInfo);
       
   118 		iLog->Log(_L("CheckNewLC - Passed"));
       
   119 		return KErrNone;
       
   120 		}
       
   121 	else
       
   122 		{
       
   123 		CleanupStack::PopAndDestroy(PositionGenericInfo);
       
   124 		iLog->Log(_L("CheckNewLC - Failed"));	
       
   125 		return KErrGeneral;
       
   126 		}
       
   127 	}
       
   128 
       
   129 // ---------------------------------------------------------
       
   130 // CTestPositionGenericInfo::CreateLC
       
   131 //
       
   132 // (other items were commented in a header).
       
   133 // ---------------------------------------------------------
       
   134 //
       
   135 TInt CTestPositionGenericInfo::CreateLC()
       
   136 	{
       
   137 	HPositionGenericInfo* PositionGenericInfo = HPositionGenericInfo::NewLC( );
       
   138 	if(KPositionGenericInfoDefaultBufferSize == PositionGenericInfo->BufferSize() && 
       
   139 		KPositionGenericInfoDefaultMaxFields == PositionGenericInfo->MaxFields() )
       
   140 		{
       
   141 		CleanupStack::PopAndDestroy(PositionGenericInfo);
       
   142 		iLog->Log(_L("CheckNewLC - Passed"));
       
   143 		return KErrNone;
       
   144 		}
       
   145 	else
       
   146 		{
       
   147 		CleanupStack::PopAndDestroy(PositionGenericInfo);
       
   148 		iLog->Log(_L("CheckNewLC - Failed"));	
       
   149 		return KErrGeneral;
       
   150 		}
       
   151 	}
       
   152 	
       
   153 // ---------------------------------------------------------
       
   154 // CTestPositionGenericInfo::CreateL
       
   155 //
       
   156 // (other items were commented in a header).
       
   157 // ---------------------------------------------------------
       
   158 //
       
   159 TInt CTestPositionGenericInfo::CreateL()
       
   160 	{
       
   161 	iPositionGenericInfo = HPositionGenericInfo::NewL( );
       
   162 	if(KPositionGenericInfoDefaultBufferSize == iPositionGenericInfo->BufferSize() && 
       
   163 		KPositionGenericInfoDefaultMaxFields == iPositionGenericInfo->MaxFields() )
       
   164 		{
       
   165 		iLog->Log(_L("CheckNewL - Passed"));
       
   166 		return KErrNone;
       
   167 		}
       
   168 	else
       
   169 		{
       
   170 		iLog->Log(_L("CheckNewL - Failed"));	
       
   171 		return KErrGeneral;
       
   172 		}
       
   173 	}
       
   174 	
       
   175 // ---------------------------------------------------------
       
   176 // CTestPositionGenericInfo::Delete
       
   177 //
       
   178 // (other items were commented in a header).
       
   179 // ---------------------------------------------------------
       
   180 //
       
   181 TInt CTestPositionGenericInfo::Delete()
       
   182 	{
       
   183 	if(iPositionGenericInfo)
       
   184 		{
       
   185 		delete iPositionGenericInfo;
       
   186 		iPositionGenericInfo = NULL;
       
   187 		}	
       
   188 	return KErrNone;
       
   189 	}
       
   190 
       
   191 // ---------------------------------------------------------
       
   192 // CTestPositionGenericInfo::CheckRequestedFieldsL
       
   193 //
       
   194 // (other items were commented in a header).
       
   195 // ---------------------------------------------------------
       
   196 // 		  
       
   197 TInt CTestPositionGenericInfo::CheckRequestedFieldsL( )
       
   198 	{
       
   199 	TInt err = CreateL();
       
   200 	TPositionFieldId aPositionFieldIdList[3];
       
   201 	aPositionFieldIdList[0] = EPositionFieldHorizontalSpeed;
       
   202 	aPositionFieldIdList[1] = EPositionFieldVerticalSpeed;
       
   203 	aPositionFieldIdList[2] = EPositionFieldTrueCourse;
       
   204 	
       
   205 	iPositionGenericInfo->SetRequestedFields(aPositionFieldIdList);
       
   206 	
       
   207 	if(iPositionGenericInfo->IsRequestedField(aPositionFieldIdList[0]) && 
       
   208 		iPositionGenericInfo->IsRequestedField(aPositionFieldIdList[1]) && 
       
   209 		iPositionGenericInfo->IsRequestedField(aPositionFieldIdList[2]) )
       
   210 		{
       
   211 		iLog->Log(_L("CheckRequestedField - Passed"));
       
   212 		err = KErrNone;
       
   213 		}
       
   214 	else
       
   215 		{
       
   216 		iLog->Log(_L("CheckRequestedField - Failed"));
       
   217 		err = KErrGeneral;
       
   218 		}
       
   219 	Delete();	
       
   220 	return err;
       
   221 	}
       
   222 
       
   223 // ---------------------------------------------------------
       
   224 // CTestPositionGenericInfo::CheckOrderOfRequestedFieldL
       
   225 //
       
   226 // (other items were commented in a header).
       
   227 // ---------------------------------------------------------
       
   228 //
       
   229 TInt CTestPositionGenericInfo::CheckOrderOfRequestedFieldL( )
       
   230 	{
       
   231 	TInt err = CreateL();
       
   232 	TPositionFieldId aPositionFieldIdList[3];
       
   233 	aPositionFieldIdList[0] = EPositionFieldHorizontalSpeed;
       
   234 	aPositionFieldIdList[1] = EPositionFieldVerticalSpeed;
       
   235 	aPositionFieldIdList[2] = EPositionFieldTrueCourse;
       
   236 	
       
   237 	iPositionGenericInfo->SetRequestedFields(aPositionFieldIdList);
       
   238 	
       
   239 	TInt some = iPositionGenericInfo->FirstRequestedFieldId();
       
   240 	TInt some1 = iPositionGenericInfo->NextRequestedFieldId(aPositionFieldIdList[0]);
       
   241 	TBool some3 = iPositionGenericInfo->IsFieldAvailable( EPositionFieldHorizontalSpeed );
       
   242 	
       
   243 	if( aPositionFieldIdList[1] == iPositionGenericInfo->NextRequestedFieldId(aPositionFieldIdList[0]) && 
       
   244 		!iPositionGenericInfo->IsFieldAvailable( EPositionFieldVerticalSpeed ) )
       
   245 		{
       
   246 		iLog->Log(_L("CheckOrderOfRequestedField - Passed"));
       
   247 		err = KErrNone;
       
   248 		}
       
   249 	else
       
   250 		{
       
   251 		iLog->Log(_L("CheckOrderOfRequestedField - Failed"));
       
   252 		err = KErrGeneral;
       
   253 		}
       
   254 	Delete();	
       
   255 	return err;
       
   256 	}
       
   257 
       
   258 // ---------------------------------------------------------
       
   259 // CTestPositionGenericInfo::CheckClearPositionDataL
       
   260 //
       
   261 // (other items were commented in a header).
       
   262 // ---------------------------------------------------------
       
   263 //
       
   264 TInt CTestPositionGenericInfo::CheckClearPositionDataL()
       
   265 	{
       
   266 	TInt err = CreateL();
       
   267 	iPositionGenericInfo->ClearPositionData();
       
   268 	Delete();	
       
   269 	return KErrNone;
       
   270 	}
       
   271 
       
   272 // ---------------------------------------------------------
       
   273 // CTestPositionGenericInfo::CheckClearRequestedFieldsL
       
   274 //
       
   275 // (other items were commented in a header).
       
   276 // ---------------------------------------------------------
       
   277 //
       
   278 TInt CTestPositionGenericInfo::CheckClearRequestedFieldsL()
       
   279 	{
       
   280 	TInt err = CreateL();
       
   281 	iPositionGenericInfo->SetRequestedField(EPositionFieldHorizontalSpeed);
       
   282 	iPositionGenericInfo->ClearRequestedFields();
       
   283 	if(EPositionFieldNone == iPositionGenericInfo->FirstRequestedFieldId())
       
   284 		{
       
   285 		iLog->Log(_L("CheckClearRequestedFieldsL - Passed"));
       
   286 		err = KErrNone;
       
   287 		}
       
   288 	else
       
   289 		{
       
   290 		iLog->Log(_L("CheckClearRequestedFieldsL - Failed"));
       
   291 		err = KErrGeneral;
       
   292 		}
       
   293 	Delete();	
       
   294 	return err;
       
   295 	}
       
   296 
       
   297 // ---------------------------------------------------------
       
   298 // CTestPositionGenericInfo::CheckSetGetValueL
       
   299 //
       
   300 // (other items were commented in a header).
       
   301 // ---------------------------------------------------------
       
   302 //
       
   303 TInt CTestPositionGenericInfo::CheckSetGetValueL( CStifItemParser& aItem )
       
   304 	{
       
   305     TInt choice;
       
   306     User::LeaveIfError(aItem.GetNextInt(choice));
       
   307 	TPositionFieldId positionFieldId = EPositionFieldHorizontalSpeed;
       
   308 	TInt err = CreateL();
       
   309 	
       
   310 	switch(choice)
       
   311 		{
       
   312 		case EInt8:
       
   313 			TInt value11;
       
   314 			TInt8 value12;
       
   315 			User::LeaveIfError(aItem.GetNextInt(value11));
       
   316 			if((KErrNone == iPositionGenericInfo->SetValue(positionFieldId, static_cast<TInt8>(value11))) &&
       
   317 				(KErrNone == iPositionGenericInfo->GetValue(positionFieldId, value12)) &&
       
   318 				value11 == static_cast<TInt>(value12) )
       
   319 				{
       
   320 				iLog->Log(_L("CheckSetGetValueL - Passed"));
       
   321 				err = KErrNone;
       
   322 				}
       
   323 			else
       
   324 				{
       
   325 				iLog->Log(_L("CheckSetGetValueL - Failed"));
       
   326 				err = KErrGeneral;	
       
   327 				}
       
   328 			break;	
       
   329 		case EInt16:
       
   330 			TInt value21;
       
   331 			TInt16 value22;
       
   332 			User::LeaveIfError(aItem.GetNextInt(value21));
       
   333 			if((KErrNone == iPositionGenericInfo->SetValue(positionFieldId, static_cast<TInt16>(value21))) &&
       
   334 				(KErrNone == iPositionGenericInfo->GetValue(positionFieldId, value22)) &&
       
   335 				value21 == value22 )
       
   336 				{
       
   337 				iLog->Log(_L("CheckSetGetValueL - Passed"));
       
   338 				err = KErrNone;
       
   339 				}
       
   340 			else
       
   341 				{
       
   342 				iLog->Log(_L("CheckSetGetValueL - Failed"));
       
   343 				err = KErrGeneral;	
       
   344 				}
       
   345 			break;	
       
   346 		case EInt32:
       
   347 			TInt value31;
       
   348 			TInt32 value32;
       
   349 			User::LeaveIfError(aItem.GetNextInt(value31));
       
   350 			if((KErrNone == iPositionGenericInfo->SetValue(positionFieldId, static_cast<TInt32>(value31))) &&
       
   351 				(KErrNone == iPositionGenericInfo->GetValue(positionFieldId, value32)) &&
       
   352 				value31 == value32 )
       
   353 				{
       
   354 				iLog->Log(_L("CheckSetGetValueL - Passed"));
       
   355 				err = KErrNone;
       
   356 				}
       
   357 			else
       
   358 				{
       
   359 				iLog->Log(_L("CheckSetGetValueL - Failed"));
       
   360 				err = KErrGeneral;	
       
   361 				}
       
   362 			break;
       
   363 		case EInt64:
       
   364 			TInt value41;
       
   365 			TInt64 value42;
       
   366 			User::LeaveIfError(aItem.GetNextInt(value41));
       
   367 			if((KErrNone == iPositionGenericInfo->SetValue(positionFieldId, static_cast<TInt64>(value41))) &&
       
   368 				(KErrNone == iPositionGenericInfo->GetValue(positionFieldId, value42)) &&
       
   369 				value41 == value42 )
       
   370 				{
       
   371 				iLog->Log(_L("CheckSetGetValueL - Passed"));
       
   372 				err = KErrNone;
       
   373 				}
       
   374 			else
       
   375 				{
       
   376 				iLog->Log(_L("CheckSetGetValueL - Failed"));
       
   377 				err = KErrGeneral;	
       
   378 				}
       
   379 			break;
       
   380 		case EUint8:
       
   381 			TInt value51;
       
   382 			TUint8 value52;
       
   383 			User::LeaveIfError(aItem.GetNextInt(value51));
       
   384 			if((KErrNone == iPositionGenericInfo->SetValue(positionFieldId, static_cast<TUint8>(value51))) &&
       
   385 				(KErrNone == iPositionGenericInfo->GetValue(positionFieldId, value52)) &&
       
   386 				value51 == value52 )
       
   387 				{
       
   388 				iLog->Log(_L("CheckSetGetValueL - Passed"));
       
   389 				err = KErrNone;
       
   390 				}
       
   391 			else
       
   392 				{
       
   393 				iLog->Log(_L("CheckSetGetValueL - Failed"));
       
   394 				err = KErrGeneral;	
       
   395 				}
       
   396 			break;	
       
   397 		case EUint16:
       
   398 			TInt value61;
       
   399 			TUint16 value62;
       
   400 			User::LeaveIfError(aItem.GetNextInt(value61));
       
   401 			if((KErrNone == iPositionGenericInfo->SetValue(positionFieldId, static_cast<TUint16>(value61))) &&
       
   402 				(KErrNone == iPositionGenericInfo->GetValue(positionFieldId, value62)) &&
       
   403 				value61 == value62 )
       
   404 				{
       
   405 				iLog->Log(_L("CheckSetGetValueL - Passed"));
       
   406 				err = KErrNone;
       
   407 				}
       
   408 			else
       
   409 				{
       
   410 				iLog->Log(_L("CheckSetGetValueL - Failed"));
       
   411 				err = KErrGeneral;	
       
   412 				}
       
   413 			break;	
       
   414 		case EUint32:
       
   415 			TInt value71;
       
   416 			TUint32 value72;
       
   417 			User::LeaveIfError(aItem.GetNextInt(value71));
       
   418 			if((KErrNone == iPositionGenericInfo->SetValue(positionFieldId, static_cast<TUint32>(value71))) &&
       
   419 				(KErrNone == iPositionGenericInfo->GetValue(positionFieldId, value72)) &&
       
   420 				value71 == value72 )
       
   421 				{
       
   422 				iLog->Log(_L("CheckSetGetValueL - Passed"));
       
   423 				err = KErrNone;
       
   424 				}
       
   425 			else
       
   426 				{
       
   427 				iLog->Log(_L("CheckSetGetValueL - Failed"));
       
   428 				err = KErrGeneral;	
       
   429 				}
       
   430 			break;		
       
   431 		case EReal32:
       
   432 			TInt value81;
       
   433 			TReal32 value82;
       
   434 			User::LeaveIfError(aItem.GetNextInt(value81));
       
   435 			if((KErrNone == iPositionGenericInfo->SetValue(positionFieldId, static_cast<TReal32>(value81))) &&
       
   436 				(KErrNone == iPositionGenericInfo->GetValue(positionFieldId, value82)) &&
       
   437 				value81 == value82 )
       
   438 				{
       
   439 				iLog->Log(_L("CheckSetGetValueL - Passed"));
       
   440 				err = KErrNone;
       
   441 				}
       
   442 			else
       
   443 				{
       
   444 				iLog->Log(_L("CheckSetGetValueL - Failed"));
       
   445 				err = KErrGeneral;	
       
   446 				}
       
   447 			break;		
       
   448 		case EReal64:
       
   449 			TInt value91;
       
   450 			TReal64 value92;
       
   451 			User::LeaveIfError(aItem.GetNextInt(value91));
       
   452 			if((KErrNone == iPositionGenericInfo->SetValue(positionFieldId, static_cast<TReal64>(value91))) &&
       
   453 				(KErrNone == iPositionGenericInfo->GetValue(positionFieldId, value92)) &&
       
   454 				value91 == value92 )
       
   455 				{
       
   456 				iLog->Log(_L("CheckSetGetValueL - Passed"));
       
   457 				err = KErrNone;
       
   458 				}
       
   459 			else
       
   460 				{
       
   461 				iLog->Log(_L("CheckSetGetValueL - Failed"));
       
   462 				err = KErrGeneral;	
       
   463 				}
       
   464 			break;		
       
   465 		case EDesC8:
       
   466 			TPtrC value101;
       
   467 			User::LeaveIfError(aItem.GetNextString(value101));
       
   468 			TBuf8<100> value102;
       
   469 			value102.Copy(value101);
       
   470 			TBuf8<100> value103;
       
   471 
       
   472 			if((KErrNone == iPositionGenericInfo->SetValue(positionFieldId, value102)) &&
       
   473 				(KErrNone == iPositionGenericInfo->GetValue(positionFieldId, value103)) &&
       
   474 				(0 == value102.Compare(value103)) )
       
   475 				{
       
   476 				iLog->Log(_L("CheckSetGetValueL - Passed"));
       
   477 				err = KErrNone;
       
   478 				}
       
   479 			else
       
   480 				{
       
   481 				iLog->Log(_L("CheckSetGetValueL - Failed"));
       
   482 				err = KErrGeneral;	
       
   483 				}
       
   484 			break;		
       
   485 		case EDesC16:
       
   486 			TPtrC value111;
       
   487 			TBuf16<100> value112;
       
   488 			User::LeaveIfError(aItem.GetNextString(value111));
       
   489 			if((KErrNone == iPositionGenericInfo->SetValue(positionFieldId, value111)) &&
       
   490 				(KErrNone == iPositionGenericInfo->GetValue(positionFieldId, value112)) &&
       
   491 				(0 == value111.Compare(value112)) )
       
   492 				{
       
   493 				iLog->Log(_L("CheckSetGetValueL - Passed"));
       
   494 				err = KErrNone;
       
   495 				}
       
   496 			else
       
   497 				{
       
   498 				iLog->Log(_L("CheckSetGetValueL - Failed"));
       
   499 				err = KErrGeneral;	
       
   500 				}
       
   501 			break;			
       
   502 		case EPtrC8:
       
   503 			TPtrC value121;
       
   504 			User::LeaveIfError(aItem.GetNextString(value121));
       
   505 			TBuf8<100> value122;
       
   506 			value122.Copy(value121);
       
   507 			
       
   508 			TPtrC8 value123 = value122.Ptr();
       
   509 			value122.Copy(value121);
       
   510 			if((KErrNone == iPositionGenericInfo->SetValue(positionFieldId, value122)) &&
       
   511 				(KErrNone == iPositionGenericInfo->GetValue(positionFieldId, value123)) &&
       
   512 				(0 == value123.Compare(value122)) )
       
   513 				{
       
   514 				iLog->Log(_L("CheckSetGetValueL - Passed"));
       
   515 				err = KErrNone;
       
   516 				}
       
   517 			else
       
   518 				{
       
   519 				iLog->Log(_L("CheckSetGetValueL - Failed"));
       
   520 				err = KErrGeneral;	
       
   521 				}
       
   522 			break;		
       
   523 		case EPtrC16:
       
   524 			TPtrC value131;
       
   525 			TPtrC16 value132;
       
   526 			User::LeaveIfError(aItem.GetNextString(value131));
       
   527 			if((KErrNone == iPositionGenericInfo->SetValue(positionFieldId, static_cast<TPtrC16>(value131))) &&
       
   528 				(KErrNone == iPositionGenericInfo->GetValue(positionFieldId, value132)) &&
       
   529 				(0 == value131.Compare(value132)) )
       
   530 				{
       
   531 				iLog->Log(_L("CheckSetGetValueL - Passed"));
       
   532 				err = KErrNone;
       
   533 				}
       
   534 			else
       
   535 				{
       
   536 				iLog->Log(_L("CheckSetGetValueL - Failed"));
       
   537 				err = KErrGeneral;	
       
   538 				}
       
   539 			break;	
       
   540 		case ETime:
       
   541 			TInt value141;
       
   542 			User::LeaveIfError(aItem.GetNextInt(value141));
       
   543 			TTime value142(value141);
       
   544 			TTime value143;
       
   545 			if((KErrNone == iPositionGenericInfo->SetValue(positionFieldId, value142)) &&
       
   546 				(KErrNone == iPositionGenericInfo->GetValue(positionFieldId, value143)) &&
       
   547 				value142==value143 )
       
   548 				{
       
   549 				iLog->Log(_L("CheckSetGetValueL - Passed"));
       
   550 				err = KErrNone;
       
   551 				}
       
   552 			else
       
   553 				{
       
   554 				iLog->Log(_L("CheckSetGetValueL - Failed"));
       
   555 				err = KErrGeneral;	
       
   556 				}
       
   557 			break;
       
   558 		case ETimeIntervalMicroSeconds:
       
   559 			TInt value151;
       
   560 			User::LeaveIfError(aItem.GetNextInt(value151));
       
   561 			TTimeIntervalMicroSeconds value152(value151);
       
   562 			TTimeIntervalMicroSeconds value153;
       
   563 			if((KErrNone == iPositionGenericInfo->SetValue(positionFieldId, value152)) &&
       
   564 				(KErrNone == iPositionGenericInfo->GetValue(positionFieldId, value153)) &&
       
   565 				value152 == value153 )
       
   566 				{
       
   567 				iLog->Log(_L("CheckSetGetValueL - Passed"));
       
   568 				err = KErrNone;
       
   569 				}
       
   570 			else
       
   571 				{
       
   572 				iLog->Log(_L("CheckSetGetValueL - Failed"));
       
   573 				err = KErrGeneral;	
       
   574 				}
       
   575 			break;
       
   576 		default:
       
   577 				iLog->Log(_L("CheckSetGetValueL - Wrong Value"));
       
   578 				err = KErrGeneral;	
       
   579 		}
       
   580 
       
   581 	Delete();	
       
   582 	return err;
       
   583 	}