--- a/kerneltest/f32test/manager/t_oom.cpp Mon May 24 18:45:46 2010 +0100
+++ b/kerneltest/f32test/manager/t_oom.cpp Thu Jun 10 11:48:01 2010 +0100
@@ -15,6 +15,7 @@
//
//
+#define __E32TEST_EXTENSION__
#include <hal.h>
#include <f32file.h>
#include <e32test.h>
@@ -32,10 +33,10 @@
RFormat format;
TFileName sessionPath;
TInt r=TheFs.SessionPath(sessionPath);
- test(r==KErrNone);
+ test_KErrNone(r);
TInt count;
r=format.Open(TheFs,sessionPath,EHighDensity,count);
- test(r==KErrNone);
+ test_KErrNone(r);
// test(count==100);
// TRequestStatus status;
// TPckgBuf<TInt> step;
@@ -67,14 +68,14 @@
test.Printf(_L("FileSize = 0x%x\n"),size);
RFile file;
TInt r=file.Replace(TheFs,_L("\\F32-TST\\GOBBLE.DAT"),EFileRead);
- test(r==KErrNone);
+ test_KErrNone(r);
r=file.SetSize(size);
- test(r==KErrNone || r==KErrDiskFull);
+ test_Value(r, r == KErrNone || r==KErrDiskFull);
if (r==KErrDiskFull)
{
TFileName sessionPath;
r=TheFs.SessionPath(sessionPath);
- test(r==KErrNone);
+ test_KErrNone(r);
test.Printf(_L("Error %S diskfull\n"),&sessionPath);
// Reintroduce when we can detect that the test is being run manually
// test.Getch();
@@ -125,7 +126,7 @@
bfDir.Append(KTstDir);
test.Printf(_L("creating directory \"%S\".\n"), &bfDir);
r = TheFs.MkDir(bfDir);
- test(r == KErrNone);
+ test_KErrNone(r);
TBuf<3 + 3 + 8 + 1 + 3> bfFlNm(bfDir);
TInt ctr = 0; // create files until KErrDiskFull
@@ -140,11 +141,11 @@
RFile f;
r = f.Create(TheFs, bfFlNm, EFileShareExclusive | EFileStream | EFileWrite);
- test(r == KErrNone || r == KErrDiskFull);
+ test_Value(r, r == KErrNone || r == KErrDiskFull);
if (r == KErrNone)
{
r = f.SetSize(KFileSize);
- test(r == KErrNone || r == KErrDiskFull);
+ test_Value(r, r == KErrNone || r == KErrDiskFull);
}
f.Close();
@@ -184,7 +185,7 @@
TDriveInfo driveInfo;
TInt r=TheFs.Drive(driveInfo);
- test(r==KErrNone);
+ test_KErrNone(r);
if (driveInfo.iType==EMediaNotPresent)
{
test.Printf(_L("ERROR: MEDIA NOT PRESENT\n"));
@@ -195,9 +196,9 @@
TFileName sessionPath;
r=TheFs.SessionPath(sessionPath);
- test(r==KErrNone);
+ test_KErrNone(r);
r=TheFs.MkDirAll(sessionPath);
- test(r==KErrCorrupt || r==KErrAlreadyExists || r==KErrNone);
+ test_Value(r, r == KErrCorrupt || r==KErrAlreadyExists || r==KErrNone);
if (r==KErrCorrupt)
FormatFat();
if (r==KErrAlreadyExists)
@@ -205,13 +206,13 @@
test.Next(_L("Remove test directory"));
CFileMan* fman=CFileMan::NewL(TheFs);
TInt ret=fman->RmDir(sessionPath);
- test(ret==KErrNone);
+ test_KErrNone(ret);
delete fman;
}
if (r!=KErrNone)
{
r=TheFs.MkDirAll(sessionPath);
- test(r==KErrNone);
+ test_KErrNone(r);
}
Test1();