cryptoservices/filebasedcertificateandkeystores/test/tcertapps/t_certapps.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 10 Sep 2009 14:01:51 +0300
changeset 8 35751d3474b7
parent 0 2c201484c85f
permissions -rw-r--r--
Revision: 200935

/*
* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: 
*
*/


/**
 @file
*/

#include <e32test.h>
#include <e32std.h>
#include "t_testhandler.h"
#include "tscriptandhardcoded.h"
#include "t_certapps_defs.h"

#include "t_certapps_actions.h"


LOCAL_D void DoTests()
	{	
	START_SCRIPT_LIST
	SCRIPT_ITEM(CTestWrapper<CInitManager>, KInitManager),
	SCRIPT_ITEM(CTestWrapper<CDestroyManager>, KDestroyManager),
	SCRIPT_ITEM(CTestWrapper<CClearAllApps>, KClearAllApps),
	SCRIPT_ITEM(CTestWrapper<CAddApp>, KAddApp),
	SCRIPT_ITEM(CTestWrapper<CRemoveApp>, KRemoveApp),
	SCRIPT_ITEM(CTestWrapper<CAppCount>, KAppCount),
	SCRIPT_ITEM(CTestWrapper<CGetApplications>, KGetApplications),
	SCRIPT_ITEM(CTestWrapper<CGetApp>, KGetApp)
	END_SCRIPT_LIST

	
	TDriveUnit sysDrive (RFs::GetSystemDrive());
	TBuf<64> scriptFile (sysDrive.Name());
	scriptFile.Append(_L("\\tcertapps\\scripts\\script1.txt"));
	
	_LIT(KLog, "tcertapps.log");
	CScriptSetup::CreateAndRunTestsL(theTestTypes, scriptFile, KLog);	
	}

GLDEF_C TInt E32Main() // main function called by E32
    {
	RProcess().DataCaging(RProcess::EDataCagingOn);
	__UHEAP_MARK;
	CTrapCleanup* cleanup=CTrapCleanup::New(); // get clean-up stack
	TRAP_IGNORE(DoTests());
	delete cleanup; // destroy clean-up stack
	__UHEAP_MARKEND;
	return 0; // and return
    }