crypto/weakcrypto/test/tpbe/tpbemain.cpp
changeset 71 dd83586b62d6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/crypto/weakcrypto/test/tpbe/tpbemain.cpp	Fri Jun 11 15:32:35 2010 +0300
@@ -0,0 +1,61 @@
+/*
+* Copyright (c) 1998-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: 
+*
+*/
+
+
+#include <e32base.h>
+#include "t_testhandler.h"
+#include "t_testsetup.h"
+#include "tscripttests.h"
+#include "tactionelement.h"
+#include "tactionset.h"
+#include "tactionsetreadpfs.h"
+#include "tactionsetwritepfs.h"
+#include "texternpbeparams.h"
+
+LOCAL_D void callExampleL() // initialize and call example code under cleanup stack
+    {
+    START_SCRIPT_LIST
+	SCRIPT_ITEM(CActionElement,_L8("Element")),
+	SCRIPT_ITEM(CActionSet,_L8("Set")),
+	SCRIPT_ITEM(CActionSetReadPFS,_L8("ReadPFS")),
+	SCRIPT_ITEM(CActionSetWritePFS,_L8("WritePFS")),
+	SCRIPT_ITEM(CExternPbeParams, _L8("ExternPbeParams"))
+    END_SCRIPT_LIST
+    
+    TDriveUnit sysDrive (RFs::GetSystemDrive());
+	
+    TDriveName driveName(sysDrive.Name());
+    
+    TBuf<24> scriptFile (driveName);
+    scriptFile.Append(_L("\\tpbe\\tpbetests_v2.txt"));
+    
+    TBuf<24> logFile (driveName);
+    logFile.Append(_L("\\tpbetestsv2.log"));
+    
+	CTestSetup::CreateAndRunTestsL(theTestTypes, scriptFile, logFile);
+    }
+
+GLDEF_C TInt E32Main() // main function called by E32
+    {
+	__UHEAP_MARK;
+	CTrapCleanup* cleanup = CTrapCleanup::New(); // get clean-up stack
+	TRAPD(error, callExampleL());
+	__ASSERT_ALWAYS(!error,User::Panic(_L("tpbe"),error));
+	delete cleanup; // destroy clean-up stack
+	__UHEAP_MARKEND;
+	return 0;
+    }