graphicsresourceservices/graphicsresourceimplementation/test/src/tsgimagegeneric.cpp
changeset 111 29ddb8a72f0e
parent 36 01a6848ebfd7
equal deleted inserted replaced
110:7f25ef56562d 111:29ddb8a72f0e
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
   578 	TSgImageInfo getInfo2;
   578 	TSgImageInfo getInfo2;
   579 	
   579 	
   580 	image1.GetInfo(getInfo1);
   580 	image1.GetInfo(getInfo1);
   581 	image2.GetInfo(getInfo2);
   581 	image2.GetInfo(getInfo2);
   582 	
   582 	
   583 	TEST(CompareInfos(getInfo1, getInfo2));
   583 	TEST(CompareInfos(info1, getInfo1));
       
   584 	TEST(getInfo1.iPixelFormat == getInfo2.iPixelFormat
       
   585 		 && getInfo1.iSizeInPixels == getInfo2.iSizeInPixels
       
   586 		 && getInfo1.iUsage == getInfo2.iUsage);
   584 	
   587 	
   585 	if (iEnableConformanceTests)
   588 	if (iEnableConformanceTests)
   586 		{
   589 		{
   587 		//opening image in a second thread in the current process
   590 		//opening image in a second thread in the current process
   588 		TSgThreadTestInfo threadInfo(id1, info1, ESgresSecondThreadOpenImage);
   591 		TSgThreadTestInfo threadInfo(id1, info1, ESgresSecondThreadOpenImage);
   600 		TEST(testResult & ESixthTestPassed);
   603 		TEST(testResult & ESixthTestPassed);
   601 		TEST(testResult & ESeventhTestPassed);
   604 		TEST(testResult & ESeventhTestPassed);
   602 		TEST(testResult & EEighthTestPassed);
   605 		TEST(testResult & EEighthTestPassed);
   603 			
   606 			
   604 		//opening image in a second process	
   607 		//opening image in a second process	
   605 		TSgProcessTestInfo processInfo(id1, info1, ESgresSecondProcessOpenImage);
   608 		TSgProcessTestInfo processInfo(id1, getInfo1, ESgresSecondProcessOpenImage);
   606 		TRAP(err, testResult = CreateSecondProcessAndDoTestL(KSecondProcess, processInfo));
   609 		TRAP(err, testResult = CreateSecondProcessAndDoTestL(KSecondProcess, processInfo));
   607 		TEST(err == KErrNone);
   610 		TEST(err == KErrNone);
   608 		TEST(testResult >= 0);
   611 		TEST(testResult >= 0);
   609 		
   612 		
   610 		TEST(testResult & EFirstTestPassed);	
   613 		TEST(testResult & EFirstTestPassed);	
   612 		TEST(testResult & EThirdTestPassed);
   615 		TEST(testResult & EThirdTestPassed);
   613 		TEST(testResult & EFourthTestPassed);
   616 		TEST(testResult & EFourthTestPassed);
   614 		TEST(testResult & EFifthTestPassed);
   617 		TEST(testResult & EFifthTestPassed);
   615 		TEST(testResult & ESixthTestPassed);
   618 		TEST(testResult & ESixthTestPassed);
   616 		TEST(testResult & ESeventhTestPassed);
   619 		TEST(testResult & ESeventhTestPassed);
   617 		TEST(testResult & EEighthTestPassed);
       
   618 		}
   620 		}
   619     
   621     
   620 	image1.Close();
   622 	image1.Close();
   621 	image2.Close();
   623 	image2.Close();
   622 	
   624