sl@0: // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // t_main sl@0: // Main test harness for t_tinternetdate sl@0: // sl@0: // sl@0: sl@0: sl@0: sl@0: // MEMORY LEAK TESTING - Change and recompile to enable memory leak testing sl@0: // #define __MEMORY_LEAK_TESTING_ENABLED sl@0: sl@0: sl@0: sl@0: #include sl@0: #include "IpuTestUtils.h" sl@0: sl@0: #include "cconverttorfc1123formtest.h" sl@0: sl@0: _LIT(KTestPanic, "TInetDate"); sl@0: _LIT(KTestTitle, "T_TInternetDate"); sl@0: sl@0: GLDEF_C void Panic(TInt aPanic); sl@0: sl@0: sl@0: GLDEF_C void Panic(TInt aPanic) sl@0: { sl@0: User::Panic(KTestPanic,aPanic); sl@0: } sl@0: sl@0: GLDEF_C void TestL() sl@0: { sl@0: CIpuTestHarness* testHarness = CIpuTestHarness::NewL(KTestTitle); sl@0: CleanupStack::PushL(testHarness); sl@0: testHarness->DoResourceLeakTest(ETrue); sl@0: sl@0: testHarness->LogIt(_L ("@SYMTestCaseID IWS-APPPROTOCOLS-INETPROTUTIL-T_TINTERNETDATE-0001 ")); sl@0: sl@0: CConvertToRfc1123FormTest* convertToRfc1123FormTest = CConvertToRfc1123FormTest::NewLC(testHarness); sl@0: #ifdef __MEMORY_LEAK_TESTING_ENABLED sl@0: CTestBase::MemoryLeakTestL(*convertToRfc1123FormTest,*testHarness); sl@0: #endif sl@0: convertToRfc1123FormTest->DoTestsL(); sl@0: sl@0: CleanupStack::PopAndDestroy(2, testHarness); sl@0: } sl@0: sl@0: GLDEF_C TInt E32Main() sl@0: // sl@0: // Main function sl@0: { sl@0: __UHEAP_MARK; sl@0: CTrapCleanup* tc=CTrapCleanup::New(); sl@0: TRAPD(err,TestL()); sl@0: if (err!=KErrNone) sl@0: User::Panic(_L("Test Fail"),err); sl@0: delete tc; sl@0: __UHEAP_MARKEND; sl@0: return KErrNone; sl@0: } sl@0: