1 // Copyright (c) 2006-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 // Ensures the the disk has the correct FAT mounted depending on the |
|
15 // disk size. |
|
16 // |
|
17 // |
|
18 |
|
19 |
|
20 |
|
21 #include "basetestfat32larger512.h" |
|
22 |
|
23 /** |
|
24 Class Constructor |
|
25 */ |
|
26 CBaseTestFat32Larger512::CBaseTestFat32Larger512() |
|
27 { |
|
28 SetTestStepName(KTestStepLarger512); |
|
29 } |
|
30 |
|
31 /** |
|
32 Class Destructor |
|
33 */ |
|
34 CBaseTestFat32Larger512::~CBaseTestFat32Larger512() |
|
35 { |
|
36 } |
|
37 |
|
38 |
|
39 /** |
|
40 Checks that if the disk size is greater or equal to 512MB, the file system is |
|
41 FAT32, else the file system is FAT. |
|
42 |
|
43 |
|
44 @return EPass if test passes and EFail if test fails |
|
45 */ |
|
46 TVerdict CBaseTestFat32Larger512::doTestStepL() |
|
47 { |
|
48 SetTestStepResult(EPass); |
|
49 |
|
50 if (iDiskSize >= (512*1024*1024)) |
|
51 { |
|
52 if (IsFileSystemFAT32()) |
|
53 { |
|
54 _LIT(KLargCorrect, "Disk size is greater or equal to 512MB and the filesystem is FAT32"); |
|
55 INFO_PRINTF1(KLargCorrect); |
|
56 SetTestStepResult(EPass); |
|
57 } |
|
58 else |
|
59 { |
|
60 _LIT(KLargErr, "Disk size is greater or equal to 512MB and the filesystem is not FAT32"); |
|
61 INFO_PRINTF1(KLargErr); |
|
62 SetTestStepResult(EFail); |
|
63 } |
|
64 } |
|
65 if (iDiskSize < (512*1024*1024)) |
|
66 { |
|
67 if (IsFileSystemFAT(iTheFs ,CurrentDrive())) |
|
68 { |
|
69 _LIT(KLargCorrect, "Disk size is less 512MB and the filesystem is FAT"); |
|
70 INFO_PRINTF1(KLargCorrect); |
|
71 SetTestStepResult(EPass); |
|
72 } |
|
73 else |
|
74 { |
|
75 _LIT(KLargErr, "Disk size less than 512MB and the filesystem is not FAT"); |
|
76 INFO_PRINTF1(KLargErr); |
|
77 SetTestStepResult(EFail); |
|
78 } |
|
79 } |
|
80 return TestStepResult(); |
|
81 } |
|
82 |
|