kerneltest/e32test/video/t_videomemory.cpp
branchRCL_3
changeset 256 c1f20ce4abcf
parent 80 597aaf25e343
child 257 3e88ff8f41d5
equal deleted inserted replaced
249:a179b74831c9 256:c1f20ce4abcf
   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));
   118 		*pChunkBase = KTestValue2;
   119 		*pChunkBase = KTestValue2;
   119 		test(KTestValue2 == *pChunkBase);
   120 		test(KTestValue2 == *pChunkBase);
   120 		// We should see the new value through the pMemory pointer!
   121 		// We should see the new value through the pMemory pointer!
   121 		if (pMemory)
   122 		if (pMemory)
   122 			{
   123 			{
   123 			test(KTestValue2 == *pMemory);
   124 			test(KTestValue2 == *pMemory);
   124 			}
   125 			}
   125         // print it after test as this will corrupt memory buffer
   126 	
   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));
   189 		test(KTestValue2 == *pChunkBase2);
   190 		test(KTestValue2 == *pChunkBase2);
   190 		*pChunkBase2 = KTestValue3;
   191 		*pChunkBase2 = KTestValue3;
   191 		test(KTestValue3 == *pChunkBase2);
   192 		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));
       
   194 		chunk2.Close();
   193 		chunk2.Close();
   195 		}
   194 		}
   196 	
   195 	
   197 	test.Next(_L("Checking Display Handle using second process"));
   196 	test.Next(_L("Checking Display Handle using second process"));
   198 	
   197