author | hgs |
Tue, 26 Oct 2010 12:49:20 +0100 | |
changeset 297 | b2826f67641f |
parent 33 | 0173bcd7697c |
permissions | -rw-r--r-- |
297 | 1 |
// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). |
0 | 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 |
// |
|
15 |
||
16 |
||
17 |
#include <e32def.h> |
|
18 |
#include <e32cmn.h> |
|
19 |
#include <e32base.h> |
|
20 |
#include <f32file.h> |
|
21 |
#include <e32cons.h> |
|
22 |
#include <e32debug.h> |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
23 |
#define __E32TEST_EXTENSION__ |
0 | 24 |
#include <e32test.h> |
25 |
||
26 |
#include "tmsprintdrive.h" |
|
27 |
#include "cmsdrive.h" |
|
28 |
||
29 |
||
30 |
RTest test(_L("T_MSMAN")); |
|
31 |
RFs fsSession; |
|
32 |
||
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
33 |
extern CMsDrive msDrive; |
0 | 34 |
|
35 |
void DriveTestL() |
|
36 |
{ |
|
33
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
37 |
test.Start(_L("Check USB drive attributes\n")); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
38 |
TInt driveNumber = msDrive.DriveNumber(); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
39 |
|
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
40 |
// Check drive Info is USB Mass Storage |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
41 |
TDriveInfo driveInfo; |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
42 |
fsSession.Drive(driveInfo, driveNumber); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
43 |
|
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
44 |
test_Equal(driveInfo.iConnectionBusType, EConnectionBusUsb); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
45 |
test_Value(driveInfo.iDriveAtt & KDriveAttExternal, KDriveAttExternal); |
0173bcd7697c
Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
46 |
test.End(); |
0 | 47 |
} |
48 |
||
49 |
||
50 |
void CallTestsL() |
|
51 |
{ |
|
52 |
DriveTestL(); |
|
53 |
_LIT(KTxtEnd, "Press key to end session\n"); |
|
54 |
test.Printf(KTxtEnd); |
|
55 |
test.Getch(); |
|
56 |
} |