loggingservices/eventlogger/test/src/t_logview1.cpp
changeset 51 7d4490026038
parent 17 55f2396f6d25
child 55 44f437012c90
equal deleted inserted replaced
40:b8bdbc8f59c7 51:7d4490026038
    10 //
    10 //
    11 // Contributors:
    11 // Contributors:
    12 //
    12 //
    13 // Description:
    13 // Description:
    14 //
    14 //
    15 // If this test starts failing, then go and check the CentralRepository private data cage 
       
    16 // (c:\\private\\10202be9 or z:\\private\\10202be9) if 101f401d.txt file is there.
       
    17 // If it is then delete it and try the test again.
       
    18 // (The problem is that if there is an existing 101f401d.txt file, then the contact match count value
       
    19 // will be loaded from that file, not from the LogEng resource file)
       
    20 //
       
    21 
       
    22 #include <s32file.h>
    15 #include <s32file.h>
    23 #include <s32mem.h>
    16 #include <s32mem.h>
    24 #include <e32math.h>
    17 #include <e32math.h>
    25 #include "t_logutil2.h"
    18 #include "t_logutil2.h"
    26 #include <logview.h>
    19 #include <logview.h>
  2488 	aClient.AddEvent(*event, active->iStatus);
  2481 	aClient.AddEvent(*event, active->iStatus);
  2489 	CActiveScheduler::Start();
  2482 	CActiveScheduler::Start();
  2490 	TEST2(active->iStatus.Int(), KErrNone);
  2483 	TEST2(active->iStatus.Int(), KErrNone);
  2491 	TLogId testId = event->Id();
  2484 	TLogId testId = event->Id();
  2492 	event->SetNumber(KNullDesC);
  2485 	event->SetNumber(KNullDesC);
       
  2486 	TheTest.Printf(_L("  Event flags: 0x%X\r\n"), event->Flags());
  2493 
  2487 
  2494 	TInt count;
  2488 	TInt count;
  2495 	for(count = 0; count < KTestEventNum; count++)
  2489 	for(count = 0; count < KTestEventNum; count++)
  2496 		{
  2490 		{
  2497 		event->SetContact(count + 1);
  2491 		event->SetContact(count + 1);
  2525 	event->SetId(testId);
  2519 	event->SetId(testId);
  2526 	aClient.GetEvent(*event, active->iStatus);
  2520 	aClient.GetEvent(*event, active->iStatus);
  2527 	CActiveScheduler::Start();
  2521 	CActiveScheduler::Start();
  2528 	TEST2(active->iStatus.Int(), KErrNone);
  2522 	TEST2(active->iStatus.Int(), KErrNone);
  2529 	if( TheMatchingIsEnabled)
  2523 	if( TheMatchingIsEnabled)
  2530 		{
  2524 		{//This check will fail if the first AddEvent() call in this function didn't perform contact matching
  2531 		TEST2(event->Flags(), KLogEventContactSearched);
  2525 		TEST2(event->Flags(), KLogEventContactSearched);
  2532 		}
  2526 		}
  2533 	else
  2527 	else
  2534 		{
  2528 		{
  2535 		TEST2(event->Flags(), 0);
  2529 		TEST2(event->Flags(), 0);