diff -r c1f20ce4abcf -r 3e88ff8f41d5 kerneltest/e32test/demandpaging/t_chunkheapcreate.cpp --- a/kerneltest/e32test/demandpaging/t_chunkheapcreate.cpp Tue Aug 31 16:34:26 2010 +0300 +++ b/kerneltest/e32test/demandpaging/t_chunkheapcreate.cpp Wed Sep 01 12:34:56 2010 +0100 @@ -64,9 +64,10 @@ UpdatePaged(aPaged); RHeap* heap = UserHeap::ChunkHeap(aCreateInfo); + test_NotNull(heap); RChunk chunk; - chunk.SetHandle(((TestHybridHeap*) heap)->ChunkHandle()); + chunk.SetHandle(heap->ChunkHandle()); TBool paged = chunk.IsPaged(); chunk.Close(); return (aPaged == paged); @@ -214,8 +215,8 @@ { test.Printf(_L("RHeap not created\n")); } - test.Printf(_L("chunkHandle = %d heapHandle = %d\n"),chunky.Handle(), ((TestHybridHeap*) heap)->ChunkHandle()); - test_Equal(chunky.Handle(), ((TestHybridHeap*) heap)->ChunkHandle()); + test.Printf(_L("chunkHandle = %d heapHandle = %d\n"),chunky.Handle(), heap->ChunkHandle()); + test_Equal(chunky.Handle(), heap->ChunkHandle()); heap->Close(); } @@ -237,9 +238,9 @@ { test.Printf(_L("RHeap not created\n")); } - test.Printf(_L("chunkHandle = %d heapHandle = %d\n"),chunky.Handle(), ((TestHybridHeap*) heap)->ChunkHandle()); + test.Printf(_L("chunkHandle = %d heapHandle = %d\n"),chunky.Handle(), heap->ChunkHandle()); TBool isSame = EFalse; - if (chunky.Handle() == ((TestHybridHeap*) heap)->ChunkHandle()) + if (chunky.Handle() == heap->ChunkHandle()) isSame = ETrue; test_Equal(EFalse, isSame); heap->Close(); @@ -303,7 +304,7 @@ heap = (RHeap*)UserHeap::ChunkHeap(createInfo); test_NotNull(heap); RChunk chunk; - chunk.SetHandle(((TestHybridHeap*) heap)->ChunkHandle()); + chunk.SetHandle(heap->ChunkHandle()); TInt* numBuf = new TInt[gPageSize]; test_NotNull(numBuf); test.Printf(_L("chunkSize = %d\n"), chunk.Size()); @@ -322,7 +323,7 @@ heap = (RHeap*)UserHeap::ChunkHeap(createInfo); test_NotNull(heap); RChunk chunk; - chunk.SetHandle(((TestHybridHeap*) heap)->ChunkHandle()); + chunk.SetHandle(heap->ChunkHandle()); TInt* numBuf = new TInt[gPageSize]; test_Equal(NULL, numBuf); @@ -341,7 +342,7 @@ heap = (RHeap*)UserHeap::ChunkHeap(createInfo); TInt heapAddr = (TInt)heap; RChunk chunk; - chunk.SetHandle(((TestHybridHeap*) heap)->ChunkHandle()); + chunk.SetHandle(heap->ChunkHandle()); test_Equal((TInt)chunk.Base() + 8, heapAddr); test_NotNull(heap); heap->Close();