kerneltest/e32test/video/t_videomemory.cpp
branchRCL_3
changeset 20 597aaf25e343
parent 0 a41df078684a
child 43 c1f20ce4abcf
equal deleted inserted replaced
19:4a8fed1c0ef6 20:597aaf25e343
   113 		test(0 != handle);
   113 		test(0 != handle);
   114 		ret = chunk.SetReturnedHandle(handle);
   114 		ret = chunk.SetReturnedHandle(handle);
   115 		test(KErrNone == ret);
   115 		test(KErrNone == ret);
   116 		
   116 		
   117 		pChunkBase = reinterpret_cast<TUint32 *>(chunk.Base());
   117 		pChunkBase = reinterpret_cast<TUint32 *>(chunk.Base());
   118 		test.Printf(_L("Display Memory Address = %08x\n"), reinterpret_cast<TUint>(pChunkBase));
       
   119 		*pChunkBase = KTestValue2;
   118 		*pChunkBase = KTestValue2;
   120 		test(KTestValue2 == *pChunkBase);
   119 		test(KTestValue2 == *pChunkBase);
   121 		// We should see the new value through the pMemory pointer!
   120 		// We should see the new value through the pMemory pointer!
   122 		if (pMemory)
   121 		if (pMemory)
   123 			{
   122 			{
   124 			test(KTestValue2 == *pMemory);
   123 			test(KTestValue2 == *pMemory);
   125 			}
   124 			}
   126 	
   125         // print it after test as this will corrupt memory buffer
       
   126 		test.Printf(_L("Display Memory Address = %08x\n"), reinterpret_cast<TUint>(pChunkBase));
   127 		}
   127 		}
   128 	else
   128 	else
   129 		{
   129 		{
   130 		test.Printf(_L("Memory Handle not available from HAL - no point in further testing\n"));
   130 		test.Printf(_L("Memory Handle not available from HAL - no point in further testing\n"));
   131 		return;
   131 		return;
   184 		RChunk chunk2;
   184 		RChunk chunk2;
   185 		ret = chunk2.SetReturnedHandle(handle);
   185 		ret = chunk2.SetReturnedHandle(handle);
   186 		test(KErrNone == ret);
   186 		test(KErrNone == ret);
   187 		
   187 		
   188 		pChunkBase2 = reinterpret_cast<TUint32 *>(chunk2.Base());
   188 		pChunkBase2 = reinterpret_cast<TUint32 *>(chunk2.Base());
   189 		test.Printf(_L("Display Memory Address = %08x\n"), reinterpret_cast<TUint>(pChunkBase));
       
   190 		test(KTestValue2 == *pChunkBase2);
   189 		test(KTestValue2 == *pChunkBase2);
   191 		*pChunkBase2 = KTestValue3;
   190 		*pChunkBase2 = KTestValue3;
   192 		test(KTestValue3 == *pChunkBase2);
   191 		test(KTestValue3 == *pChunkBase2);
       
   192         // print it after test as this will corrupt memory buffer
       
   193         test.Printf(_L("Display Memory Address = %08x\n"), reinterpret_cast<TUint>(pChunkBase));
   193 		chunk2.Close();
   194 		chunk2.Close();
   194 		}
   195 		}
   195 	
   196 	
   196 	test.Next(_L("Checking Display Handle using second process"));
   197 	test.Next(_L("Checking Display Handle using second process"));
   197 	
   198