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.
15 // Main test harness for t_wspcodec
21 // MEMORY LEAK TESTING - Change and recompile to enable memory leak testing
22 // #define __MEMORY_LEAK_TESTING_ENABLED
27 #include "IpuTestUtils.h"
29 #include "cwspdecodetest.h"
30 #include "cwspencodetest.h"
32 _LIT(KTestPanic, "WSPCodec");
33 _LIT(KTestTitle, "T_WSPCodec");
35 GLDEF_C void Panic(TInt aPanic);
38 GLDEF_C void Panic(TInt aPanic)
40 User::Panic(KTestPanic,aPanic);
45 CIpuTestHarness* testHarness = CIpuTestHarness::NewL(KTestTitle);
46 CleanupStack::PushL(testHarness);
47 testHarness->DoResourceLeakTest(ETrue);
49 testHarness->LogIt(_L ("@SYMTestCaseID IWS-APPPROTOCOLS-INETPROTUTIL-T_WSPCODEC-0001 "));
51 CWSPDecodeTest* decodeTest = CWSPDecodeTest::NewLC(testHarness);
52 #ifdef __MEMORY_LEAK_TESTING_ENABLED
53 CTestBase::MemoryLeakTestL(*decodeTest,*testHarness);
55 decodeTest->DoTestsL();
57 CWSPEncodeTest* encodeTest = CWSPEncodeTest::NewLC(testHarness);
58 #ifdef __MEMORY_LEAK_TESTING_ENABLED
59 CTestBase::MemoryLeakTestL(*encodeTest,*testHarness);
61 encodeTest->DoTestsL();
63 CleanupStack::PopAndDestroy(3, testHarness);
66 GLDEF_C TInt E32Main()
71 CTrapCleanup* tc=CTrapCleanup::New();
74 User::Panic(_L("Test Fail"),err);