--- a/kerneltest/f32test/server/t_vfat.cpp Thu Aug 19 11:14:22 2010 +0300
+++ b/kerneltest/f32test/server/t_vfat.cpp Tue Aug 31 16:34:26 2010 +0300
@@ -15,6 +15,7 @@
//
//
+#define __E32TEST_EXTENSION__
#include <f32file.h>
#include <e32test.h>
#include <e32math.h>
@@ -56,15 +57,15 @@
TBuf<32> longName=namelong;
longName.AppendNum(fileNum);
TInt r=TheFs.Rename(shortName,longName);
- test(r==KErrNone);
+ test_KErrNone(r);
}
TInt r=TheFs.CheckDisk(gSessionPath);
- test(r==KErrNone || r==KErrNotSupported);
+ test_Value(r, r == KErrNone || r==KErrNotSupported);
CDir* dirList;
r=TheFs.GetDir(_L("*.*"),KEntryAttMaskSupported,ESortBySize,dirList);
- test(r==KErrNone);
+ test_KErrNone(r);
test(dirList->Count()==totalFiles);
for (i=0;i<totalFiles;i++)
{
@@ -129,7 +130,7 @@
if (fileName==_L(""))
goto End;
r=TheFs.Delete(fileName);
- test(r==KErrNone);
+ test_KErrNone(r);
gFileName[fileNum]=_L("");
goto End;
default:
@@ -142,14 +143,14 @@
TInt r;
RFile thing;
r=thing.Open(TheFs, fileName, EFileShareAny);
- test (r==KErrNone || r==KErrNotFound);
+ test_Value(r, r == KErrNone || r==KErrNotFound);
if (r==KErrNone)
{
TInt s;
test (thing.Size(s) == KErrNone);
thing.Close();
r=TheFs.Delete(fileName);
- test (r==KErrNone);
+ test_KErrNone(r);
gFileName[s]=_L("");
}
else
@@ -168,7 +169,7 @@
TInt r=TheFs.Rename(gFileName[fileNum],fileName);
if (r != KErrNone && r != KErrAlreadyExists)
test.Printf(_L("Rename returned %d at line %d"), r, __LINE__);
- test(r==KErrNone || r==KErrAlreadyExists);
+ test_Value(r, r == KErrNone || r==KErrAlreadyExists);
if (r==KErrNone)
gFileName[fileNum]=fileName;
}
@@ -177,11 +178,11 @@
{
test.Printf(_L("Iteration %d \r"),gMaxIterations-maxIterations);
TInt r=TheFs.CheckDisk(gSessionPath);
- test(r==KErrNone || r==KErrNotSupported);
+ test_Value(r, r == KErrNone || r==KErrNotSupported);
TInt count=0;
CDir* dirList;
r=TheFs.GetDir(_L("*.*"),KEntryAttMaskSupported,ESortBySize,dirList);
- test(r==KErrNone);
+ test_KErrNone(r);
for(i=0;i<gMaxFiles;i++)
{
if (gFileName[i]==_L(""))
@@ -231,19 +232,19 @@
TEntry entry;
nRes = TheFs.Entry(KName1, entry);
- test(nRes == KErrNone);
+ test_KErrNone(nRes);
test(entry.iName.CompareF(KExpectedName) == 0);
nRes = TheFs.Entry(KName2, entry);
- test(nRes == KErrNone);
+ test_KErrNone(nRes);
test(entry.iName.CompareF(KExpectedName) == 0);
nRes = TheFs.Entry(KName3, entry);
- test(nRes == KErrNone);
+ test_KErrNone(nRes);
test(entry.iName.CompareF(KExpectedName) == 0);
nRes = TheFs.Entry(KName3, entry);
- test(nRes == KErrNone);
+ test_KErrNone(nRes);
test(entry.iName.CompareF(KExpectedName) == 0);
}
@@ -273,46 +274,46 @@
//----- create and check "\\file1"
nRes = file.Replace(TheFs, KName1, EFileWrite);
- test(nRes == KErrNone);
+ test_KErrNone(nRes);
file.Close();
DoCheckTD_FN();
nRes = TheFs.Delete(KName1);
- test(nRes == KErrNone);
+ test_KErrNone(nRes);
//----- create and check "\\file1."
nRes = file.Replace(TheFs, KName2, EFileWrite);
- test(nRes == KErrNone);
+ test_KErrNone(nRes);
file.Close();
DoCheckTD_FN();
nRes = TheFs.Delete(KName2);
- test(nRes == KErrNone);
+ test_KErrNone(nRes);
//----- create and check "\\file1.."
nRes = file.Replace(TheFs, KName3, EFileWrite);
- test(nRes == KErrNone);
+ test_KErrNone(nRes);
file.Close();
DoCheckTD_FN();
nRes = TheFs.Delete(KName3);
- test(nRes == KErrNone);
+ test_KErrNone(nRes);
//----- create and check "\\file1..."
nRes = file.Replace(TheFs, KName4, EFileWrite);
- test(nRes == KErrNone);
+ test_KErrNone(nRes);
file.Close();
DoCheckTD_FN();
nRes = TheFs.Delete(KName4);
- test(nRes == KErrNone);
+ test_KErrNone(nRes);
}