kerneltest/f32test/fsstress/t_sess.h
changeset 0 a41df078684a
equal deleted inserted replaced
-1:000000000000 0:a41df078684a
       
     1 // Copyright (c) 1998-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".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // f32test\fsstress\t_sess.h
       
    15 // 
       
    16 //
       
    17 
       
    18 #include <f32file.h>
       
    19 #include <e32test.h>
       
    20 #include <e32hal.h>
       
    21 #include <e32math.h>
       
    22 #include <f32dbg.h>
       
    23 
       
    24 GLDEF_D const TInt KMaxParses=7;
       
    25 GLDEF_D const TInt KHeapSize=0x2000;
       
    26 GLREF_C void TurnAllocFailureOff();
       
    27 GLREF_C void TurnAllocFailureOn();
       
    28 GLREF_C void ReportCheckDiskFailure(TInt aRet);
       
    29 GLREF_D RTest test;
       
    30 GLREF_D TFileName gTestSessionPath;
       
    31 GLREF_D TInt gAllocFailOff;
       
    32 GLREF_D TInt gAllocFailOn;
       
    33 
       
    34 #if defined(_DEBUG)
       
    35 #define SetAllocFailure(a) SetAllocFailure(a)
       
    36 #else
       
    37 #define SetAllocFailure(a) IsRomAddress(NULL)
       
    38 #define KAllocFailureOn 0
       
    39 #define KAllocFailureOff 0
       
    40 #endif
       
    41 
       
    42 
       
    43 struct SParse
       
    44 	{
       
    45 	const TText* src;
       
    46 	const TText* rel;
       
    47 	const TText* def;
       
    48 	const TText* fullName;
       
    49 	const TText* drive;
       
    50 	const TText* path;
       
    51 	const TText* name;
       
    52 	const TText* ext;
       
    53 	};
       
    54 
       
    55 struct SParseServer
       
    56 	{
       
    57 	const TText* src;
       
    58 	const TText* rel;
       
    59 	const TText* fullName;
       
    60 	const TText* drive;
       
    61 	const TText* path;
       
    62 	const TText* name;
       
    63 	const TText* ext;
       
    64 	};
       
    65 
       
    66 
       
    67 class TSessionTest
       
    68 	{
       
    69 public:
       
    70 	TSessionTest() {};
       
    71 	TSessionTest(RFs& aFs):	iFs(aFs){};	
       
    72 	void Initialise(RFs& aFs);
       
    73 	void RunTests();
       
    74 	void testDriveList();
       
    75 	void testDriveInfo();
       
    76 	void testVolumeInfo();
       
    77 	void testPath();
       
    78 	void testInitialisation();
       
    79 	void testSubst();
       
    80 	void CopyFileToTestDirectory();
       
    81 	void MakeAndDeleteFiles();
       
    82 	void FillUpDisk();
       
    83 	void testSetVolume();
       
    84 	void CreateTestDirectory(const TDesC& aTestPath);
       
    85 	void DeleteTestDirectory();
       
    86 	TInt CurrentDrive();
       
    87 private:
       
    88 	RFs iFs;
       
    89 	};
       
    90