First public contribution.
1 // Copyright (c) 2004-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.
16 // MEMORY LEAK TESTING - Change and recompile to enable memory leak testing
17 // #define __MEMORY_LEAK_TESTING_ENABLED
26 #include "IpuTestUtils.h"
27 #include "CFileUriTest.h"
30 // Constants and definions
32 _LIT(KUriParserTestPanic, "T_FileUri");
33 _LIT(KUriTestTitle, "T_FileUri Test Harness");
35 GLDEF_C void Panic(TInt aPanic);
37 // Local/Global function implementations
39 GLDEF_C void Panic(TInt aPanic)
41 // Panic the client program.
43 User::Panic(KUriParserTestPanic,aPanic);
48 CIpuTestHarness* testHarness = CIpuTestHarness::NewL(KUriTestTitle);
49 CleanupStack::PushL(testHarness);
50 testHarness->DoResourceLeakTest(ETrue);
52 testHarness->LogIt(_L ("@SYMTestCaseID IWS-APPPROTOCOLS-INETPROTUTIL-T_FILEURIMAIN-0001 "));
54 CFileUriTest* fileUriTest = CFileUriTest::NewLC(testHarness);
55 #ifdef __MEMORY_LEAK_TESTING_ENABLED
56 CTestBase::MemoryLeakTestL(*fileUriTest,*testHarness);
58 fileUriTest->DoTestsL();
60 CleanupStack::PopAndDestroy(2, testHarness); //testHarness, fileUriTest
63 GLDEF_C TInt E32Main()
68 CTrapCleanup* tc=CTrapCleanup::New();
71 User::Panic(_L("Failed to complete test"),err);