genericservices/httputils/Test/t_tinternetdate/t_main.cpp
changeset 0 e4d67989cc36
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     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".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // t_main
       
    15 // Main test harness for t_tinternetdate
       
    16 // 
       
    17 //
       
    18 
       
    19 
       
    20 
       
    21 // MEMORY LEAK TESTING - Change and recompile to enable memory leak testing
       
    22 // #define __MEMORY_LEAK_TESTING_ENABLED
       
    23 
       
    24 
       
    25 
       
    26 #include <e32base.h>
       
    27 #include "IpuTestUtils.h"
       
    28 
       
    29 #include "cconverttorfc1123formtest.h"
       
    30 
       
    31 _LIT(KTestPanic, "TInetDate");
       
    32 _LIT(KTestTitle, "T_TInternetDate");
       
    33 
       
    34 GLDEF_C void Panic(TInt aPanic);
       
    35 
       
    36 
       
    37 GLDEF_C void Panic(TInt aPanic)
       
    38 	{
       
    39 	User::Panic(KTestPanic,aPanic);
       
    40 	}
       
    41 
       
    42 GLDEF_C void TestL()
       
    43 	{
       
    44 	CIpuTestHarness* testHarness = CIpuTestHarness::NewL(KTestTitle);
       
    45 	CleanupStack::PushL(testHarness);
       
    46 	testHarness->DoResourceLeakTest(ETrue);
       
    47 
       
    48 	testHarness->LogIt(_L ("@SYMTestCaseID IWS-APPPROTOCOLS-INETPROTUTIL-T_TINTERNETDATE-0001 "));
       
    49 
       
    50 	CConvertToRfc1123FormTest* convertToRfc1123FormTest = CConvertToRfc1123FormTest::NewLC(testHarness);
       
    51 #ifdef __MEMORY_LEAK_TESTING_ENABLED
       
    52 	CTestBase::MemoryLeakTestL(*convertToRfc1123FormTest,*testHarness);
       
    53 #endif
       
    54 	convertToRfc1123FormTest->DoTestsL();
       
    55 
       
    56 	CleanupStack::PopAndDestroy(2, testHarness);
       
    57 	}
       
    58 
       
    59 GLDEF_C TInt E32Main()
       
    60 //
       
    61 // Main function
       
    62 	{
       
    63 	__UHEAP_MARK;
       
    64 	CTrapCleanup* tc=CTrapCleanup::New();
       
    65 	TRAPD(err,TestL());
       
    66 	if (err!=KErrNone)
       
    67 		User::Panic(_L("Test Fail"),err);
       
    68 	delete tc;
       
    69 	__UHEAP_MARKEND;
       
    70 	return KErrNone;
       
    71 	}
       
    72