Update contrib.
1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
18 #include "ctestbase.h"
21 EXPORT_C void CTestBase::MemoryLeakTestL(CTestBase& aTest, CIpuTestHarness& aTestHarness)
23 // set aTestHarness to be in memoryleak mode
24 aTestHarness.SetTestMode(CIpuTestHarness::ETestModeMemoryLeak);
27 _LIT(KMemoryLeakMessage, "Memory Leak Testing on allocation %d\n");
30 aTestHarness.LogIt(KMemoryLeakMessage, ii);
33 TRAPD(err,aTest.DoTestsL());
37 // Break out if the test passes successfully;
40 if (err != KErrNoMemory)
42 // set aTestHarness back to normal mode
43 aTestHarness.SetTestMode(CIpuTestHarness::ETestModeNormal);
44 User::LeaveIfError(err);
48 // set aTestHarness back to normal mode
49 aTestHarness.SetTestMode(CIpuTestHarness::ETestModeNormal);