kerneltest/e32test/heap/t_fail.cpp
branchRCL_3
changeset 43 c1f20ce4abcf
parent 6 0173bcd7697c
child 44 3e88ff8f41d5
equal deleted inserted replaced
42:a179b74831c9 43:c1f20ce4abcf
   225 
   225 
   226 	// Prepare for __UHEAP tests
   226 	// Prepare for __UHEAP tests
   227 	__UHEAP_RESET;
   227 	__UHEAP_RESET;
   228 	__UHEAP_MARK;
   228 	__UHEAP_MARK;
   229 
   229 
       
   230 	// Make sure that we can retrieve the failure type set with __UHEAP_SETFAIL
       
   231 	test.Next(_L("Set and get user heap failure simulation mode"));
       
   232 	__UHEAP_SETFAIL(RHeap::EFailNext, 1);
       
   233 	test(User::__DbgGetAllocFail(EFalse) == RHeap::EFailNext);
       
   234 	__UHEAP_SETFAIL(RHeap::ENone, 0);
       
   235 
       
   236 	// Make sure that we can retrieve the failure type set with __KHEAP_SETFAIL
       
   237 	test.Next(_L("Set and get kernel heap failure simulation mode"));
       
   238 	__KHEAP_SETFAIL(RHeap::EFailNext, 1);
       
   239 	test(User::__DbgGetAllocFail(ETrue) == RHeap::EFailNext);
       
   240 	__KHEAP_SETFAIL(RHeap::ENone, 0);
       
   241 
   230 	// Prepare for __RHEAP tests
   242 	// Prepare for __RHEAP tests
   231 	TInt pageSize;
   243 	TInt pageSize;
   232 	test_KErrNone(HAL::Get(HAL::EMemoryPageSize, pageSize));
   244 	test_KErrNone(HAL::Get(HAL::EMemoryPageSize, pageSize));
   233 	
   245 	
   234 	RChunk heapChunk;
   246 	RChunk heapChunk;