--- a/kerneltest/f32test/server/t_dcdiskadminallfiles.cpp Thu Aug 19 11:14:22 2010 +0300
+++ b/kerneltest/f32test/server/t_dcdiskadminallfiles.cpp Tue Aug 31 16:34:26 2010 +0300
@@ -15,6 +15,7 @@
//
//
+#define __E32TEST_EXTENSION__
#include <f32file.h>
#include <e32test.h>
#include <e32std.h>
@@ -83,9 +84,6 @@
TRequestStatus aStat3;
TRequestStatus aStat4;
-TVolumeInfo aVolInfo;
-// TDriveInfo adriveInfo;
-
TBuf<40> systestfile;
TBuf<40> pritestfile;
TBuf<40> restestfile;
@@ -113,16 +111,16 @@
mkdirname.Append(systestname);
mkdirname.Append(KMkDirSub);
r=TheFs.MkDirAll(mkdirname);
- test(r==KErrPermissionDenied);
+ test_Value(r, r == KErrPermissionDenied);
TheFs.RmDir(mkdirname);
- test(r==KErrPermissionDenied);
+ test_Value(r, r == KErrPermissionDenied);
r=TheFs.SetSubst(systestname,EDriveO);
- test(r==KErrPermissionDenied);
+ test_Value(r, r == KErrPermissionDenied);
r=TheFs.SetSessionPath(systestname);
- test(r==KErrNone);
+ test_KErrNone(r);
TheFs.NotifyChange(ENotifyAll,aStat1,systestname);
test(aStat1==KRequestPending);
@@ -137,29 +135,29 @@
oldName[0]=(TText)gDriveToTest;
r=TheFs.GetShortName(systestfile, shortfilename);
- test(r==KErrNone || r==KErrNotFound || r==KErrNotSupported);
+ test_Value(r, r == KErrNone || r==KErrNotFound || r==KErrNotSupported);
r=TheFs.GetLongName(systestfile1, longfilename);
- test(r==KErrNone || r==KErrNotFound || r==KErrNotSupported);
+ test_Value(r, r == KErrNone || r==KErrNotFound || r==KErrNotSupported);
r=file1.Create(TheFs,oldName,EFileWrite);
- test(r==KErrNone || r==KErrAlreadyExists);
+ test_Value(r, r == KErrNone || r==KErrAlreadyExists);
file1.Close();
r=TheFs.Replace(oldName,systestfile);
- test(r==KErrPermissionDenied);
+ test_Value(r, r == KErrPermissionDenied);
r=TheFs.Rename(systestfile,systestfile1);
- test(r==KErrPermissionDenied);
+ test_Value(r, r == KErrPermissionDenied);
r=TheFs.Entry(systestfile1,entry);
- test(r==KErrNone || KErrNotFound);
+ test_Value(r, r == KErrNone || r == KErrNotFound);
r=TheFs.SetEntry(systestfile1,testtime,KEntryAttNormal,KEntryAttReadOnly);
- test(r==KErrPermissionDenied);
+ test_Value(r, r == KErrPermissionDenied);
r=TheFs.Delete(systestfile1);
- test(r==KErrPermissionDenied);
+ test_Value(r, r == KErrPermissionDenied);
}
LOCAL_C void ResourceRFsTest()
@@ -174,26 +172,26 @@
mkdirname.Append(restestname);
mkdirname.Append(KMkDirSub);
r=TheFs.MkDirAll(mkdirname);
- test(r==KErrPermissionDenied);
+ test_Value(r, r == KErrPermissionDenied);
TheFs.RmDir(mkdirname);
- test(r==KErrPermissionDenied);
+ test_Value(r, r == KErrPermissionDenied);
// Change due to defect DEF099546 fix
// TCB capability is required for following operation.
r=TheFs.SetSubst(restestname,EDriveO);
- //test(r==KErrNone);
- test(r==KErrPermissionDenied);
+ //test_KErrNone(r);
+ test_Value(r, r == KErrPermissionDenied);
// SetSubst will fail.
//r=TheFs.RealName(_L("O:\\File.XXX"),realName);
- //test(r==KErrNone);
+ //test_KErrNone(r);
//r=TheFs.SetSubst(_L(""),EDriveO);
- //test(r==KErrNone);
+ //test_KErrNone(r);
r=TheFs.SetSessionPath(restestname);
- test(r==KErrNone);
+ test_KErrNone(r);
TheFs.NotifyChange(ENotifyAll,aStat4,restestname);
test(aStat4==KRequestPending);
@@ -208,29 +206,29 @@
oldName[0]=(TText)gDriveToTest;
r=TheFs.GetShortName(restestfile, shortfilename);
- test(r==KErrNone || r==KErrNotFound || r==KErrNotSupported);
+ test_Value(r, r == KErrNone || r==KErrNotFound || r==KErrNotSupported);
r=TheFs.GetLongName(restestfile1, longfilename);
- test(r==KErrNone || r==KErrNotFound || r==KErrNotSupported);
+ test_Value(r, r == KErrNone || r==KErrNotFound || r==KErrNotSupported);
r=file1.Create(TheFs,oldName,EFileWrite);
- test(r==KErrNone || r==KErrAlreadyExists);
+ test_Value(r, r == KErrNone || r==KErrAlreadyExists);
file1.Close();
r=TheFs.Replace(oldName,restestfile);
- test(r==KErrPermissionDenied);
+ test_Value(r, r == KErrPermissionDenied);
r=TheFs.Rename(restestfile,restestfile1);
- test(r==KErrPermissionDenied);
+ test_Value(r, r == KErrPermissionDenied);
r=TheFs.Entry(restestfile1,entry);
- test(r==KErrNone || r==KErrPathNotFound || r==KErrNotFound);
+ test_Value(r, r == KErrNone || r==KErrPathNotFound || r==KErrNotFound);
r=TheFs.SetEntry(restestfile1,testtime,KEntryAttNormal,KEntryAttReadOnly);
- test(r==KErrPermissionDenied);
+ test_Value(r, r == KErrPermissionDenied);
r=TheFs.Delete(restestfile1);
- test(r==KErrPermissionDenied);
+ test_Value(r, r == KErrPermissionDenied);
}
@@ -248,22 +246,22 @@
mkdirname.Append(KMkDirSub);
r=TheFs.MkDirAll(mkdirname);
- test(r==KErrNone);
+ test_KErrNone(r);
r=TheFs.RmDir(mkdirname);
- test(r==KErrNone);
+ test_KErrNone(r);
r=TheFs.SetSubst(pritestfalseidname,EDriveO);
- test(r==KErrNone);
+ test_KErrNone(r);
r=TheFs.RealName(_L("O:\\File.XXX"),realName);
- test(r==KErrNone);
+ test_KErrNone(r);
r=TheFs.SetSubst(_L(""),EDriveO);
- test(r==KErrNone);
+ test_KErrNone(r);
r=TheFs.SetSessionPath(pritestfalseidname);
- test(r==KErrNone);
+ test_KErrNone(r);
TheFs.NotifyChange(ENotifyAll,aStat2,pritestfalseidname);
test(aStat2==KRequestPending);
@@ -279,29 +277,29 @@
oldName[0]=(TText)gDriveToTest;
r=TheFs.GetShortName(pritestfile, shortfilename);
- test(r==KErrNone || r==KErrNotFound || r==KErrNotSupported);
+ test_Value(r, r == KErrNone || r==KErrNotFound || r==KErrNotSupported);
r=TheFs.GetLongName(pritestfile1, longfilename);
- test(r==KErrNone || r==KErrNotFound || r==KErrNotSupported);
+ test_Value(r, r == KErrNone || r==KErrNotFound || r==KErrNotSupported);
r=file1.Create(TheFs,oldName,EFileWrite);
- test(r==KErrNone || r==KErrAlreadyExists);
+ test_Value(r, r == KErrNone || r==KErrAlreadyExists);
file1.Close();
r=TheFs.Replace(oldName,pritestfile);
- test(r==KErrNone);
+ test_KErrNone(r);
r=TheFs.Rename(pritestfile,pritestfile1);
- test(r==KErrNone);
+ test_KErrNone(r);
r=TheFs.Entry(pritestfile1,entry);
- test(r==KErrNone);
+ test_KErrNone(r);
r=TheFs.SetEntry(pritestfile1,testtime,KEntryAttNormal,KEntryAttReadOnly);
- test(r==KErrNone);
+ test_KErrNone(r);
r=TheFs.Delete(pritestfile1);
- test(r==KErrNone);
+ test_KErrNone(r);
}
@@ -320,22 +318,22 @@
mkdirname.Append(KMkDirSub);
r=TheFs.MkDirAll(mkdirname);
- test(r==KErrNone);
+ test_KErrNone(r);
r=TheFs.RmDir(mkdirname);
- test(r==KErrNone);
+ test_KErrNone(r);
r=TheFs.SetSubst(pritestname,EDriveO);
- test(r==KErrNone);
+ test_KErrNone(r);
r=TheFs.RealName(_L("O:\\File.XXX"),realName);
- test(r==KErrNone);
+ test_KErrNone(r);
r=TheFs.SetSubst(_L(""),EDriveO);
- test(r==KErrNone);
+ test_KErrNone(r);
r=TheFs.SetSessionPath(pritestname);
- test(r==KErrNone);
+ test_KErrNone(r);
TheFs.NotifyChange(ENotifyAll,aStat2,pritestname);
test(aStat2==KRequestPending);
@@ -351,29 +349,29 @@
oldName[0]=(TText)gDriveToTest;
r=TheFs.GetShortName(pritestfile, shortfilename);
- test(r==KErrNone || r==KErrNotFound || r==KErrNotSupported);
+ test_Value(r, r == KErrNone || r==KErrNotFound || r==KErrNotSupported);
r=TheFs.GetLongName(pritestfile1, longfilename);
- test(r==KErrNone || r==KErrNotFound || r==KErrNotSupported);
+ test_Value(r, r == KErrNone || r==KErrNotFound || r==KErrNotSupported);
r=file1.Create(TheFs,oldName,EFileWrite);
- test(r==KErrNone || r==KErrAlreadyExists);
+ test_Value(r, r == KErrNone || r==KErrAlreadyExists);
file1.Close();
r=TheFs.Replace(oldName,pritestfile);
- test(r==KErrNone || r==KErrNotFound);
+ test_Value(r, r == KErrNone || r==KErrNotFound);
r=TheFs.Rename(pritestfile,pritestfile1);
- test(r==KErrNone);
+ test_KErrNone(r);
r=TheFs.Entry(pritestfile1,entry);
- test(r==KErrNone);
+ test_KErrNone(r);
r=TheFs.SetEntry(pritestfile1,testtime,KEntryAttNormal,KEntryAttReadOnly);
- test(r==KErrNone);
+ test_KErrNone(r);
r=TheFs.Delete(pritestfile1);
- test(r==KErrNone);
+ test_KErrNone(r);
}
@@ -387,22 +385,22 @@
mkdirname.Append(theprivatepath);
mkdirname.Append(KMkDirSub);
r=TheFs.MkDirAll(mkdirname);
- test(r==KErrNone);
+ test_KErrNone(r);
r=TheFs.RmDir(mkdirname);
- test(r==KErrNone);
+ test_KErrNone(r);
r=TheFs.SetSubst(theprivatepath,EDriveO);
- test(r==KErrNone);
+ test_KErrNone(r);
r=TheFs.RealName(_L("O:\\File.XXX"),realName);
- test(r==KErrNone);
+ test_KErrNone(r);
r=TheFs.SetSubst(_L(""),EDriveO);
- test(r==KErrNone);
+ test_KErrNone(r);
r=TheFs.SetSessionPath(theprivatepath);
- test(r==KErrNone);
+ test_KErrNone(r);
TheFs.NotifyChange(ENotifyAll,aStat3,theprivatepath);
test(aStat3==KRequestPending);
@@ -417,29 +415,29 @@
oldName[0]=(TText)gDriveToTest;
r=TheFs.GetShortName(pritestfile, shortfilename);
- test(r==KErrNone || r==KErrNotFound || r==KErrNotSupported);
+ test_Value(r, r == KErrNone || r==KErrNotFound || r==KErrNotSupported);
r=TheFs.GetLongName(pritestfile1, longfilename);
- test(r==KErrNone || r==KErrNotFound || r==KErrNotSupported);
+ test_Value(r, r == KErrNone || r==KErrNotFound || r==KErrNotSupported);
r=file1.Create(TheFs,oldName,EFileWrite);
- test(r==KErrNone || r==KErrAlreadyExists);
+ test_Value(r, r == KErrNone || r==KErrAlreadyExists);
file1.Close();
r=TheFs.Replace(oldName,pritestfile);
- test(r==KErrNone);
+ test_KErrNone(r);
r=TheFs.Rename(pritestfile,pritestfile1);
- test(r==KErrNone || r==KErrAlreadyExists);
+ test_Value(r, r == KErrNone || r==KErrAlreadyExists);
r=TheFs.Entry(pritestfile1,entry);
- test(r==KErrNone);
+ test_KErrNone(r);
r=TheFs.SetEntry(pritestfile1,testtime,KEntryAttNormal,KEntryAttReadOnly);
- test(r==KErrNone);
+ test_KErrNone(r);
r=TheFs.Delete(pritestfile1);
- test(r==KErrNone);
+ test_KErrNone(r);
}
@@ -450,33 +448,33 @@
{
r=TheFs.SetSessionPath(systestname);
- test(r==KErrNone);
+ test_KErrNone(r);
r=file1.Temp(TheFs,systestname,fromTemp,EFileWrite);
- test(r==KErrPermissionDenied);
+ test_Value(r, r == KErrPermissionDenied);
file1.Close();
systestfile=systestname;
systestfile.Append(KFileSys);
r=file1.Create(TheFs,systestfile,EFileWrite);
- test(r==KErrPermissionDenied);
+ test_Value(r, r == KErrPermissionDenied);
file1.Close();
r=file1.Open(TheFs,systestfile,EFileWrite);
- test(r==KErrPermissionDenied);
+ test_Value(r, r == KErrPermissionDenied);
r=file1.Open(TheFs,systestfile,EFileRead);
- test(r==KErrNone|| r==KErrNotFound);
+ test_Value(r, r == KErrNone|| r==KErrNotFound);
r=file1.Replace(TheFs,systestfile,EFileWrite);
- test(r==KErrPermissionDenied);
+ test_Value(r, r == KErrPermissionDenied);
TFindFile finder(TheFs);
CDir* dir = NULL;
r=finder.FindWildByDir(KWildFile, KWildPath, dir);
if (!(r==KErrNone))
test.Printf(_L("T_DCDISKADMINALLFILES: test find wildcards r = %d (expected KErrNone)\n"), r);
- test(r==KErrNone);
+ test_KErrNone(r);
delete dir;
}
@@ -486,33 +484,33 @@
//
{
r=TheFs.SetSessionPath(restestname);
- test(r==KErrNone);
+ test_KErrNone(r);
r=file1.Temp(TheFs,restestname,fromTemp,EFileWrite);
- test(r==KErrPermissionDenied);
+ test_Value(r, r == KErrPermissionDenied);
file1.Close();
r=file1.Create(TheFs,KFileRes,EFileWrite);
- test(r==KErrPermissionDenied);
+ test_Value(r, r == KErrPermissionDenied);
file1.Close();
r=file1.Open(TheFs,KFileRes,EFileWrite|EFileShareExclusive );
- test(r==KErrPermissionDenied);
+ test_Value(r, r == KErrPermissionDenied);
r=file1.Open(TheFs,KFileRes,EFileShareReadersOnly);
- test(r==KErrNone || KErrPathNotFound || KErrNotFound);
+ test_Value(r, r == KErrNone || r == KErrPathNotFound || r == KErrNotFound);
file1.Close();
r=file1.Open(TheFs,KFileRes,EFileShareReadersOrWriters|EFileRead);
- test(r==KErrNone || KErrPathNotFound || KErrNotFound);
+ test_Value(r, r == KErrNone || r == KErrPathNotFound || r == KErrNotFound);
file1.Close();
r=file1.Open(TheFs,KFileRes,EFileShareReadersOrWriters|EFileWrite);
- test(r==KErrPermissionDenied);
+ test_Value(r, r == KErrPermissionDenied);
file1.Close();
r=file1.Replace(TheFs,KFileRes3,EFileWrite);
- test(r==KErrPermissionDenied);
+ test_Value(r, r == KErrPermissionDenied);
file1.Close();
}
@@ -523,29 +521,29 @@
//
{
r=TheFs.SetSessionPath(pritestfalseidname);
- test(r==KErrNone);
+ test_KErrNone(r);
r=file1.Temp(TheFs,pritestfalseidname,fromTemp,EFileWrite);
- test(r==KErrNone);
+ test_KErrNone(r);
file1.Close();
r=file1.Create(TheFs,KFilePri,EFileWrite);
- test(r==KErrNone);
+ test_KErrNone(r);
file1.Close();
r=file1.Open(TheFs,KFilePri,EFileWrite);
- test(r==KErrNone);
+ test_KErrNone(r);
file1.Close();
r=file1.Open(TheFs,KFilePri,EFileRead);
- test(r==KErrNone);
+ test_KErrNone(r);
file1.Close();
r=file1.Replace(TheFs,KFilePri,EFileWrite);
- test(r==KErrNone);
+ test_KErrNone(r);
r=file1.Rename(KFilePri3);
- test(r==KErrNone);
+ test_KErrNone(r);
file1.Close();
}
@@ -556,29 +554,29 @@
//
{
r=TheFs.SetSessionPath(pritestname);
- test(r==KErrNone);
+ test_KErrNone(r);
r=file1.Temp(TheFs,pritestname,fromTemp,EFileWrite);
- test(r==KErrNone);
+ test_KErrNone(r);
file1.Close();
r=file1.Create(TheFs,KFilePri,EFileWrite);
- test(r==KErrNone);
+ test_KErrNone(r);
file1.Close();
r=file1.Open(TheFs,KFilePri,EFileWrite);
- test(r==KErrNone);
+ test_KErrNone(r);
file1.Close();
r=file1.Open(TheFs,KFilePri,EFileRead);
- test(r==KErrNone);
+ test_KErrNone(r);
file1.Close();
r=file1.Replace(TheFs,KFilePri,EFileWrite);
- test(r==KErrNone);
+ test_KErrNone(r);
r=file1.Rename(KFilePri3);
- test(r==KErrNone);
+ test_KErrNone(r);
file1.Close();
}
@@ -589,30 +587,30 @@
//
{
r=TheFs.SetSessionToPrivate(gTheDriveNum);
- test(r==KErrNone);
+ test_KErrNone(r);
r=file1.Temp(TheFs,theprivatepath,fromTemp,EFileWrite);
- test(r==KErrNone);
+ test_KErrNone(r);
file1.Close();
r=file1.Create(TheFs,KFilePri,EFileWrite);
- test(r==KErrNone);
+ test_KErrNone(r);
file1.Close();
r=file1.Open(TheFs,KFilePri,EFileWrite);
- test(r==KErrNone);
+ test_KErrNone(r);
file1.Close();
r=file1.Open(TheFs,KFilePri,EFileRead);
- test(r==KErrNone);
+ test_KErrNone(r);
file1.Close();
r=file1.Replace(TheFs,KFilePri,EFileWrite);
- test(r==KErrNone);
+ test_KErrNone(r);
r=file1.Rename(KFilePri3);
- test(r==KErrNone);
+ test_KErrNone(r);
file1.Close();
}
@@ -627,12 +625,12 @@
TBuf<30> dirNameBuf(KSystemPath);
dirNameBuf[0]=(TText)gDriveToTest;
r=dir.Open(TheFs,dirNameBuf,KEntryAttNormal);
- test(r==KErrNone || r==KErrPathNotFound || r==KErrNotFound);
+ test_Value(r, r == KErrNone || r==KErrPathNotFound || r==KErrNotFound);
dir.Close();
if(r==KErrNone)
{
r=TheFs.GetDir(dirNameBuf,KEntryAttMatchMask,ESortByName,dirEntries);
- test(r==KErrNone);
+ test_KErrNone(r);
delete dirEntries;
}
dirNameBuf.Zero();
@@ -640,20 +638,20 @@
dirNameBuf=KPrivateFalseID;
dirNameBuf[0]=(TText)gDriveToTest;
r=dir.Open(TheFs,dirNameBuf,KEntryAttNormal);
- test(r==KErrNone);
+ test_KErrNone(r);
dir.Close();
r=TheFs.GetDir(dirNameBuf,KEntryAttMatchMask,ESortByName,dirEntries);
- test(r==KErrNone);
+ test_KErrNone(r);
dirNameBuf.Zero();
delete dirEntries;
//Private
dirNameBuf=KPrivatePath;
dirNameBuf[0]=(TText)gDriveToTest;
r=dir.Open(TheFs,dirNameBuf,KEntryAttNormal);
- test(r==KErrNone);
+ test_KErrNone(r);
dir.Close();
r=TheFs.GetDir(dirNameBuf,KEntryAttMatchMask,ESortByName,dirEntries);
- test(r==KErrNone);
+ test_KErrNone(r);
dirNameBuf.Zero();
delete dirEntries;
//Private/uid
@@ -661,21 +659,21 @@
dirNameBuf.Insert(0,_L("?:"));
dirNameBuf[0]=(TText)gDriveToTest;
r=dir.Open(TheFs,dirNameBuf,KEntryAttNormal);
- test(r==KErrNone);
+ test_KErrNone(r);
dir.Close();
r=TheFs.GetDir(dirNameBuf,KEntryAttMatchMask,ESortByName,dirEntries);
- test(r==KErrNone);
+ test_KErrNone(r);
dirNameBuf.Zero();
delete dirEntries;
//Resource
dirNameBuf=KResourcePath;
dirNameBuf[0]=(TText)gDriveToTest;
r=dir.Open(TheFs,dirNameBuf,KEntryAttNormal);
- test(r==KErrNone || r==KErrPathNotFound);
+ test_Value(r, r == KErrNone || r==KErrPathNotFound);
if(r==KErrNone)
{
r=TheFs.GetDir(dirNameBuf,KEntryAttMatchMask,ESortByName,dirEntries);
- test(r==KErrNone);
+ test_KErrNone(r);
dir.Close();
delete dirEntries;
}
@@ -688,20 +686,20 @@
//
{
r=TheFs.FileSystemName(fsname,gTheDriveNum);
- test(r==KErrNone);
+ test_KErrNone(r);
r = DismountFileSystem(TheFs, fsname, gTheDriveNum);
- test(r==KErrNone);
+ test_KErrNone(r);
// r=TheFs.RemoveFileSystem(fsname); //can not test due to bug else where fix exists
-// test(r==KErrNone);
+// test_KErrNone(r);
// r=TheFs.AddFileSystem(fsname);
-// test(r==KErrNone);
+// test_KErrNone(r);
r = MountFileSystem(TheFs, fsname, gTheDriveNum);
- test(r==KErrNone);
+ test_KErrNone(r);
r=TheFs.SetDriveName(gTheDriveNum,KDriveName);
- test(r==KErrNone);
+ test_KErrNone(r);
#ifndef __WINS__
r=TheFs.SetVolumeLabel(KVolLable, gTheDriveNum);
- test(r==KErrNone);
+ test_KErrNone(r);
#endif
systemRFsTest();
@@ -733,11 +731,11 @@
test(aStat4==KErrCancel);
r=TheFs.SetSessionPath(systestname);
- test(r==KErrNone);
+ test_KErrNone(r);
//Test RRawDisk class
r=rawdisk.Open(TheFs,gTheDriveNum);
- test(r==KErrPermissionDenied);
+ test_Value(r, r == KErrPermissionDenied);
rawdisk.Close();
RDirtest();
@@ -748,20 +746,20 @@
{
//Test RFormat class
r=format.Open(TheFs,driveBuf,EHighDensity,count);
- test(r==KErrNone);
+ test_KErrNone(r);
while(count)
{
TInt r=format.Next(count);
- test(r==KErrNone);
+ test_KErrNone(r);
}
format.Close();
}
driveBuf[0]=(TText)gDriveToTest;
r=TheFs.ScanDrive(driveBuf);
- test(r==KErrNone || r==KErrNotSupported || KErrInUse);
+ test_Value(r, r == KErrNone || r==KErrNotSupported || r == KErrInUse);
r=TheFs.CheckDisk(driveBuf);
- test(r==KErrNone || r==KErrNotSupported || KErrInUse);
+ test_Value(r, r == KErrNone || r==KErrNotSupported || r == KErrInUse);
}
LOCAL_C void TestCaps()
@@ -779,16 +777,16 @@
driveBuf[0]=(TText)gDriveToTest;
r=TheFs.SessionPath(temp);
- test(r==KErrNone);
+ test_KErrNone(r);
test.Printf(_L("Session path: %S"),&temp);
r=TheFs.CreatePrivatePath(gTheDriveNum);
- test(r==KErrNone || r== KErrAlreadyExists);
+ test_Value(r, r == KErrNone || r== KErrAlreadyExists);
TBuf<18> tempPri;
r=TheFs.PrivatePath(tempPri);
- test(r==KErrNone);
+ test_KErrNone(r);
theprivatepath = _L("?:");
theprivatepath.Append(tempPri);
@@ -796,9 +794,9 @@
TFileName thesessionpath;
r=TheFs.SetSessionToPrivate(gTheDriveNum);
- test(r==KErrNone);
+ test_KErrNone(r);
r=TheFs.SessionPath(thesessionpath);
- test(r==KErrNone);
+ test_KErrNone(r);
test(thesessionpath == theprivatepath);
}
@@ -811,7 +809,7 @@
test.Next(_L("Delete test directory"));
CFileMan* fMan=CFileMan::NewL(TheFs);
TInt r=fMan->RmDir(gSessionPath);
- test(r==KErrNone || KErrPathNotFound);
+ test_Value(r, r == KErrNone || r == KErrPathNotFound);
delete fMan;
}
@@ -835,14 +833,14 @@
sesspath[0] = (TText)gDriveToTest;
TInt r= TheFs.SetSessionPath(sesspath);
- test(r==KErrNone);
+ test_KErrNone(r);
TBuf<2> cmd;
cmd.SetLength(1);
cmd[0] = (TText)gDriveToTest;
RProcess tp;
r=tp.Create(_L("clean_prepdc.exe"),sesspath);
- test(r==KErrNone);
+ test_KErrNone(r);
{
TRequestStatus ps;
tp.Logon(ps);
@@ -856,30 +854,30 @@
RFs fs2;
r=fs1.Connect();
- test(r==KErrNone);
+ test_KErrNone(r);
r=fs1.SessionPath(sesspath);
- test(r==KErrNone);
+ test_KErrNone(r);
test.Printf(_L("session1 Path=%S"),&sesspath);
TBuf<30> privatepath;
r=fs1.SetSessionToPrivate(gTheDriveNum);
- test(r==KErrNone);
+ test_KErrNone(r);
r=fs1.PrivatePath(privatepath);
- test(r==KErrNone);
+ test_KErrNone(r);
r=privatepath.Compare(KExpectedPrivatePath());
- test(r==0);
+ test_Value(r, r == 0);
r=fs1.SessionPath(sesspath);
- test(r==KErrNone);
+ test_KErrNone(r);
r=privatepath.Compare(sesspath.Mid(KPathPosition));
- test(r==0);
+ test_Value(r, r == 0);
r=fs1.CreatePrivatePath(gTheDriveNum);
- test(r==KErrNone);
+ test_KErrNone(r);
fs1.Close();
r=fs2.Connect();
- test(r==KErrNone);
+ test_KErrNone(r);
r=fs2.SessionPath(sesspath);
- test(r==KErrNone);
+ test_KErrNone(r);
test.Printf(_L("session2 Path=%S"),&sesspath);
fs2.Close();