kerneltest/f32test/server/t_dcallcaps.cpp
changeset 109 b3a1d9898418
parent 0 a41df078684a
child 245 647ab20fee2e
--- a/kerneltest/f32test/server/t_dcallcaps.cpp	Mon May 03 13:47:38 2010 +0300
+++ b/kerneltest/f32test/server/t_dcallcaps.cpp	Fri May 14 17:13:29 2010 +0300
@@ -13,6 +13,7 @@
 // Description:
 //
 
+#define __E32TEST_EXTENSION__
 #include <f32file.h>
 #include <e32test.h>
 #include <e32std.h>
@@ -105,22 +106,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==KErrNone);
+	test_KErrNone(r);
 
 	r=TheFs.SetSubst(_L(""),EDriveO); //to unsubst
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	r=TheFs.SetSessionPath(systestname);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	
 	TheFs.NotifyChange(ENotifyAll,aStat1,systestname);
 	test(aStat1==KRequestPending);
@@ -135,29 +136,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()
@@ -172,22 +173,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); 
-	test(r==KErrNone);
+	test_KErrNone(r);
 
 	r=TheFs.SetSessionPath(restestname);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	
 	TheFs.NotifyChange(ENotifyAll,aStat4,restestname);
 	test(aStat4==KRequestPending);
@@ -202,29 +203,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==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);
 
 	}
 
@@ -243,22 +244,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);
@@ -274,29 +275,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);
 
 	}
 
@@ -316,22 +317,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);
@@ -347,29 +348,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);
 
 	}
 
@@ -383,22 +384,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);
@@ -413,29 +414,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);
 	}
 
 
@@ -446,29 +447,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);
@@ -476,7 +477,7 @@
     r=finder.FindWildByDir(KWildFile, KWildPath, dir);
 	if (!(r==KErrNone))
         test.Printf(_L("T_DCALLCAPS: test find wildcards r = %d (expected KErrNone)\n"), r);
-	test(r==KErrNone);
+	test_KErrNone(r);
 	delete dir;
 	}
 
@@ -486,40 +487,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();	
 	}
 
@@ -530,29 +531,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();
 	}
 
@@ -562,29 +563,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();
 	}
 
@@ -596,29 +597,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();
 	}
 
@@ -633,30 +634,30 @@
 	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;
 	//Private//falseID
 	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
@@ -664,19 +665,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;
 	}
@@ -688,20 +689,20 @@
 //
 	{
 	r=TheFs.FileSystemName(fsname,gTheDriveNum);
-	test(r==KErrNone || r==KErrNotFound);
+	test_Value(r, r == KErrNone || r==KErrNotFound);
 	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();
@@ -727,11 +728,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();
@@ -742,21 +743,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);
 	}
 
 LOCAL_C void TestCaps()
@@ -777,16 +778,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);
 
@@ -795,9 +796,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);
 	}
@@ -810,7 +811,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;
 	}
 
@@ -827,7 +828,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;
@@ -835,15 +836,15 @@
 	delDir=KResourcePath;
 	delDir[0]=(TText)gDriveToTest;
 	r=fMan->RmDir(delDir);
-	test(r==KErrNone || KErrNotFound);
+	test_Value(r, r == KErrNone || r == KErrNotFound);
 	delDir=KSystemPath;
 	delDir[0]=(TText)gDriveToTest;
 	r=fMan->RmDir(delDir);
-	test(r==KErrNone || KErrNotFound);
+	test_Value(r, r == KErrNone || r == KErrNotFound);
 	delDir=KPrivatePath;
 	delDir[0]=(TText)gDriveToTest;
 	r=fMan->RmDir(delDir);
-	test(r==KErrNone || KErrNotFound);
+	test_Value(r, r == KErrNone || r == KErrNotFound);
 	delete fMan;
 
 	//check double mode ie that Defpath still works	
@@ -851,30 +852,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();