os/ossrv/genericservices/httputils/Test/t_tinternetdate/t_main.cpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// t_main
sl@0
    15
// Main test harness for t_tinternetdate
sl@0
    16
// 
sl@0
    17
//
sl@0
    18
sl@0
    19
sl@0
    20
sl@0
    21
// MEMORY LEAK TESTING - Change and recompile to enable memory leak testing
sl@0
    22
// #define __MEMORY_LEAK_TESTING_ENABLED
sl@0
    23
sl@0
    24
sl@0
    25
sl@0
    26
#include <e32base.h>
sl@0
    27
#include "IpuTestUtils.h"
sl@0
    28
sl@0
    29
#include "cconverttorfc1123formtest.h"
sl@0
    30
sl@0
    31
_LIT(KTestPanic, "TInetDate");
sl@0
    32
_LIT(KTestTitle, "T_TInternetDate");
sl@0
    33
sl@0
    34
GLDEF_C void Panic(TInt aPanic);
sl@0
    35
sl@0
    36
sl@0
    37
GLDEF_C void Panic(TInt aPanic)
sl@0
    38
	{
sl@0
    39
	User::Panic(KTestPanic,aPanic);
sl@0
    40
	}
sl@0
    41
sl@0
    42
GLDEF_C void TestL()
sl@0
    43
	{
sl@0
    44
	CIpuTestHarness* testHarness = CIpuTestHarness::NewL(KTestTitle);
sl@0
    45
	CleanupStack::PushL(testHarness);
sl@0
    46
	testHarness->DoResourceLeakTest(ETrue);
sl@0
    47
sl@0
    48
	testHarness->LogIt(_L ("@SYMTestCaseID IWS-APPPROTOCOLS-INETPROTUTIL-T_TINTERNETDATE-0001 "));
sl@0
    49
sl@0
    50
	CConvertToRfc1123FormTest* convertToRfc1123FormTest = CConvertToRfc1123FormTest::NewLC(testHarness);
sl@0
    51
#ifdef __MEMORY_LEAK_TESTING_ENABLED
sl@0
    52
	CTestBase::MemoryLeakTestL(*convertToRfc1123FormTest,*testHarness);
sl@0
    53
#endif
sl@0
    54
	convertToRfc1123FormTest->DoTestsL();
sl@0
    55
sl@0
    56
	CleanupStack::PopAndDestroy(2, testHarness);
sl@0
    57
	}
sl@0
    58
sl@0
    59
GLDEF_C TInt E32Main()
sl@0
    60
//
sl@0
    61
// Main function
sl@0
    62
	{
sl@0
    63
	__UHEAP_MARK;
sl@0
    64
	CTrapCleanup* tc=CTrapCleanup::New();
sl@0
    65
	TRAPD(err,TestL());
sl@0
    66
	if (err!=KErrNone)
sl@0
    67
		User::Panic(_L("Test Fail"),err);
sl@0
    68
	delete tc;
sl@0
    69
	__UHEAP_MARKEND;
sl@0
    70
	return KErrNone;
sl@0
    71
	}
sl@0
    72