First public contribution.
2 * Copyright (c) 1998-2010 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
21 #include "t_testhandler.h"
22 #include "tasn1normaltest.h"
23 #include "tScriptTests.h"
24 #include "tScriptSetup.h"
27 LOCAL_D void callExampleL() // initialize and call example code under cleanup stack
29 CSystemRandom *rng = CSystemRandom::NewL();
30 SetThreadRandomLC(rng);
33 SCRIPT_ITEM(CASN1NormalTest, _L8("Normal"))
36 TDriveUnit sysDrive (RFs::GetSystemDrive());
37 TDriveName driveName(sysDrive.Name());
38 TBuf<64> scriptFile (driveName);
39 scriptFile.Append(_L("\\tasn1\\scripts\\tasn1.txt"));
40 CScriptSetup::CreateAndRunTestsL(theTestTypes, scriptFile, _L("tasn1.log"));
42 DestroyThreadRandom();
43 CleanupStack::Pop(); // Pop the cleanup item which would have reset/delete the threadrandom
46 GLDEF_C TInt E32Main() // main function called by E32
49 CTrapCleanup* cleanup = CTrapCleanup::New(); // get clean-up stack
50 TRAP_IGNORE(callExampleL());
51 // dont panic in case its a syntax error in script.
52 //__ASSERT_ALWAYS(!error,User::Panic(_L("CERT"),error));
53 delete cleanup; // destroy clean-up stack