genericservices/mimerecognitionfw/tef/T_MimeStep.cpp
changeset 59 09fa7c3c5079
parent 52 bf6a71c50e42
equal deleted inserted replaced
52:bf6a71c50e42 59:09fa7c3c5079
   135 	TDataType dataType= iData->MimeType();
   135 	TDataType dataType= iData->MimeType();
   136 	TInt confidenceVal=iData->Confidence();
   136 	TInt confidenceVal=iData->Confidence();
   137 	TEST(dataType.Uid().iUid==0);
   137 	TEST(dataType.Uid().iUid==0);
   138 	TEST(confidenceVal==0);
   138 	TEST(confidenceVal==0);
   139 	INFO_PRINTF2(_L("Val of confidence  %d"), confidenceVal);
   139 	INFO_PRINTF2(_L("Val of confidence  %d"), confidenceVal);
       
   140 	//New tests
       
   141 	TInt bufSize = iData->PreferredBufSize();
       
   142 	TEST(bufSize==0);
       
   143 	INFO_PRINTF2(_L("Val of Preferred buffer size  %d"), bufSize);
       
   144 	INFO_PRINTF1(_L("Testing default constructor of TDataTypeWithPriority"));
       
   145 	TDataTypeWithPriority dataTypeWithPriority = TDataTypeWithPriority();
   140 	CleanupStack::PopAndDestroy(confAndMimeDataRec);	
   146 	CleanupStack::PopAndDestroy(confAndMimeDataRec);	
   141 }
   147 }
   142 
   148 
   143 
   149 
   144 /**
   150 /**
   304 		{
   310 		{
   305 		testRecognizer((*tempListOfRecognizers)[ii]);
   311 		testRecognizer((*tempListOfRecognizers)[ii]);
   306 		}
   312 		}
   307 
   313 
   308 	CleanupStack::PopAndDestroy(1); // tmpListOfRecogniszers
   314 	CleanupStack::PopAndDestroy(1); // tmpListOfRecogniszers
   309 
   315 	
       
   316 	//New test
       
   317 	INFO_PRINTF1(_L("Testing index([]) operator"));
       
   318 	const CApaScanningDataRecognizer::TRecognizer& testDataRecognizer=(*iRecognizer)[0];
       
   319 	TUid uid1 =  testDataRecognizer.iUid;
       
   320 	TUid uid2 = ((*iRecognizer)[0]).iUid;
       
   321 	TEST(uid1==uid2);
   310 //for testing ecom style plugin
   322 //for testing ecom style plugin
   311 INFO_PRINTF1(_L("Testing the ecom style TTESTECOMDATAREC recognizer is loaded or not"));
   323 INFO_PRINTF1(_L("Testing the ecom style TTESTECOMDATAREC recognizer is loaded or not"));
   312 	CApaScanningDataRecognizer::TRecognizer testEcomDataRecognizer;
   324 	CApaScanningDataRecognizer::TRecognizer testEcomDataRecognizer;
   313 	testEcomDataRecognizer.iUid=KTestEcomDataRecognizerUid;
   325 	testEcomDataRecognizer.iUid=KTestEcomDataRecognizerUid;
   314 	testEcomDataRecognizer.iDrive=25;
   326 	testEcomDataRecognizer.iDrive=25;
   484 		TEST(dataType==TDataType(KWordAppUid));
   496 		TEST(dataType==TDataType(KWordAppUid));
   485 		TEST(err==KErrNone);
   497 		TEST(err==KErrNone);
   486 	CleanupStack::PopAndDestroy(buf); // buf
   498 	CleanupStack::PopAndDestroy(buf); // buf
   487 
   499 
   488 	delete iRecognizer;
   500 	delete iRecognizer;
   489 	iRecongnizer = 0;
       
   490 	}
   501 	}
   491 
   502 
   492 CT_MimeStep::~CT_MimeStep()
   503 CT_MimeStep::~CT_MimeStep()
   493 /**
   504 /**
   494    Destructor
   505    Destructor