Update contrib.
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
20 #include "t_ms_main.h"
23 GLDEF_D RTest test(_L("T_MS_SCSI"));
26 // Do tests relative to session path
28 GLDEF_C void CallTestsL()
35 // Do testing on aDrive
37 LOCAL_C void DoTests()
39 TRAPD(r,CallTestsL());
42 test.Printf(_L("Error: Leave %d\n"),r);
47 _LIT( KValueTestFailMsg, "ERROR Got %d expected %d" );
48 GLDEF_C void TestIfEqual( TInt aValue, TInt aExpected, TInt aLine, char aFileName[])
50 if( aExpected != aValue )
54 for (; (i < sizeof(filenameU)) && (aFileName[i] != (char)0); i++)
56 filenameU[i]=aFileName[i];
59 test.Printf( KValueTestFailMsg, aValue, aExpected );
60 test.operator()( EFalse, aLine, &filenameU[0]);
65 GLDEF_C TInt E32Main()
67 CTrapCleanup* cleanup;
68 cleanup=CTrapCleanup::New();
72 test.Start(_L("Starting tests..."));
81 TTimeIntervalSeconds timeTakenC;
82 TInt r=endTimeC.SecondsFrom(timerC,timeTakenC);
84 test.Printf(_L("Time taken for test = %d seconds\n"),timeTakenC.Int());