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"
21 #include "mstestdatadef.h"
23 GLDEF_D RTest test(_L("T_MS"));
27 // Do testing on aDrive
29 LOCAL_C void DoTests()
31 TRAPD(r,CallTestsL());
34 test.Printf(_L("Error: Leave %d\n"),r);
40 _LIT( KValueTestFailMsg, "ERROR Got %d expected %d" );
41 GLDEF_C void TestIfEqual( TInt aValue, TInt aExpected, TInt aLine, char aFileName[])
43 if( aExpected != aValue )
47 for (; (i < sizeof(filenameU)) && (aFileName[i] != (char)0); i++)
49 filenameU[i]=aFileName[i];
52 test.Printf( KValueTestFailMsg, aValue, aExpected );
53 test.operator()( EFalse, aLine, &filenameU[0]);
59 // Test with drive nearly full
61 GLDEF_C TInt E32Main()
63 CTrapCleanup* cleanup;
64 cleanup=CTrapCleanup::New();
66 #ifndef __NO_HEAP_CHECK
71 test.Start(_L("Starting tests..."));
80 TTimeIntervalSeconds timeTakenC;
81 TInt r=endTimeC.SecondsFrom(timerC,timeTakenC);
83 test.Printf(_L("Time taken for test = %d seconds\n"),timeTakenC.Int());
87 #ifndef __NO_HEAP_CHECK