Update contrib.
     2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
 
     4 * This component and the accompanying materials are made available
 
     5 * under the terms of the License "Eclipse Public License v1.0"
 
     6 * which accompanies this distribution, and is available
 
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 
     9 * Initial Contributors:
 
    10 * Nokia Corporation - initial contribution.
 
    15 * Framework function for running hardware key store OOM tests.
 
    24 #include "kmslddtest.h"
 
    27 void RunOomTest(void (*aAllocFunc)(TRequestStatus&), void (*aFreeFunc)())
 
    29 	Test harness calls an allocating function in OOM, ensuring that no resources are leaked.
 
    31 	@param	aAllocFunc		This allocating function is called in OOM.  It is expected
 
    32 							to fail with KErrNoMemory, in which case no memory is leaked,
 
    33 							or to succeed with KErrNone.
 
    34 	@param	aFreeFunc		Cleans up resources allocated with aAllocFunc after aAllocFunc
 
    38 	TInt r = KErrNoMemory;
 
    39 	for (TInt i = 1; r == KErrNoMemory; ++i)
 
    44 		__KHEAP_SETFAIL(RAllocator::EDeterministic, i);
 
    47 		User::WaitForRequest(rs);
 
    50 		test(r == KErrNone || r == KErrNoMemory);