os/security/crypto/weakcryptospi/test/tpbe/tpbemain.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/security/crypto/weakcryptospi/test/tpbe/tpbemain.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,59 @@
     1.4 +/*
     1.5 +* Copyright (c) 1998-2010 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 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +#include <e32base.h>
    1.23 +#include "t_testhandler.h"
    1.24 +#include "t_testsetup.h"
    1.25 +#include "tScriptTests.h"
    1.26 +#include "tactionelement.h"
    1.27 +#include "tactionset.h"
    1.28 +#include "tactionsetreadpfs.h"
    1.29 +#include "tactionsetwritepfs.h"
    1.30 +#include "texternpbeparams.h"
    1.31 +
    1.32 +LOCAL_D void callExampleL() // initialize and call example code under cleanup stack
    1.33 +    {
    1.34 +    START_SCRIPT_LIST
    1.35 +	SCRIPT_ITEM(CActionElement,_L8("Element")),
    1.36 +	SCRIPT_ITEM(CActionSet,_L8("Set")),
    1.37 +	SCRIPT_ITEM(CActionSetReadPFS,_L8("ReadPFS")),
    1.38 +	SCRIPT_ITEM(CActionSetWritePFS,_L8("WritePFS")),
    1.39 +	SCRIPT_ITEM(CExternPbeParams, _L8("ExternPbeParams"))
    1.40 +    END_SCRIPT_LIST
    1.41 +    
    1.42 +    TDriveUnit sysDrive (RFs::GetSystemDrive());
    1.43 +    
    1.44 +    TBuf<24> scriptFile (sysDrive.Name());
    1.45 +    scriptFile.Append(_L("\\tpbe\\tpbetests_v2.txt"));
    1.46 +    
    1.47 +    TBuf<24> logFile (sysDrive.Name());
    1.48 +    logFile.Append(_L("\\tpbetestsv2.log"));
    1.49 +    
    1.50 +	CTestSetup::CreateAndRunTestsL(theTestTypes, scriptFile, logFile);
    1.51 +    }
    1.52 +
    1.53 +GLDEF_C TInt E32Main() // main function called by E32
    1.54 +    {
    1.55 +	__UHEAP_MARK;
    1.56 +	CTrapCleanup* cleanup = CTrapCleanup::New(); // get clean-up stack
    1.57 +	TRAPD(error, callExampleL());
    1.58 +	__ASSERT_ALWAYS(!error,User::Panic(_L("tpbe"),error));
    1.59 +	delete cleanup; // destroy clean-up stack
    1.60 +	__UHEAP_MARKEND;
    1.61 +	return 0;
    1.62 +    }