kerneltest/f32test/server/t_dctcbdiskadmin.cpp
changeset 189 a5496987b1da
parent 0 a41df078684a
child 245 647ab20fee2e
--- a/kerneltest/f32test/server/t_dctcbdiskadmin.cpp	Wed Jun 23 12:58:21 2010 +0100
+++ b/kerneltest/f32test/server/t_dctcbdiskadmin.cpp	Thu Jul 01 17:57:33 2010 +0100
@@ -13,6 +13,7 @@
 // Description:
 //
 
+#define __E32TEST_EXTENSION__
 #include <f32file.h>
 #include <e32test.h>
 #include <e32std.h>
@@ -109,19 +110,19 @@
 	mkdirname.Append(KMkDirSub);
 
 	r=TheFs.MkDirAll(mkdirname);	
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 
 	r=TheFs.RmDir(mkdirname);	
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 
 	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==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 
 	TheFs.NotifyChange(ENotifyAll,aStat2,pritestfalseidname);
 	test(aStat2==KErrPermissionDenied);
@@ -137,32 +138,32 @@
 	oldName[0]=(TText)gDriveToTest;
 
 	r=TheFs.GetShortName(pritestfile, shortfilename);
-	test(r==KErrPermissionDenied || r==KErrNotSupported);
+	test_Value(r, r == KErrPermissionDenied || r==KErrNotSupported);
 
 	r=TheFs.GetLongName(pritestfile1, longfilename);
-	test(r==KErrPermissionDenied || r==KErrNotSupported);
+	test_Value(r, r == KErrPermissionDenied || 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==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 	
 	r=TheFs.Rename(pritestfile,pritestfile1);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 	
 	r=TheFs.Entry(pritestfile1,entry);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 
 	r=TheFs.SetEntry(pritestfile1,testtime,KEntryAttNormal,KEntryAttReadOnly);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 
 	r=TheFs.Delete(pritestfile1);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 
 	r=TheFs.Delete(oldName);
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	__UHEAP_MARKEND;
 	}
@@ -180,22 +181,22 @@
 	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==KErrNone);
+	test_KErrNone(r);
 	
 	r=TheFs.RealName(_L("O:\\File.XXX"),realName);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 
 	r=TheFs.SetSubst(_L(""),EDriveO); //to unsubst
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	r=TheFs.SetSessionPath(systestname);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 	
 	TheFs.NotifyChange(ENotifyAll,aStat1,systestname);
 	test(aStat1==KErrPermissionDenied);
@@ -210,32 +211,32 @@
 	oldName[0]=(TText)gDriveToTest;
 
 	r=TheFs.GetShortName(systestfile, shortfilename);
-	test(r==KErrPermissionDenied || r==KErrNotSupported);
+	test_Value(r, r == KErrPermissionDenied || r==KErrNotSupported);
 
 	r=TheFs.GetLongName(systestfile1, longfilename);
-	test(r==KErrPermissionDenied || r==KErrNotSupported);
+	test_Value(r, r == KErrPermissionDenied || 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.Delete(systestfile1);
-	test(r==KErrNone || r==KErrNotFound);
+	test_Value(r, r == KErrNone || r==KErrNotFound);
 
 	r=TheFs.Rename(systestfile,systestfile1);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	
 	r=TheFs.Entry(systestfile1,entry);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 
 	r=TheFs.SetEntry(systestfile1,testtime,KEntryAttNormal,KEntryAttReadOnly);
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	r=TheFs.Delete(systestfile1);
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	__UHEAP_MARKEND;
 	}
@@ -254,22 +255,22 @@
 	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==KErrNone);
+	test_KErrNone(r);
 	
 	r=TheFs.RealName(_L("O:\\File.XXX"),realName);
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	r=TheFs.SetSubst(_L(""),EDriveO); //to unsubst
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	r=TheFs.SetSessionPath(restestname);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	
 	TheFs.NotifyChange(ENotifyAll,aStat4,restestname);
 	test(aStat4==KRequestPending);
@@ -284,32 +285,32 @@
 	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.Delete(restestfile1);
-	test(r==KErrNone || r==KErrNotFound);
+	test_Value(r, r == KErrNone || r==KErrNotFound);
 
 	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);
 
 
 	__UHEAP_MARKEND;
@@ -331,19 +332,19 @@
 	mkdirname.Append(KMkDirSub);
 
 	r=TheFs.MkDirAll(mkdirname);	
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 
 	r=TheFs.RmDir(mkdirname);	
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 
 	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==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 
 	TheFs.NotifyChange(ENotifyAll,aStat2,pritestname);
 	test(aStat2==KErrPermissionDenied);
@@ -359,29 +360,29 @@
 	oldName[0]=(TText)gDriveToTest;
 
 	r=TheFs.GetShortName(pritestfile, shortfilename);
-	test(r==KErrPermissionDenied || r==KErrNotSupported);
+	test_Value(r, r == KErrPermissionDenied || r==KErrNotSupported);
 
 	r=TheFs.GetLongName(pritestfile1, longfilename);
-	test(r==KErrPermissionDenied || r==KErrNotSupported);
+	test_Value(r, r == KErrPermissionDenied || 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==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 	
 	r=TheFs.Rename(pritestfile,pritestfile1);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 	
 	r=TheFs.Entry(pritestfile1,entry);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 
 	r=TheFs.SetEntry(pritestfile1,testtime,KEntryAttNormal,KEntryAttReadOnly);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 
 	r=TheFs.Delete(pritestfile1);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 
 
 	__UHEAP_MARKEND;
@@ -399,22 +400,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);	 //to unsubst
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	r=TheFs.SetSessionPath(theprivatepath);
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	TheFs.NotifyChange(ENotifyAll,aStat3,theprivatepath);
 	test(aStat3==KRequestPending);
@@ -429,29 +430,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);
 
 	__UHEAP_MARKEND;
 	}
@@ -465,10 +466,10 @@
 	__UHEAP_MARK;
 
 	r=TheFs.SetSessionPath(systestname);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 
 	r=file1.Temp(TheFs,systestname,fromTemp,EFileWrite);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	file1.Close();
 
 	systestfile=KSystemPath;
@@ -478,22 +479,22 @@
 	systestfile1.Append(KFileSys3);
 
 	r=file1.Create(TheFs,systestfile,EFileWrite);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	file1.Close();
 
 	r=file1.Open(TheFs,systestfile,EFileWrite);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	file1.Close();
 	
 	r=file1.Open(TheFs,systestfile,EFileRead);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 	file1.Close();
 
 	r=file1.Replace(TheFs,systestfile,EFileWrite);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	
 	r=file1.Rename(systestfile1);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	file1.Close();
 
     TFindFile finder(TheFs);
@@ -501,14 +502,14 @@
     r=finder.FindWildByDir(KWildFile, KWildPath, dir);
 	if (!(r==KErrPermissionDenied))
         test.Printf(_L("T_DCTCBDISKADMIN: test find wildcards r = %d (expected KErrPermissionDenied)\n"), r);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 //	delete dir;
 
 	r=TheFs.Delete(fromTemp);
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	r=TheFs.Delete(systestfile1);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	
 
 	__UHEAP_MARKEND;
@@ -522,50 +523,50 @@
 	__UHEAP_MARK;
 
 	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();	
 
 	r=TheFs.Delete(KFileRes);
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	r=TheFs.Delete(KFileRes3);
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	r=TheFs.Delete(fromTemp);
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	__UHEAP_MARKEND;
 	}
@@ -579,7 +580,7 @@
 	__UHEAP_MARK;
 
 	r=TheFs.SetSessionPath(pritestfalseidname);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 
 	// Since can't set the session path to what is required, so use
 	// an explicit path
@@ -588,23 +589,23 @@
 	pritestfile.Append(KFilePri);
 
 	r=file1.Temp(TheFs,pritestfalseidname,fromTemp,EFileWrite);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 	file1.Close();
 
 	r=file1.Create(TheFs,pritestfile,EFileWrite);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 	file1.Close();
 
 	r=file1.Open(TheFs,pritestfile,EFileWrite);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 	file1.Close();
 	
 	r=file1.Replace(TheFs,pritestfile,EFileWrite);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 
 	// Can't perform this operation since file1 has not been created
 /*	r=file1.Rename(KFilePri3);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 	file1.Close();
 */
 	__UHEAP_MARKEND;
@@ -620,10 +621,10 @@
 	__UHEAP_MARK;
 
 	r=TheFs.SetSessionPath(pritestname);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 
 	r=file1.Temp(TheFs,pritestname,fromTemp,EFileWrite);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 	file1.Close();
 
 	// Since can't set session path create explicit path
@@ -632,28 +633,28 @@
 	pritestfile.Append(KFilePri);
 
 	r=file1.Create(TheFs,pritestfile,EFileWrite);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 	file1.Close();
 
 	r=file1.Open(TheFs,pritestfile,EFileWrite);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 	file1.Close();
 	
 	r=file1.Open(TheFs,pritestfile,EFileRead);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 	file1.Close();
 	
 	r=file1.Replace(TheFs,pritestfile,EFileWrite);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 
 	// Can't rename nor delete since file1 not created
 /*
 	r=file1.Rename(KFilePri3);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 	file1.Close();
 
 	r=TheFs.Delete(fromTemp);
-	test(r==KErrNone);
+	test_KErrNone(r);
 */
 
 	__UHEAP_MARKEND;
@@ -669,36 +670,36 @@
 	__UHEAP_MARK;
 
 	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 || r==KErrAlreadyExists);
+	test_Value(r, r == KErrNone || r==KErrAlreadyExists);
 	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();
 
 	r=TheFs.Delete(KFilePri3);
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	r=TheFs.Delete(fromTemp);
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	__UHEAP_MARKEND;
 	}
@@ -716,10 +717,10 @@
 	TBuf<30> dirNameBuf(KSystemPath);
 	dirNameBuf[0]=(TText)gDriveToTest;
 	r=dir.Open(TheFs,dirNameBuf,KEntryAttNormal);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 	dir.Close();
 	r=TheFs.GetDir(dirNameBuf,KEntryAttMatchMask,ESortByName,dirEntries);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 	dirNameBuf.Zero();
 	delete dirEntries;
 
@@ -727,10 +728,10 @@
 	dirNameBuf=KPrivatePath;
 	dirNameBuf[0]=(TText)gDriveToTest;
 	r=dir.Open(TheFs,dirNameBuf,KEntryAttNormal);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 	dir.Close();
 	r=TheFs.GetDir(dirNameBuf,KEntryAttMatchMask,ESortByName,dirEntries);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 	dirNameBuf.Zero();
 	delete dirEntries;
 
@@ -738,10 +739,10 @@
 	dirNameBuf=KPrivateFalseID;
 	dirNameBuf[0]=(TText)gDriveToTest;
 	r=dir.Open(TheFs,dirNameBuf,KEntryAttNormal);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 	dir.Close();
 	r=TheFs.GetDir(dirNameBuf,KEntryAttMatchMask,ESortByName,dirEntries);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 	dirNameBuf.Zero();
 	delete dirEntries;
 
@@ -750,10 +751,10 @@
 	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
@@ -761,9 +762,9 @@
 	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;
 
@@ -779,20 +780,20 @@
 	__UHEAP_MARK;
 
 	r=TheFs.FileSystemName(fsname,gTheDriveNum);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	r = DismountFileSystem(TheFs, fsname, gTheDriveNum);
-	test(r==KErrNone || r==KErrNotFound);
+	test_Value(r, r == KErrNone || r==KErrNotFound);
 //	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();
@@ -818,11 +819,11 @@
 	test(aStat4==KErrNone);
 
 	r=TheFs.SetSessionPath(systestname);
-	test(r==KErrPermissionDenied);
+	test_Value(r, r == KErrPermissionDenied);
 	
 //Test RRawDisk class
 	r=rawdisk.Open(TheFs,gTheDriveNum);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	rawdisk.Close();
 
 	RDirtest();
@@ -833,21 +834,21 @@
 		{
 		//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);
+	test_Value(r, r == KErrNone || r==KErrNotSupported);
 	r=TheFs.CheckDisk(driveBuf);
-	test(r==KErrNone || r==KErrNotSupported);
+	test_Value(r, r == KErrNone || r==KErrNotSupported);
 
 	__UHEAP_MARKEND;
 	}
@@ -867,16 +868,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);
 
@@ -885,9 +886,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);
 
@@ -902,19 +903,19 @@
 	test.Next(_L("Delete test directory"));
 	CFileMan* fMan=CFileMan::NewL(TheFs);
 	TInt r=fMan->RmDir(gSessionPath);
-	test(r==KErrNone || r==KErrPathNotFound);
+	test_Value(r, r == KErrNone || r==KErrPathNotFound);
 
 	TBuf<20> delDir;
 	delDir=KResourcePath;
 	delDir[0]=(TText)gDriveToTest;
 	r=fMan->RmDir(delDir);
-	test(r==KErrNone || r==KErrPathNotFound);
+	test_Value(r, r == KErrNone || r==KErrPathNotFound);
 	delete fMan;
 
 	delDir=KSystemPath;
 	delDir[0]=(TText)gDriveToTest;
 	r=TheFs.RmDir(delDir);
-	test(r==KErrNone || r==KErrPathNotFound || r==KErrNotFound);
+	test_Value(r, r == KErrNone || r==KErrPathNotFound || r==KErrNotFound);
 	}
 
 GLDEF_C void CallTestsL(/*TChar aDriveLetter*/)
@@ -941,12 +942,12 @@
 	sesspath[0] = (TText)gDriveToTest;
 
 	TInt r= TheFs.SetSessionPath(sesspath);
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	//cleanup from previous run of this test
 	RProcess tp;
 	r=tp.Create(_L("clean_prepdc.exe"),sesspath);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	{
 	TRequestStatus ps;
 	tp.Logon(ps);
@@ -960,30 +961,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();