diff -r a232af6b0b1f -r a5496987b1da kerneltest/f32test/server/b_file.cpp --- a/kerneltest/f32test/server/b_file.cpp Wed Jun 23 12:58:21 2010 +0100 +++ b/kerneltest/f32test/server/b_file.cpp Thu Jul 01 17:57:33 2010 +0100 @@ -15,6 +15,7 @@ // // +#define __E32TEST_EXTENSION__ #include #include #include @@ -72,7 +73,7 @@ TInt pos=0; // Relative position zero aret=TheFile.Seek(ESeekCurrent,pos); test.Printf(_L("bwrite2,pos=%u\n"),pos); - test(aret==KErrNone); + test_KErrNone(aret); TInt count=pos&0xff; tbuf.SetLength(aLength); TText8* p=(TText8*)tbuf.Ptr(); @@ -98,7 +99,7 @@ CheckDisk(); TInt pos=0; // Relative position zero aret=TheFile.Seek(ESeekCurrent,pos); - test(aret==KErrNone); + test_KErrNone(aret); TInt count=pos&0xff; aret=TheFile.Read(tbuf,aLength); if (bret b; b.Format(TPtrC8((TUint8*)"%8x"),Math::Rand(seed)); aret=TheFile.Write(b); - test(aret==KErrNone); + test_KErrNone(aret); } TheFile.Close(); // test.Next(_L("Reading back")); seed=zero; aret=TheFile.Open(TheFs,rndm,aMode); - test(aret==KErrNone); + test_KErrNone(aret); for (cnt=0;cnt b; b.Format(TPtrC8((TUint8*)"%8x"),Math::Rand(seed)); TBuf8<8> r; aret=TheFile.Read(r); - test(aret==KErrNone); + test_KErrNone(aret); test(b==r); } TheFile.Close(); aret=TheFs.Delete(rndm); - test(aret==KErrNone); + test_KErrNone(aret); // test.End(); } @@ -264,14 +265,14 @@ test.Start(_L("TAutoClose...")); TAutoClose f; aret=f.iObj.Replace(TheFs,rndm,EFileWrite); - test(aret==KErrNone); + test_KErrNone(aret); TInt64 seed; for (TInt cnt=0;cnt b; b.Format(TPtrC8((TUint8*)"%8x"),Math::Rand(seed)); aret=f.iObj.Write(b); - test(aret==KErrNone); + test_KErrNone(aret); } test.End(); } @@ -283,7 +284,7 @@ TRequestStatus status = KRequestPending; TheFile.Open(TheFs,tbin,EFileRead); ret = TheFile.Read(0,tbuf,-1); // sync - test ( ret == KErrArgument); + test_Value(ret, ret == KErrArgument); TheFile.Read(0,tbuf,-1,status); // async User::WaitForRequest(status); test(status.Int() == KErrArgument); @@ -299,16 +300,16 @@ RFile f; MakeFile(_L("C:\\F32-TST\\TFILE\\hello2.txt")); TInt r=f.Open(TheFs,_L("C:\\F32-TST\\TFILE\\hello2.txt"),EFileRead); - test(r==KErrNone); + test_KErrNone(r); TBuf8<0x100> a; test.Next(_L("Check Negative length when file is empty")); r=f.Read(a, -10); - test(r==KErrArgument); + test_Value(r, r == KErrArgument); r=f.Read(0,a, -1); - test(r==KErrArgument); + test_Value(r, r == KErrArgument); r=f.Read(0,a, -10); - test(r==KErrArgument); + test_Value(r, r == KErrArgument); TRequestStatus stat1; f.Read(0,a,-5,stat1); User::WaitForRequest(stat1);