cryptoservices/asnpkcs/test/tasnpkcsmain.cpp
changeset 0 2c201484c85f
child 8 35751d3474b7
equal deleted inserted replaced
-1:000000000000 0:2c201484c85f
       
     1 /*
       
     2 * Copyright (c) 1998-2009 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 * tasnpkcs.cpp
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #include <e32base.h>
       
    21 #include "t_testhandler.h"
       
    22 #include "t_testsetup.h"
       
    23 #include "tScriptTests.h"
       
    24 #include "tactiondecodepkcs5.h"
       
    25 #include "tactiontestpkcs8.h"
       
    26 
       
    27 LOCAL_D void callExampleL() // initialize and call example code under cleanup stack
       
    28     {
       
    29     START_SCRIPT_LIST
       
    30 	SCRIPT_ITEM(CActionDecodePKCS5,_L8("pkcs5")),
       
    31 	SCRIPT_ITEM(CActionTestPKCS8,_L8("testpkcs8"))
       
    32 	END_SCRIPT_LIST
       
    33 
       
    34 	_LIT(KScript, "c\\tasnpkcs\\scripts\\tasnpkcstests.txt");
       
    35 	_LIT(KLog, "tasnpkcs.log");
       
    36 	CTestSetup::CreateAndRunTestsL(theTestTypes, KScript, KLog);
       
    37     }
       
    38 
       
    39 GLDEF_C TInt E32Main() // main function called by E32
       
    40     {
       
    41 	__UHEAP_MARK;
       
    42 	CTrapCleanup* cleanup = CTrapCleanup::New(); // get clean-up stack
       
    43 	TRAPD(error, callExampleL());
       
    44 	__ASSERT_ALWAYS(!error,User::Panic(_L("tasnpkcs"),error));
       
    45 	delete cleanup; // destroy clean-up stack
       
    46 	__UHEAP_MARKEND;
       
    47 	return 0;
       
    48     }