os/security/cryptoservices/asnpkcs/test/tasnpkcsmain.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/security/cryptoservices/asnpkcs/test/tasnpkcsmain.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,48 @@
     1.4 +/*
     1.5 +* Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of the License "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description: 
    1.18 +* tasnpkcs.cpp
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +#include <e32base.h>
    1.24 +#include "t_testhandler.h"
    1.25 +#include "t_testsetup.h"
    1.26 +#include "tScriptTests.h"
    1.27 +#include "tactiondecodepkcs5.h"
    1.28 +#include "tactiontestpkcs8.h"
    1.29 +
    1.30 +LOCAL_D void callExampleL() // initialize and call example code under cleanup stack
    1.31 +    {
    1.32 +    START_SCRIPT_LIST
    1.33 +	SCRIPT_ITEM(CActionDecodePKCS5,_L8("pkcs5")),
    1.34 +	SCRIPT_ITEM(CActionTestPKCS8,_L8("testpkcs8"))
    1.35 +	END_SCRIPT_LIST
    1.36 +
    1.37 +	_LIT(KScript, "c\\tasnpkcs\\scripts\\tasnpkcstests.txt");
    1.38 +	_LIT(KLog, "tasnpkcs.log");
    1.39 +	CTestSetup::CreateAndRunTestsL(theTestTypes, KScript, KLog);
    1.40 +    }
    1.41 +
    1.42 +GLDEF_C TInt E32Main() // main function called by E32
    1.43 +    {
    1.44 +	__UHEAP_MARK;
    1.45 +	CTrapCleanup* cleanup = CTrapCleanup::New(); // get clean-up stack
    1.46 +	TRAPD(error, callExampleL());
    1.47 +	__ASSERT_ALWAYS(!error,User::Panic(_L("tasnpkcs"),error));
    1.48 +	delete cleanup; // destroy clean-up stack
    1.49 +	__UHEAP_MARKEND;
    1.50 +	return 0;
    1.51 +    }