os/security/cryptoservices/certificateandkeymgmt/tx509/tx509main.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.
     1 /*
     2 * Copyright (c) 1998-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of the License "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description: 
    15 * TX509 entry point code
    16 *
    17 */
    18 
    19 
    20 #include <e32std.h>
    21 #include "tScriptSetup.h"
    22 #include "ValidateTest.h"
    23 #include "SyntaxTest.h"
    24 #include "CorruptionTest.h"
    25 #include "extensiontest.h"
    26 #include "comparisontest.h"
    27 
    28 LOCAL_C void callSetupAndRunL() // initialize and call example code under cleanup stack
    29     {
    30 	START_SCRIPT_LIST
    31 	SCRIPT_ITEM(CSyntaxTest, _L8("Syntax")),
    32 	SCRIPT_ITEM(CValidateTest, _L8("Validate")),
    33 	SCRIPT_ITEM(CCorruptionTest, _L8("Corruption")),	
    34 	SCRIPT_ITEM(CExtensionTest, _L8("Extension")),
    35 	SCRIPT_ITEM(CComparisonTest, _L8("Comparison"))
    36 	END_SCRIPT_LIST
    37 	
    38 	TDriveUnit sysDrive (RFs::GetSystemDrive());
    39 	TDriveName driveName(sysDrive.Name());
    40 	TBuf<64> scriptFile(driveName);
    41 	scriptFile.Append(_L("\\tx509\\scripts\\tx509.txt"));
    42 	
    43 	CTestSetup::CreateAndRunTestsL(theTestTypes, scriptFile, _L("tx509.log"));
    44     }
    45 
    46 GLDEF_C TInt E32Main() // main function called by E32
    47     {
    48 	__UHEAP_MARK;
    49 	CTrapCleanup* cleanup=CTrapCleanup::New(); // get clean-up stack
    50 	TRAP_IGNORE(callSetupAndRunL());
    51 	delete cleanup; // destroy clean-up stack
    52 	__UHEAP_MARKEND;
    53 	return 0; // and return
    54     }
    55