loggingservices/eventlogger/test/src/t_logview2.cpp
changeset 55 44f437012c90
parent 17 55f2396f6d25
equal deleted inserted replaced
51:7d4490026038 55:44f437012c90
  4470 @SYMDEF                 DEF087459
  4470 @SYMDEF                 DEF087459
  4471 */
  4471 */
  4472 LOCAL_C void DEF087459L(CLogClient& aClient)
  4472 LOCAL_C void DEF087459L(CLogClient& aClient)
  4473 	{
  4473 	{
  4474 	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-1807 "));
  4474 	TheTest.Next(_L(" @SYMTestCaseID:SYSLIB-LOGENG-CT-1807 "));
  4475 	RTz tz;				
  4475 
  4476 	TInt err = tz.Connect();
       
  4477 	TEST2(err, KErrNone);
       
  4478 	CleanupClosePushL(tz);
       
  4479 	TTime now, saveNow;
       
  4480 	
       
  4481 	// Get and print current home time and save it
  4476 	// Get and print current home time and save it
       
  4477 	TTime now;
  4482 	now.HomeTime();
  4478 	now.HomeTime();
  4483 	saveNow=now;
  4479 	TTime saveNow(now);
  4484 	
  4480 	
  4485 	TBuf<0x80> testString;
  4481 	TBuf<0x80> testString;
  4486 	now.FormatL(testString,(_L("%H:%T %1\\%2\\%3 %E")));
  4482 	now.FormatL(testString,(_L("%H:%T %1\\%2\\%3 %E")));
  4487 	TheTest.Printf(_L("Current  home time    - %S\n"), &testString);
  4483 	TheTest.Printf(_L("Current  home time    - %S\n"), &testString);
  4488 
  4484 
  4491 	TDateTime midnight = now.DateTime();
  4487 	TDateTime midnight = now.DateTime();
  4492 	midnight.SetHour(0);
  4488 	midnight.SetHour(0);
  4493 	midnight.SetMinute(30);
  4489 	midnight.SetMinute(30);
  4494 	midnight.SetSecond(0);
  4490 	midnight.SetSecond(0);
  4495 	midnight.SetMicroSecond(0);
  4491 	midnight.SetMicroSecond(0);
  4496 	
  4492 
  4497 	TTime newTime=midnight;
  4493 	TTime midnightTTime = midnight;
  4498 
  4494 
  4499 	err = tz.SetHomeTime(midnight);
  4495 	TInt err = User::SetHomeTime(midnightTTime);
  4500 	TEST2(err, KErrNone);
  4496 	TEST2(err, KErrNone);
  4501 
  4497 
  4502 	// Get and print new home time
  4498 	// Get and print new home time
  4503 	now.HomeTime();
  4499 	now.HomeTime();
  4504 	now.FormatL(testString,(_L("%H:%T %1\\%2\\%3 %E")));
  4500 	now.FormatL(testString,(_L("%H:%T %1\\%2\\%3 %E")));
  4506 	TheTest.Printf(_L("Re-running DEF066296 test\n"));
  4502 	TheTest.Printf(_L("Re-running DEF066296 test\n"));
  4507 	
  4503 	
  4508 	DEF066296L(aClient);
  4504 	DEF066296L(aClient);
  4509 	
  4505 	
  4510 	// Restore and print hometime
  4506 	// Restore and print hometime
  4511 	err = tz.SetHomeTime(saveNow);
  4507 	err = User::SetHomeTime(saveNow);
  4512 	TEST2(err, KErrNone);
  4508 	TEST2(err, KErrNone);
       
  4509 
       
  4510 	// Get and print new home time
  4513 	now.HomeTime();
  4511 	now.HomeTime();
  4514 	now.FormatL(testString,(_L("%H:%T %1\\%2\\%3 %E")));
  4512 	now.FormatL(testString,(_L("%H:%T %1\\%2\\%3 %E")));
  4515 	TheTest.Printf(_L("Restored home time to - %S\n"), &testString);
  4513 	TheTest.Printf(_L("Restored home time to - %S\n"), &testString);
  4516 	
       
  4517 	CleanupStack::PopAndDestroy(); //tz
       
  4518 	}
  4514 	}
  4519 
  4515 
  4520 /**
  4516 /**
  4521 @SYMTestCaseID          SYSLIB-LOGENG-CT-0955
  4517 @SYMTestCaseID          SYSLIB-LOGENG-CT-0955
  4522 @SYMTestCaseDesc	    Tests that events can be changed to move them between recent lists
  4518 @SYMTestCaseDesc	    Tests that events can be changed to move them between recent lists