kerneltest/f32test/server/t_dctcballfiles.cpp
branchRCL_3
changeset 256 c1f20ce4abcf
parent 0 a41df078684a
child 257 3e88ff8f41d5
--- a/kerneltest/f32test/server/t_dctcballfiles.cpp	Thu Aug 19 11:14:22 2010 +0300
+++ b/kerneltest/f32test/server/t_dctcballfiles.cpp	Tue Aug 31 16:34:26 2010 +0300
@@ -13,6 +13,7 @@
 // Description:
 //
 
+#define __E32TEST_EXTENSION__
 #include <f32file.h>
 #include <e32test.h>
 #include <e32std.h>
@@ -76,9 +77,6 @@
 TRequestStatus aStat3;
 TRequestStatus aStat4;
 
-TVolumeInfo aVolInfo;
-//	TDriveInfo adriveInfo;
-
 TBuf<40> systestfile;
 TBuf<40> pritestfile;
 TBuf<40> restestfile;
@@ -106,19 +104,19 @@
 	mkdirname.Append(systestname);
 	mkdirname.Append(KMkDirSub);
 	r=TheFs.MkDirAll(mkdirname);	
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	TheFs.RmDir(mkdirname);
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	r=TheFs.SetSubst(systestname,EDriveO);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 	
 	r=TheFs.RealName(_L("O:\\File.XXX"),realName);
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	r=TheFs.SetSessionPath(systestname);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	
 	TheFs.NotifyChange(ENotifyAll,aStat1,systestname);
 	test(aStat1==KRequestPending);
@@ -133,29 +131,29 @@
 	oldName[0]=(TText)gDriveToTest;
 
 	r=TheFs.GetShortName(systestfile, shortfilename);
-	test(r==KErrNotFound || r==KErrNotSupported);
+	test_Value(r, r == KErrNotFound || r==KErrNotSupported);
 
 	r=TheFs.GetLongName(systestfile1, longfilename);
-	test(r==KErrNotFound || r==KErrNotSupported);
+	test_Value(r, 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==KErrNone);
+	test_KErrNone(r);
 	
 	r=TheFs.Rename(systestfile,systestfile1);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	
 	r=TheFs.Entry(systestfile1,entry);
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	r=TheFs.SetEntry(systestfile1,testtime,KEntryAttNormal,KEntryAttReadOnly);
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	r=TheFs.Delete(systestfile1);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	}
 
 LOCAL_C void ResourceRFsTest()
@@ -170,19 +168,19 @@
 	mkdirname.Append(restestname);
 	mkdirname.Append(KMkDirSub);
 	r=TheFs.MkDirAll(mkdirname);	
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	TheFs.RmDir(mkdirname);
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	r=TheFs.SetSubst(restestname,EDriveO);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 	
 	r=TheFs.RealName(_L("O:\\File.XXX"),realName);
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	r=TheFs.SetSessionPath(restestname);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	
 	TheFs.NotifyChange(ENotifyAll,aStat4,restestname);
 	test(aStat4==KRequestPending);
@@ -197,29 +195,29 @@
 	oldName[0]=(TText)gDriveToTest;
 
 	r=TheFs.GetShortName(restestfile, shortfilename);
-	test(r==KErrNone || KErrNotFound || r==KErrNotSupported);
+	test_Value(r, r == KErrNone || r == KErrNotFound || r==KErrNotSupported);
 
 	r=TheFs.GetLongName(restestfile1, longfilename);
-	test(r==KErrNone || 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==KErrNone);
+	test_KErrNone(r);
 	
 	r=TheFs.Rename(restestfile,restestfile1);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	
 	r=TheFs.Entry(restestfile1,entry);
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	r=TheFs.SetEntry(restestfile1,testtime,KEntryAttNormal,KEntryAttReadOnly);
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	r=TheFs.Delete(restestfile1);
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	}
 
@@ -237,19 +235,19 @@
 	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==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 
 	r=TheFs.RealName(_L("O:\\File.XXX"),realName);
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	r=TheFs.SetSessionPath(pritestfalseidname);
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	TheFs.NotifyChange(ENotifyAll,aStat2,pritestfalseidname);
 	test(aStat2==KRequestPending);
@@ -265,29 +263,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);
 
 	}
 
@@ -306,19 +304,19 @@
 	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==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 
 	r=TheFs.RealName(_L("O:\\File.XXX"),realName);
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	r=TheFs.SetSessionPath(pritestname);
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	TheFs.NotifyChange(ENotifyAll,aStat2,pritestname);
 	test(aStat2==KRequestPending);
@@ -334,29 +332,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);
 
 	}
 
@@ -370,19 +368,19 @@
 	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==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 
 	r=TheFs.RealName(_L("O:\\File.XXX"),realName);
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	r=TheFs.SetSessionPath(theprivatepath);
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	TheFs.NotifyChange(ENotifyAll,aStat3,theprivatepath);
 	test(aStat3==KRequestPending);
@@ -397,29 +395,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);
 	}
 
 
@@ -430,29 +428,29 @@
 	{
 
 	r=TheFs.SetSessionPath(systestname);
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	r=file1.Temp(TheFs,systestname,fromTemp,EFileWrite);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	file1.Close();
 
 	r=file1.Create(TheFs,KFileSys,EFileWrite);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	file1.Close();
 
 	r=file1.Open(TheFs,KFileSys,EFileWrite);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	file1.Close();
 	
 	r=file1.Open(TheFs,KFileSys,EFileRead);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	file1.Close();
 
 	r=file1.Replace(TheFs,KFileSys,EFileWrite);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	
 	r=file1.Rename(KFileSys3);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	file1.Close();
 
     TFindFile finder(TheFs);
@@ -460,7 +458,7 @@
     r=finder.FindWildByDir(KWildFile, KWildPath, dir);
 	if (!(r==KErrNone))
         test.Printf(_L("T_DCTCBALLFILES: test find wildcards r = %d (expected KErrNone)\n"), r);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	delete dir;
 	}
 
@@ -470,40 +468,40 @@
 //
 	{
 	r=TheFs.SetSessionPath(restestname);
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	r=file1.Temp(TheFs,restestname,fromTemp,EFileWrite);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	file1.Close();
 
 	r=file1.Create(TheFs,KFileRes,EFileWrite);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	file1.Close();
 
 	r=file1.Open(TheFs,KFileRes,EFileWrite|EFileShareExclusive );
-	test(r==KErrNone);
+	test_KErrNone(r);
 	
 	r=file1.Rename(KFileRes3);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	file1.Close();
 
 	r=file1.Open(TheFs,KFileRes3,EFileShareReadersOrWriters|EFileRead);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	file1.Close();
 
 	r=file1.Open(TheFs,KFileRes3,EFileShareReadersOrWriters|EFileWrite);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	file1.Close();
 
 	r=file1.Open(TheFs,KFileRes3,EFileShareReadersOnly);
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	r=file1.ChangeMode(EFileShareExclusive);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	file1.Close();
 
 	r=file1.Replace(TheFs,KFileRes,EFileWrite);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	file1.Close();	
 	}
 
@@ -514,29 +512,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();
 	}
 
@@ -547,29 +545,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();
 	}
 
@@ -580,29 +578,29 @@
 //
 	{
 	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();
 	}
 
@@ -617,10 +615,10 @@
 	TBuf<30> dirNameBuf(KSystemPath);
 	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;
 
@@ -628,10 +626,10 @@
 	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;
 
@@ -639,10 +637,10 @@
 	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;
 
@@ -651,19 +649,19 @@
 	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);
+	test_KErrNone(r);
 	r=TheFs.GetDir(dirNameBuf,KEntryAttMatchMask,ESortByName,dirEntries);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	dir.Close();
 	delete dirEntries;
 	}
@@ -675,21 +673,21 @@
 //
 	{
 	r=TheFs.FileSystemName(fsname,gTheDriveNum);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	r = DismountFileSystem(TheFs, fsname, gTheDriveNum);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 //	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==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 	test.Printf(_L("r=%d"),r);
 	r=TheFs.SetDriveName(gTheDriveNum,KDriveName);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 #ifndef __WINS__
  	r=TheFs.SetVolumeLabel(KVolLable, gTheDriveNum);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 #endif
 
 	systemRFsTest();
@@ -715,11 +713,11 @@
 	test(aStat4==KErrNone);
 
 	r=TheFs.SetSessionPath(systestname);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	
 //Test RRawDisk class
 	r=rawdisk.Open(TheFs,gTheDriveNum);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	rawdisk.Close();
 
 	RDirtest();
@@ -730,12 +728,12 @@
 		{
 		//Test RFormat class
 		r=format.Open(TheFs,driveBuf,EHighDensity,count);
-		test(r==KErrPermissionDenied);
+		test_Value(r, r == KErrPermissionDenied);
 
 		while(count)	
 			{
 			TInt r=format.Next(count);
-			test(r==KErrNone);
+			test_KErrNone(r);
 			}
 		format.Close();
 		}
@@ -743,9 +741,9 @@
 	driveBuf[0]=(TText)gDriveToTest;
 	r=TheFs.ScanDrive(driveBuf);
 	RDebug::Print(_L("r=%d"),r);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 	r=TheFs.CheckDisk(driveBuf);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 	}
 
 LOCAL_C void TestCaps()
@@ -763,16 +761,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);
 
@@ -780,9 +778,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);
 	}
@@ -794,16 +792,16 @@
 	{
 	CDirScan* scanner = NULL;
 	TRAP(r, scanner = CDirScan::NewL(TheFs));
-	test(r == KErrNone && scanner);
+	test_Value(r, r == KErrNone && scanner);
 
 	TRAP(r, scanner->SetScanDataL(aName,KEntryAttDir,ESortByName|EAscending,aDirection));
-	test(r == KErrNone);
+	test_KErrNone(r);
 
 	CDir *entryList=NULL;
 	for (;;)
 		{
 		TRAP(r, scanner->NextL(entryList));
-		test(r == aError);
+		test_Value(r, r == aError);
 		if (entryList==NULL)
 			break;
 
@@ -845,11 +843,11 @@
 		test.Printf(_L("Private Path is=%S"),&privatepath);
 		
 		r = TheFs.MkDir(_L("\\Caged\\"));
-		test(r==KErrNone || r==KErrAlreadyExists);
+		test_Value(r, r == KErrNone || r==KErrAlreadyExists);
 		
 		CDir* entryCount=NULL;
 		r=TheFs.GetDir(_L("\\*.*"),KEntryAttNormal|KEntryAttDir,ESortNone,entryCount);
-		test(r==KErrNone);
+		test_KErrNone(r);
 		
 		delete entryCount;
 		entryCount=NULL;
@@ -858,23 +856,23 @@
 		//Testing Copy
 		CDir* entryCount2=NULL;
 		r=fMan->Copy(_L("\\sys\\"),_L("\\Caged\\"));
-		test(r == KErrNone);
+		test_KErrNone(r);
 		r=fMan->Copy(_L("\\*"),_L("\\Caged\\"));
-		test(r == KErrNone);
+		test_KErrNone(r);
 		
 		r=TheFs.GetDir(_L("\\Caged\\*.*"),KEntryAttNormal|KEntryAttDir,ESortNone,entryCount2);
-		test(r==KErrNone);
+		test_KErrNone(r);
 		
 		delete entryCount2;
 		entryCount2=NULL;
 	
 		r=fMan->Copy(_L("\\private\\two\\moo"),_L("\\private\\two\\mew")); 
-		test(r == KErrPathNotFound);
+		test_Value(r, r == KErrPathNotFound);
 	
 		// Create a test file
 		RFile testFile;
 		r = testFile.Replace(TheFs, _L("\\capTest"),EFileWrite);
-		test(r==KErrNone || r==KErrAlreadyExists);
+		test_Value(r, r == KErrNone || r==KErrAlreadyExists);
 		testFile.Close();
 		
 		TFileName name;
@@ -882,88 +880,88 @@
 		name.Append(_L("privateFile.tst"));
 		RFile privateFile;
 		r = privateFile.Replace(TheFs, name,EFileWrite);
-		test(r==KErrNone || r==KErrAlreadyExists);
+		test_Value(r, r == KErrNone || r==KErrAlreadyExists);
 		privateFile.Close();
 
 	
 		r=fMan->Copy(_L("\\capTest"),_L("\\private\\two\\moo")); 
-		test(r == KErrPathNotFound);
+		test_Value(r, r == KErrPathNotFound);
 		r=fMan->Copy(_L("\\capTest"),_L("\\sys\\bin\\moo")); 
-		test(r == KErrPathNotFound); 
+		test_Value(r, r == KErrPathNotFound); 
 		r=fMan->Copy(_L("\\sys\\bin\\capTest"),_L("\\sys\\bin\\moo")); 
-		test(r == KErrPathNotFound);
+		test_Value(r, r == KErrPathNotFound);
 		r=fMan->Copy(_L("\\capTest"),_L("\\sys\\capTest")); 
-		test(r == KErrNone || r==KErrAlreadyExists); 
+		test_Value(r, r == KErrNone || r==KErrAlreadyExists); 
 		r=fMan->Copy(_L("\\sys\\*"),_L("\\"));
-		test (r==KErrNone);
+		test_KErrNone(r);
 		r=fMan->Copy(name,_L("\\sys\\"));
-		test(r==KErrNone);
+		test_KErrNone(r);
 
 		// Testing Attribs
 		r=fMan->Attribs(_L("\\private\\two\\moo"),KEntryAttReadOnly,0,TTime(0)); 
-		test(r == KErrPathNotFound);
+		test_Value(r, r == KErrPathNotFound);
 		r=fMan->Attribs(_L("\\private\\moo"),KEntryAttReadOnly,0,TTime(0)); 
-		test(r == KErrNotFound);
+		test_Value(r, r == KErrNotFound);
 		r=fMan->Attribs(name,KEntryAttReadOnly,0,TTime(0));
-		test(r == KErrNone);
+		test_KErrNone(r);
 		r=fMan->Attribs(name,0,KEntryAttReadOnly,TTime(0));
-		test(r == KErrNone);
+		test_KErrNone(r);
 
 		// Testing Move
 		r=fMan->Move(_L("\\private\\two\\moo"),_L("\\private\\one\\moo"));
-		test(r == KErrPathNotFound);
+		test_Value(r, r == KErrPathNotFound);
 		r=fMan->Move(_L("\\private\\two\\moo.."),_L("\\private\\one\\moo"));
-		test(r == KErrPathNotFound);
+		test_Value(r, r == KErrPathNotFound);
 		r=fMan->Move(_L("\\private\\two\\moo"),_L("\\private\\one\\moo.."));
-		test(r == KErrPathNotFound);
+		test_Value(r, r == KErrPathNotFound);
 		r=fMan->Move(name,_L("\\privateFile.tst"));
-		test(r == KErrNone);
+		test_KErrNone(r);
 		r=fMan->Move(_L("\\privateFile.tst"),name);
-		test(r == KErrNone);
+		test_KErrNone(r);
 
 
 		// Testing RmDir
 		r=fMan->RmDir(_L("\\private\\"));
-		test(r == KErrNone);
+		test_KErrNone(r);
 		// put it back where it was
 		r = TheFs.MkDirAll(_L("\\private\\00000001\\"));
-		test(r == KErrNone);
+		test_KErrNone(r);
 		r=fMan->RmDir(_L("\\private\\two\\"));
-		test(r == KErrPathNotFound);
+		test_Value(r, r == KErrPathNotFound);
 		r=fMan->RmDir(_L("\\private\\tw?\\"));
-		test(r == KErrBadName);
+		test_Value(r, r == KErrBadName);
 
 		r=fMan->RmDir(_L("\\private\\two\\"));
-		test(r == KErrPathNotFound);
+		test_Value(r, r == KErrPathNotFound);
 		r=fMan->RmDir(_L("\\private\\tw?\\"));
-		test(r == KErrBadName);
+		test_Value(r, r == KErrBadName);
 		
 		
 		// Testing Rename
 		r=fMan->Rename(_L("\\private\\two\\moo"),_L("\\private\\two\\mew")); 
-		test(r == KErrPathNotFound);
+		test_Value(r, r == KErrPathNotFound);
 		
 		// Testing Delete
 		r=fMan->Delete(_L("\\private\\two\\test")); 
-		test(r == KErrPathNotFound);
+		test_Value(r, r == KErrPathNotFound);
 		r=fMan->Delete(_L("\\private\\moo")); 
-		test(r == KErrNotFound);
+		test_Value(r, r == KErrNotFound);
 		
 		//Something that actually exists in Private
 		r=fMan->Rename(name,_L("\\private\\00000001\\moo")); 
-		test(r == KErrNotFound);
+		test_Value(r, r == KErrNotFound);
 		r=fMan->Rename(_L("\\private\\00000001\\moo"),name); 
-		test(r == KErrNotFound);
+		test_Value(r, r == KErrNotFound);
 		r=fMan->Copy(name,_L("\\private\\00000001\\moo")); 
-		test(r == KErrNotFound);
+		test_Value(r, r == KErrNotFound);
 		r=fMan->Delete(_L("\\private\\00000001\\moo")); 
-		test(r == KErrNotFound);
+		test_Value(r, r == KErrNotFound);
 
 		// Clean up the test data
 		r=fMan->RmDir(_L("\\Caged\\")); 
-		test(r == KErrNone);
+		test_KErrNone(r);
 		r=fMan->Delete(_L("\\capTest")); 
-		test(r == KErrNone);
+		test_KErrNone(r);
 		delete(fMan);
 		}
 	
@@ -984,7 +982,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;
 	}
 
@@ -1008,7 +1006,7 @@
 	sesspath[0] = (TText)gDriveToTest;
 
 	TInt r= TheFs.SetSessionPath(sesspath);
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	//cleanup from previous run of this test
 	TBuf<20> delDir;
@@ -1016,15 +1014,15 @@
 	delDir=KResourcePath;
 	delDir[0]=(TText)gDriveToTest;
 	r=fMan->RmDir(delDir);
-	test(r==KErrNone || KErrNotFound);
+	test_Value(r, r == KErrNone || r == KErrNotFound || r == KErrPathNotFound);
 	delDir=KSystemPath;
 	delDir[0]=(TText)gDriveToTest;
 	r=fMan->RmDir(delDir);
-	test(r==KErrNone || KErrNotFound);
+	test_Value(r, r == KErrNone || r == KErrNotFound || r == KErrPathNotFound);
 	delDir=KPrivatePath;
 	delDir[0]=(TText)gDriveToTest;
 	r=fMan->RmDir(delDir);
-	test(r==KErrNone || KErrNotFound);
+	test_Value(r, r == KErrNone || r == KErrNotFound || r == KErrPathNotFound);
 	delete fMan;
 
 	//check double mode ie that Defpath still works	
@@ -1032,30 +1030,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();