diff -r 5e441a173c63 -r d9f1e5bfe28c kerneltest/f32test/server/t_notify.cpp --- a/kerneltest/f32test/server/t_notify.cpp Mon May 24 18:45:46 2010 +0100 +++ b/kerneltest/f32test/server/t_notify.cpp Thu Jun 10 11:48:01 2010 +0100 @@ -15,6 +15,7 @@ // // +#define __E32TEST_EXTENSION__ #include #include #include @@ -109,9 +110,9 @@ { RFs fs; TInt r=fs.Connect(); - test(r==KErrNone); + test_KErrNone(r); r=fs.SetSessionPath(gSessionPath); - test(r==KErrNone); + test_KErrNone(r); TTestCode testCode=*(TTestCode*)&aTestCode; RFile f; switch (testCode) @@ -119,19 +120,19 @@ case ETest1: r=f.Replace(fs,_L("\\F32-TST\\NOTIFY\\NewFile.txt"),EFileStream); - test(r==KErrNone); + test_KErrNone(r); f.Close(); break; case ETest2: r=f.Replace(fs,_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Dorothy.doc"),EFileStream); - test(r==KErrNone); + test_KErrNone(r); f.Close(); break; case ETest3: r=fs.MkDir(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\SCARECROW\\")); - test((r==KErrNone)||(r==KErrAlreadyExists)); + test_Value(r, (r == KErrNone)||(r==KErrAlreadyExists)); break; case ETest4: @@ -148,34 +149,34 @@ { RFile file; TInt r=file.Open(fs,_L("\\F32-TST\\NOTIFY\\kangaroo.txt"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); r=file.SetSize(sizeof(TCheckedUid)); - test(r==KErrNone); + test_KErrNone(r); r=file.Write(sizeof(TCheckedUid),_L8("012345678912")); - test(r==KErrNone); + test_KErrNone(r); TBuf8<64> dum; r=file.Read(0,dum); - test(r==KErrNone); + test_KErrNone(r); file.Close(); r=file.Open(fs,_L("\\F32-TST\\NOTIFY\\koala.txt"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); r=file.SetSize(50); - test(r==KErrNone); + test_KErrNone(r); r=file.Write(sizeof(TCheckedUid),_L8("ABCDEFGHIJKLMNOPQRSTUVWXYZ")); - test(r==KErrNone); + test_KErrNone(r); r=file.Read(0,dum); - test(r==KErrNone); + test_KErrNone(r); file.Close(); r=file.Open(fs,_L("\\F32-TST\\NOTIFY\\dingo.txt"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); r=file.SetSize(50); - test(r==KErrNone); + test_KErrNone(r); r=file.Write(sizeof(TCheckedUid),_L8("01234567890123456789")); - test(r==KErrNone); + test_KErrNone(r); r=file.Read(0,dum); - test(r==KErrNone); + test_KErrNone(r); file.Close(); gSleepThread.Signal(); } @@ -193,9 +194,9 @@ { RFile file; TInt r=file.Open(fs,_L("\\F32-TST\\NOTIFY\\NewFILE.TXT"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); r=file.Write(_L8("asdfasdfasdf")); - test(r==KErrNone); + test_KErrNone(r); file.Close(); gSleepThread.Signal(); } @@ -204,7 +205,7 @@ case ETest8: { r=f.Open(fs,_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\WickedWitch.msg"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); f.SetSize(500); f.Close(); break; @@ -224,7 +225,7 @@ { TFileName path=_L("\\F32-TST\\NOTIFY\\BehindTheCurtain\\"); r=fs.MkDir(path); - test(r==KErrNone); + test_KErrNone(r); break; } case ETest11: @@ -232,7 +233,7 @@ TFileName path=_L("\\F32-TST\\NOTIFY\\BehindTheCurtain\\PayNoAttention.man"); RFile file; r=file.Replace(fs,path,EFileStream); - test(r==KErrNone); + test_KErrNone(r); file.Close(); break; } @@ -240,12 +241,12 @@ { RFile writer; TInt r=writer.Open(fs,_L("\\F32-TST\\NOTIFY\\NewFile.txt"),EFileWrite|EFileShareAny); - test(r==KErrNone); + test_KErrNone(r); TInt i; for(i=0; i<10; i++) { r=writer.Write(_L8("ABCDEFGHIJKLMNOPQRSTUVWXYZ")); - test(r==KErrNone); + test_KErrNone(r); User::After(1000000); } writer.Close(); @@ -288,7 +289,7 @@ TheFs.NotifyChange(ENotifyEntry,reqStat); RThread thread; r=thread.Create(_L("MyThread"),ThreadEntryPoint,KDefaultStackSize,KHeapSize,KHeapSize,(TAny*)ETest1); - test(r==KErrNone); + test_KErrNone(r); thread.Logon(thrdStat); thread.Resume(); User::WaitForRequest(thrdStat); @@ -299,7 +300,7 @@ RFile file; r=file.Open(TheFs,_L("\\F32-TST\\NOTIFY\\NewFile.txt"),EFileRead|EFileWrite|EFileShareExclusive); - test(r==KErrNone); + test_KErrNone(r); file.Write(_L8("Somewhere over the rainbow..."),reqStat); User::WaitForRequest(reqStat); test(reqStat==KErrNone); @@ -310,13 +311,13 @@ file.Close(); r=file.Open(TheFs,_L("\\F32-TST\\NOTIFY\\NewFile.txt"),EFileRead|EFileReadAsyncAll|EFileShareExclusive); - test(r==KErrArgument); + test_Value(r, r == KErrArgument); r=file.Open(TheFs,_L("\\F32-TST\\NOTIFY\\NewFile.txt"),EFileRead|EFileReadAsyncAll|EFileShareReadersOnly); - test(r==KErrArgument); + test_Value(r, r == KErrArgument); r=file.Open(TheFs,_L("\\F32-TST\\NOTIFY\\NewFile.txt"),EFileRead|EFileReadAsyncAll|EFileShareAny); - test(r==KErrNone); + test_KErrNone(r); file.Read(0, buf, 100, reqStat); test(reqStat==KRequestPending); file.Close(); @@ -324,7 +325,7 @@ test(reqStat==KErrCancel); r=file.Open(TheFs,_L("\\F32-TST\\NOTIFY\\NewFile.txt"),EFileRead|EFileReadAsyncAll|EFileShareAny); - test(r==KErrNone); + test_KErrNone(r); file.Read(0, buf, 100, reqStat); test(reqStat==KRequestPending); file.ReadCancel(reqStat); @@ -333,7 +334,7 @@ file.Close(); r=file.Open(TheFs,_L("\\F32-TST\\NOTIFY\\NewFile.txt"),EFileRead|EFileReadAsyncAll|EFileWrite|EFileShareAny); - test(r==KErrNone); + test_KErrNone(r); file.Read(0, buf, 100, reqStat); test(reqStat==KRequestPending); file.SetSize(100); @@ -386,19 +387,19 @@ TRequestStatus reqStat1(KRequestPending); RFs fs1; TInt r=fs1.Connect(); - test(r==KErrNone); + test_KErrNone(r); fs1.NotifyChange(ENotifyEntry,reqStat1); TRequestStatus reqStat2(KRequestPending); RFs fs2; r=fs2.Connect(); - test(r==KErrNone); + test_KErrNone(r); fs2.NotifyChange(ENotifyEntry,reqStat2); test(reqStat1==KRequestPending); test(reqStat2==KRequestPending); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\NEWFILE.TXT")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat1); User::WaitForRequest(reqStat2); test(reqStat1==KErrNone); @@ -414,7 +415,7 @@ test.Next(_L("Cancel notification")); RFs fs1; TInt r=fs1.Connect(); - test(r==KErrNone); + test_KErrNone(r); TRequestStatus status1; TRequestStatus status2; @@ -511,7 +512,7 @@ test.Next(_L("Kill client")); TInt r=gSleepThread.CreateLocal(0); - test(r==KErrNone); + test_KErrNone(r); RThread clientThread; r=clientThread.Create(_L("ClientThread"),ThreadEntryPoint,0x4000,KHeapSize,KHeapSize,(TAny*)ETest4); if (r!=KErrNone) @@ -532,7 +533,7 @@ clientThread.Close(); r=TheFs.MkDir(_L("\\F32-TST\\NOTIFY\\")); - test(r==KErrNone || r==KErrAlreadyExists); + test_Value(r, r == KErrNone || r==KErrAlreadyExists); MakeFile(_L("\\F32-TST\\NOTIFY\\NewFile.Txt")); User::After(1000); } @@ -548,13 +549,13 @@ RFile file; TInt r=file.Replace(TheFs,_L("\\F32-TST\\NOTIFY\\kangaroo.txt"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); file.Close(); r=file.Replace(TheFs,_L("\\F32-TST\\NOTIFY\\koala.txt"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); file.Close(); r=file.Replace(TheFs,_L("\\F32-TST\\NOTIFY\\dingo.txt"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); file.Close(); TRequestStatus reqStat=0; @@ -562,23 +563,23 @@ test(reqStat==KRequestPending); r=gSleepThread.CreateLocal(0); - test(r==KErrNone); + test_KErrNone(r); RThread clientThread; r=clientThread.Create(_L("Test5Thread"),ThreadEntryPoint,0x4000,KHeapSize,KHeapSize,(TAny*)ETest5); - test(r==KErrNone); + test_KErrNone(r); clientThread.Resume(); gSleepThread.Wait(); test(reqStat==KRequestPending); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\kangaroo.txt")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\koala.txt")); - test(r==KErrNone); + test_KErrNone(r); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\dingo.txt")); - test(r==KErrNone); + test_KErrNone(r); @@ -594,7 +595,7 @@ { TDriveInfo driveInfo; TInt r=TheFs.Drive(driveInfo,CurrentDrive()); - test(r==KErrNone); + test_KErrNone(r); // only test on removable media if (driveInfo.iDriveAtt&KDriveAttRemovable) { @@ -606,10 +607,10 @@ TheFs.NotifyChange(ENotifyEntry,reqStat); test(reqStat==KRequestPending); r=gSleepThread.CreateLocal(0); - test(r==KErrNone); + test_KErrNone(r); RThread clientThread; r=clientThread.Create(_L("Test6Thread"),ThreadEntryPoint,0x4000,KHeapSize,KHeapSize,(TAny*)ETest6); - test(r==KErrNone); + test_KErrNone(r); clientThread.Resume(); gSleepThread.Wait(); TInt reqInt=reqStat.Int(); @@ -623,7 +624,7 @@ //-- it seems that after generating media change the meia driver isn't ready for some time User::After(2000000); r=TheFs.Drive(driveInfo,CurrentDrive()); - test(r==KErrNone); + test_KErrNone(r); } @@ -643,16 +644,16 @@ test(reqStat==KRequestPending); r=gSleepThread.CreateLocal(0); - test(r==KErrNone); + test_KErrNone(r); RThread clientThread; r=clientThread.Create(_L("Test7Thread"),ThreadEntryPoint,0x4000,KHeapSize,KHeapSize,(TAny*)ETest7); - test(r==KErrNone); + test_KErrNone(r); clientThread.Resume(); gSleepThread.Wait(); test(reqStat==KRequestPending); r=TheFs.Delete(_L("Newfile.txt")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); @@ -669,7 +670,7 @@ { TDriveInfo driveInfo; TInt r=TheFs.Drive(driveInfo,CurrentDrive()); - test(r==KErrNone); + test_KErrNone(r); // only test on removable media if (driveInfo.iDriveAtt&KDriveAttRemovable) { @@ -680,11 +681,11 @@ TheFs.NotifyChange(ENotifyEntry,reqStat,path); test(reqStat==KRequestPending); r=gSleepThread.CreateLocal(0); - test(r==KErrNone); + test_KErrNone(r); RThread clientThread; gSocketNumber=0; r=clientThread.Create(_L("Test6Thread1"),ThreadEntryPoint,0x4000,KHeapSize,KHeapSize,(TAny*)ETest6); //only generates a media change on removable media - test(r==KErrNone); + test_KErrNone(r); clientThread.Resume(); gSleepThread.Wait(); User::WaitForRequest(reqStat); @@ -696,15 +697,15 @@ //-- it seems that after generating media change the meia driver isn't ready for some time User::After(2000000); r=TheFs.Drive(driveInfo,CurrentDrive()); - test(r==KErrNone); + test_KErrNone(r); TheFs.NotifyChange(ENotifyDisk,reqStat,path); test(reqStat==KRequestPending); r=gSleepThread.CreateLocal(0); - test(r==KErrNone); + test_KErrNone(r); r=clientThread.Create(_L("Test6Thread2"),ThreadEntryPoint,0x4000,KHeapSize,KHeapSize,(TAny*)ETest6); - test(r==KErrNone); + test_KErrNone(r); clientThread.Resume(); gSleepThread.Wait(); User::WaitForRequest(reqStat); @@ -716,14 +717,14 @@ //-- it seems that after generating media change the meia driver isn't ready for some time User::After(2000000); r=TheFs.Drive(driveInfo,CurrentDrive()); - test(r==KErrNone); + test_KErrNone(r); TheFs.NotifyChange(ENotifyWrite,reqStat,path); test(reqStat==KRequestPending); r=gSleepThread.CreateLocal(0); - test(r==KErrNone); + test_KErrNone(r); r=clientThread.Create(_L("Test6Thread3"),ThreadEntryPoint,0x4000,KHeapSize,KHeapSize,(TAny*)ETest6); - test(r==KErrNone); + test_KErrNone(r); clientThread.Resume(); gSleepThread.Wait(); User::WaitForRequest(reqStat); @@ -735,7 +736,7 @@ //-- it seems that after generating media change the meia driver isn't ready for some time User::After(2000000); r=TheFs.Drive(driveInfo,CurrentDrive()); - test(r==KErrNone); + test_KErrNone(r); } } @@ -750,7 +751,7 @@ // First a simple example TInt r=TheFs.RmDir(_L("\\F32-TST\\NOTIFY\\BehindTheCurtain\\")); - test((r==KErrNotFound)||(r==KErrPathNotFound)||(r==KErrNone)); + test_Value(r, (r == KErrNotFound)||(r==KErrPathNotFound)||(r==KErrNone)); TFileName path=_L("\\F32-TST\\NOTIFY\\BehindTheCurtain\\"); TRequestStatus reqStat(KRequestPending); @@ -758,7 +759,7 @@ test(reqStat==KRequestPending); r=TheFs.MkDir(_L("\\F32-TST\\NOTIFY\\BehindTheCurtain\\")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); @@ -769,14 +770,14 @@ RFile file; r=file.Replace(TheFs,path,EFileStream); - test(r==KErrNone); + test_KErrNone(r); file.Close(); User::WaitForRequest(reqStat); test(reqStat==KErrNone); r=TheFs.Delete(path); - test(r==KErrNone); + test_KErrNone(r); TheFs.NotifyChange(ENotifyEntry,reqStat,path); test(reqStat==KRequestPending); @@ -790,14 +791,14 @@ test(reqStat==KRequestPending); r=file.Replace(TheFs,path,EFileStream); - test(r==KErrNone); + test_KErrNone(r); file.Close(); User::WaitForRequest(reqStat); test(reqStat==KErrNone); r=TheFs.Delete(path); - test(r==KErrNone); + test_KErrNone(r); TheFs.NotifyChange(ENotifyFile,reqStat,path); test(reqStat==KRequestPending); @@ -811,14 +812,14 @@ test(reqStat==KRequestPending); r=file.Replace(TheFs,path,EFileStream); - test(r==KErrNone); + test_KErrNone(r); file.Close(); User::WaitForRequest(reqStat); test(reqStat==KErrNone); // Monitoring attributes but informed anyway r=TheFs.Delete(path); - test(r==KErrNone); + test_KErrNone(r); TheFs.NotifyChange(ENotifyAttributes,reqStat,path); test(reqStat==KRequestPending); @@ -832,14 +833,14 @@ test(reqStat==KRequestPending); r=file.Replace(TheFs,path,EFileStream); - test(r==KErrNone); + test_KErrNone(r); file.Close(); User::WaitForRequest(reqStat); test(reqStat==KErrNone); // Monitoring file writing but informed anyway r=TheFs.Delete(path); - test(r==KErrNone); + test_KErrNone(r); TheFs.NotifyChange(ENotifyWrite,reqStat,path); test(reqStat==KRequestPending); @@ -853,14 +854,14 @@ test(reqStat==KRequestPending); r=file.Replace(TheFs,path,EFileStream); - test(r==KErrNone); + test_KErrNone(r); file.Close(); User::WaitForRequest(reqStat); test(reqStat==KErrNone); // Monitoring disk activity but informed anyway r=TheFs.Delete(path); - test(r==KErrNone); + test_KErrNone(r); TheFs.NotifyChange(ENotifyAttributes,reqStat,path); test(reqStat==KRequestPending); @@ -877,16 +878,16 @@ test(reqStat==KRequestPending); TheFs.MkDir(path); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); TheFs.RmDir(path); - test(r==KErrNone); + test_KErrNone(r); TheFs.NotifyChange(ENotifyDir,reqStat,path); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); // Now cancel the outstanding request @@ -895,7 +896,7 @@ test(reqStat==KErrCancel); TheFs.NotifyChange(ENotifyDir,reqStat,path); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); // Get a separate thread to create the directory @@ -912,13 +913,13 @@ test(reqStat==KErrNone); TheFs.RmDir(path); - test(r==KErrNone); + test_KErrNone(r); // Check that notification is not received for a non-existent file if only the previously // non existent directory that contains it is created path=_L("\\F32-TST\\NOTIFY\\BehindTheCurtain\\PayNoAttention.man"); TheFs.NotifyChange(ENotifyEntry,reqStat,path); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); thread.Create(_L("RequestAheadThread"),ThreadEntryPoint,KDefaultStackSize,KHeapSize,KHeapSize,(TAny*)ETest10); @@ -942,10 +943,10 @@ test(reqStat==KErrNone); TheFs.Delete(path); - test(r==KErrNone); + test_KErrNone(r); TheFs.NotifyChange(ENotifyEntry,reqStat,path); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); // Now cancel the outstanding request @@ -955,7 +956,7 @@ path=_L("\\F32-TST\\NOTIFY\\BehindTheCurtain\\"); TheFs.RmDir(path); - test(r==KErrNone); + test_KErrNone(r); } @@ -974,7 +975,7 @@ test(reqStat==KRequestPending); RThread thread; TInt r=thread.Create(_L("MyThread"),ThreadEntryPoint,KDefaultStackSize,KHeapSize,KHeapSize,(TAny*)ETest1); - test(r==KErrNone); + test_KErrNone(r); thread.Logon(thrdStat); thread.Resume(); User::WaitForRequest(thrdStat); @@ -988,7 +989,7 @@ TheFs.NotifyChange(ENotifyEntry,reqStat,path); test(reqStat==KRequestPending); r=thread.Create(_L("MyThread2"),ThreadEntryPoint,KDefaultStackSize,KHeapSize,KHeapSize,(TAny*)ETest1); - test(r==KErrNone); + test_KErrNone(r); thread.Logon(thrdStat); thread.Resume(); User::WaitForRequest(thrdStat); @@ -1010,7 +1011,7 @@ TheFs.NotifyChange(ENotifyEntry,reqStat,path); test(reqStat==KRequestPending); r=thread.Create(_L("MyThread3"),ThreadEntryPoint,KDefaultStackSize,KHeapSize,KHeapSize,(TAny*)ETest1); - test(r==KErrNone); + test_KErrNone(r); thread.Logon(thrdStat); thread.Resume(); User::WaitForRequest(thrdStat); @@ -1024,12 +1025,12 @@ // will occur - this is tested for in Test18()) test.Next(_L("Test changing above monitored directory")); r=TheFs.MkDir(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\")); - test((r==KErrNone)||(r==KErrAlreadyExists)); + test_Value(r, (r == KErrNone)||(r==KErrAlreadyExists)); path=_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\"); TheFs.NotifyChange(ENotifyEntry,reqStat,path); test(reqStat==KRequestPending); r=thread.Create(_L("MyThread4"),ThreadEntryPoint,KDefaultStackSize,KHeapSize,KHeapSize,(TAny*)ETest1); - test(r==KErrNone); + test_KErrNone(r); thread.Logon(thrdStat); thread.Resume(); User::WaitForRequest(thrdStat); @@ -1046,7 +1047,7 @@ TheFs.NotifyChange(ENotifyEntry,reqStat,path); test(reqStat==KRequestPending); r=thread.Create(_L("MyThread5"),ThreadEntryPoint,KDefaultStackSize,KHeapSize,KHeapSize,(TAny*)ETest2); - test(r==KErrNone); + test_KErrNone(r); thread.Logon(thrdStat); thread.Resume(); User::WaitForRequest(thrdStat); @@ -1059,7 +1060,7 @@ TheFs.NotifyChange(ENotifyEntry,reqStat,path); test(reqStat==KRequestPending); r=thread.Create(_L("MyThread6"),ThreadEntryPoint,KDefaultStackSize,KHeapSize,KHeapSize,(TAny*)ETest3); - test(r==KErrNone); + test_KErrNone(r); thread.Logon(thrdStat); thread.Resume(); User::WaitForRequest(thrdStat); @@ -1071,26 +1072,26 @@ TheFs.NotifyChange(ENotifyEntry,reqStat,path); test(reqStat==KRequestPending); r=TheFs.MkDir(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\SCARECROW\\TINMAN\\")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); r=TheFs.RmDir(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\SCARECROW\\TINMAN\\")); - test(r==KErrNone); + test_KErrNone(r); r=TheFs.RmDir(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\SCARECROW\\")); - test(r==KErrNone); + test_KErrNone(r); // Test again that notification doesn't occur above the subdirectory being monitored test.Next(_L("Test changing above monitored directory")); r=TheFs.MkDir(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\")); - test((r==KErrNone)||(r==KErrAlreadyExists)); + test_Value(r, (r == KErrNone)||(r==KErrAlreadyExists)); path=_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\"); TheFs.NotifyChange(ENotifyEntry,reqStat,path); test(reqStat==KRequestPending); r=thread.Create(_L("MyThread7"),ThreadEntryPoint,KDefaultStackSize,KHeapSize,KHeapSize,(TAny*)ETest1); - test(r==KErrNone); + test_KErrNone(r); thread.Logon(thrdStat); thread.Resume(); User::WaitForRequest(thrdStat); @@ -1107,13 +1108,13 @@ TheFs.NotifyChange(ENotifyEntry,reqStat,path); test(reqStat==KRequestPending); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Dorothy.doc")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); RFile file; r=file.Replace(TheFs,_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\WickedWitch.msg"),EFileStream); - test(r==KErrNone); + test_KErrNone(r); file.Close(); // Test notification on a specific file @@ -1122,7 +1123,7 @@ TheFs.NotifyChange(ENotifyAll,reqStat,path); test(reqStat==KRequestPending); r=thread.Create(_L("MyThread8"),ThreadEntryPoint,KDefaultStackSize,KHeapSize,KHeapSize,(TAny*)ETest8); - test(r==KErrNone); + test_KErrNone(r); thread.Logon(thrdStat); thread.Resume(); User::WaitForRequest(thrdStat); @@ -1151,7 +1152,7 @@ TheFs.NotifyChange(ENotifyEntry,reqStat,path); test(reqStat==KRequestPending); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\WickedWitch.Msg")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); @@ -1166,7 +1167,7 @@ TheFs.NotifyChange(ENotifyEntry,reqStat,path); test(reqStat==KRequestPending); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Dorothy.Doc")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); @@ -1174,7 +1175,7 @@ TheFs.NotifyChange(ENotifyEntry,reqStat,path); test(reqStat==KRequestPending); r=TheFs.RmDir(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); @@ -1184,7 +1185,7 @@ test(reqStat==KRequestPending); // Now create the directory we are waiting on r=TheFs.MkDir(path); - test(r==KErrNone); + test_KErrNone(r); // Make sure the notification has now been received User::WaitForRequest(reqStat); test(reqStat==KErrNone); @@ -1195,7 +1196,7 @@ test(reqStat==KRequestPending); // Now create the file we are waiting on r=file.Replace(TheFs,path,EFileStream); - test(r==KErrNone); + test_KErrNone(r); file.Close(); // Make sure the notification has now been received User::WaitForRequest(reqStat); @@ -1204,14 +1205,14 @@ TheFs.NotifyChange(ENotifyEntry,reqStat,path); test(reqStat==KRequestPending); r=TheFs.Delete(path); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); path=_L("\\F32-TST\\NOTIFY\\GOOD_WITCH\\"); TheFs.NotifyChange(ENotifyEntry,reqStat,path); test(reqStat==KRequestPending); r=TheFs.RmDir(path); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); // test passing in an empty string @@ -1231,13 +1232,13 @@ // Create five sessions monitoring various levels of a directory tree TInt r=TheFs.MkDir(_L("\\F32-TST\\NOTIFY\\ANIMAL\\")); - test((r==KErrNone)||(r==KErrAlreadyExists)); + test_Value(r, (r == KErrNone)||(r==KErrAlreadyExists)); RFile file; r=file.Replace(TheFs,_L("\\F32-TST\\NOTIFY\\ANIMAL\\cat.txt"),EFileStream); - test(r==KErrNone); + test_KErrNone(r); file.Close(); r=file.Replace(TheFs,_L("\\F32-TST\\NOTIFY\\ANIMAL\\dog.txt"),EFileStream); - test(r==KErrNone); + test_KErrNone(r); file.Close(); TFileName path1=_L("\\F32-TST\\"); @@ -1250,49 +1251,49 @@ TRequestStatus reqStat1(KRequestPending); RFs fs1; r=fs1.Connect(); - test(r==KErrNone); + test_KErrNone(r); r=fs1.SetSessionPath(gSessionPath); - test(r==KErrNone); + test_KErrNone(r); fs1.NotifyChange(ENotifyEntry,reqStat1,path1); TRequestStatus reqStat2(KRequestPending); RFs fs2; r=fs2.Connect(); - test(r==KErrNone); + test_KErrNone(r); r=fs2.SetSessionPath(gSessionPath); - test(r==KErrNone); + test_KErrNone(r); fs2.NotifyChange(ENotifyEntry,reqStat2,path2); TRequestStatus reqStat3(KRequestPending); RFs fs3; r=fs3.Connect(); - test(r==KErrNone); + test_KErrNone(r); r=fs3.SetSessionPath(gSessionPath); - test(r==KErrNone); + test_KErrNone(r); fs3.NotifyChange(ENotifyEntry,reqStat3,path3); TRequestStatus reqStat4(KRequestPending); RFs fs4; r=fs4.Connect(); - test(r==KErrNone); + test_KErrNone(r); r=fs4.SetSessionPath(gSessionPath); - test(r==KErrNone); + test_KErrNone(r); fs4.NotifyChange(ENotifyEntry,reqStat4,path4); TRequestStatus reqStat5(KRequestPending); RFs fs5; r=fs5.Connect(); - test(r==KErrNone); + test_KErrNone(r); r=fs5.SetSessionPath(gSessionPath); - test(r==KErrNone); + test_KErrNone(r); fs5.NotifyChange(ENotifyEntry,reqStat5,path5); TRequestStatus reqStat6(KRequestPending); RFs fs6; r=fs6.Connect(); - test(r==KErrNone); + test_KErrNone(r); r=fs6.SetSessionPath(gSessionPath); - test(r==KErrNone); + test_KErrNone(r); fs6.NotifyChange(ENotifyEntry,reqStat6,path6); test(reqStat1==KRequestPending); @@ -1306,7 +1307,7 @@ // that level is notified test.Next(_L("Test only client monitoring top level is notified")); r=file.Replace(TheFs,_L("\\F32-TST\\NewFile.txt"),EFileStream); - test(r==KErrNone); + test_KErrNone(r); file.Close(); User::WaitForRequest(reqStat1); test(reqStat1==KErrNone); @@ -1318,7 +1319,7 @@ test(reqStat6==KErrNone); r=TheFs.Delete(_L("\\F32-TST\\NewFile.txt")); - test(r==KErrNone); + test_KErrNone(r); // Renew the notify request at the top level and make a change one step lower fs1.NotifyChange(ENotifyEntry,reqStat1,path1); @@ -1328,7 +1329,7 @@ test.Next(_L("Test clients monitoring levels 1 and 2 are notified")); r=file.Replace(TheFs,_L("\\F32-TST\\NOTIFY\\NewFile.txt"),EFileStream); - test(r==KErrNone); + test_KErrNone(r); file.Close(); User::WaitForRequest(reqStat1); @@ -1342,7 +1343,7 @@ test(reqStat6==KErrNone); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\NewFile.txt")); - test(r==KErrNone); + test_KErrNone(r); // Renew the notify request at the top and second levels and make a change // one step lower still @@ -1355,7 +1356,7 @@ test.Next(_L("Test clients monitoring levels 1,2 and 3 are notified")); r=file.Replace(TheFs,_L("\\F32-TST\\NOTIFY\\ANIMAL\\NewFile.txt"),EFileStream); - test(r==KErrNone); + test_KErrNone(r); file.Close(); User::WaitForRequest(reqStat1); @@ -1370,7 +1371,7 @@ test(reqStat6==KErrNone); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\ANIMAL\\NewFile.txt")); - test(r==KErrNone); + test_KErrNone(r); // Renew the notify request at the top, second and third levels and make a change // one step lower still @@ -1385,7 +1386,7 @@ test.Next(_L("Test clients monitoring levels 1 - 4 are notified")); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\ANIMAL\\cat.txt")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat1); User::WaitForRequest(reqStat2); User::WaitForRequest(reqStat3); @@ -1415,7 +1416,7 @@ test.Next(_L("Test clients monitoring levels 1 - 3 and 5 are notified")); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\ANIMAL\\dog.txt")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat1); User::WaitForRequest(reqStat2); User::WaitForRequest(reqStat3); @@ -1450,7 +1451,7 @@ test(reqStat6==KRequestPending); r=TheFs.RmDir(_L("\\F32-TST\\NOTIFY\\ANIMAL\\")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat1); User::WaitForRequest(reqStat2); User::WaitForRequest(reqStat3); @@ -1509,9 +1510,9 @@ TFileName path=_L("\\F32-TST\\NOTIFY\\"); RFs fs1; TInt r=fs1.Connect(); - test(r==KErrNone); + test_KErrNone(r); r=fs1.SetSessionPath(gSessionPath); - test(r==KErrNone); + test_KErrNone(r); TRequestStatus status1; TRequestStatus status2; @@ -1570,7 +1571,7 @@ test(status5==KErrCancel); r=TheFs.MkDir(_L("\\F32-TST\\TROPICANA\\")); - test(r==KErrNone); + test_KErrNone(r); test(status1==KRequestPending); test(status2==KRequestPending); test(status3==KRequestPending); @@ -1585,7 +1586,7 @@ test(status4==KRequestPending); r=TheFs.RmDir(_L("\\F32-TST\\TROPICANA\\")); - test(r==KErrNone); + test_KErrNone(r); test(status1==KRequestPending); test(status3==KRequestPending); test(status4==KRequestPending); @@ -1622,11 +1623,11 @@ test.Next(_L("Kill client while it is monitoring changes to a directory")); // Call CreateLocal to create RSemaphore gSleepThread which is local to this process TInt r=gSleepThread.CreateLocal(0); - test(r==KErrNone); + test_KErrNone(r); RThread clientThread; r=clientThread.Create(_L("ClientThread"),ThreadEntryPoint,0x4000,KHeapSize,KHeapSize,(TAny*)ETest9); - test(r==KErrNone); + test_KErrNone(r); clientThread.Resume(); gSleepThread.Wait(); // Wait for gSleepThread to be signalled // Client thread is waiting for notification of changes @@ -1641,7 +1642,7 @@ // Make a change and check there's no disaster r=TheFs.MkDir(_L("\\F32-TST\\NOTIFY\\")); - test(r==KErrNone || r==KErrAlreadyExists); + test_Value(r, r == KErrNone || r==KErrAlreadyExists); MakeFile(_L("\\F32-TST\\NOTIFY\\NewFile.Txt")); User::After(1000); } @@ -1658,38 +1659,38 @@ RFile file; TInt r=file.Replace(TheFs,_L("\\F32-TST\\NOTIFY\\kangaroo.txt"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); file.Close(); r=file.Replace(TheFs,_L("\\F32-TST\\NOTIFY\\koala.txt"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); file.Close(); r=file.Replace(TheFs,_L("\\F32-TST\\NOTIFY\\dingo.txt"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); file.Close(); TFileName path=_L("\\F32-TST\\NOTIFY\\"); TRequestStatus reqStat1(KRequestPending); RFs fs1; r=fs1.Connect(); - test(r==KErrNone); + test_KErrNone(r); r=fs1.SetSessionPath(gSessionPath); - test(r==KErrNone); + test_KErrNone(r); fs1.NotifyChange(ENotifyEntry,reqStat1,path); TRequestStatus reqStat2(KRequestPending); RFs fs2; r=fs2.Connect(); - test(r==KErrNone); + test_KErrNone(r); r=fs2.SetSessionPath(gSessionPath); - test(r==KErrNone); + test_KErrNone(r); fs2.NotifyChange(ENotifyEntry,reqStat2,path); TRequestStatus reqStat3(KRequestPending); RFs fs3; r=fs3.Connect(); - test(r==KErrNone); + test_KErrNone(r); r=fs3.SetSessionPath(gSessionPath); - test(r==KErrNone); + test_KErrNone(r); fs3.NotifyChange(ENotifyEntry,reqStat3,path); test(reqStat1==KRequestPending); @@ -1697,10 +1698,10 @@ test(reqStat3==KRequestPending); r=gSleepThread.CreateLocal(0); - test(r==KErrNone); + test_KErrNone(r); RThread thread1; r=thread1.Create(_L("TestThread1"),ThreadEntryPoint,0x4000,KHeapSize,KHeapSize,(TAny*)ETest5); - test(r==KErrNone); + test_KErrNone(r); thread1.Resume(); gSleepThread.Wait(); @@ -1709,7 +1710,7 @@ test(reqStat3==KRequestPending); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\kangaroo.txt")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat1); User::WaitForRequest(reqStat2); User::WaitForRequest(reqStat3); @@ -1722,7 +1723,7 @@ test.Next(_L("Test reads and writes do cause notification under ENotifyAll")); r=file.Replace(TheFs,_L("\\F32-TST\\NOTIFY\\kangaroo.txt"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); file.Close(); fs1.NotifyChange(ENotifyAll,reqStat1,path); @@ -1734,10 +1735,10 @@ test(reqStat3==KRequestPending); r=gSleepThread.CreateLocal(0); - test(r==KErrNone); + test_KErrNone(r); RThread thread2; r=thread2.Create(_L("TestThread2"),ThreadEntryPoint,0x4000,KHeapSize,KHeapSize,(TAny*)ETest5); - test(r==KErrNone); + test_KErrNone(r); thread2.Resume(); gSleepThread.Wait(); @@ -1768,10 +1769,10 @@ test(reqStat3==KRequestPending); r=gSleepThread.CreateLocal(0); - test(r==KErrNone); + test_KErrNone(r); RThread thread3; r=thread3.Create(_L("TestThread3"),ThreadEntryPoint,0x4000,KHeapSize,KHeapSize,(TAny*)ETest5); - test(r==KErrNone); + test_KErrNone(r); thread3.Resume(); gSleepThread.Wait(); @@ -1782,14 +1783,14 @@ test(reqStat3==KErrNone); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\koala.txt")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat2); test(reqStat2==KErrNone); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\kangaroo.txt")); - test(r==KErrNone); + test_KErrNone(r); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\dingo.txt")); - test(r==KErrNone); + test_KErrNone(r); gSleepThread.Close(); thread3.Close(); @@ -1806,17 +1807,17 @@ { RFs fs; // Session to be notified of any changes TInt r=fs.Connect(); - test(r==KErrNone); + test_KErrNone(r); r=fs.SetSessionPath(gSessionPath); - test(r==KErrNone); + test_KErrNone(r); r=TheFs.MkDir(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\")); - test(r==KErrNone||r==KErrAlreadyExists); + test_Value(r, r == KErrNone||r==KErrAlreadyExists); RFile file; r=file.Replace(TheFs,_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\WickedWitch.msg"),EFileStream); - test(r==KErrNone||KErrAlreadyExists); + test_Value(r, r == KErrNone || r == KErrAlreadyExists); file.Close(); // Test notification on a specific file @@ -1828,7 +1829,7 @@ test(reqStat==KRequestPending); RThread thread; r=thread.Create(_L("MyThread7"),ThreadEntryPoint,KDefaultStackSize,KHeapSize,KHeapSize,(TAny*)ETest8); - test(r==KErrNone); + test_KErrNone(r); thread.Logon(thrdStat); thread.Resume(); User::WaitForRequest(thrdStat); @@ -1840,7 +1841,7 @@ fs.NotifyChange(ENotifyEntry,reqStat,path); test(reqStat==KRequestPending); r=thread.Create(_L("MyThread8"),ThreadEntryPoint,KDefaultStackSize,KHeapSize,KHeapSize,(TAny*)ETest1); - test(r==KErrNone); + test_KErrNone(r); thread.Logon(thrdStat); thread.Resume(); User::WaitForRequest(thrdStat); @@ -1849,22 +1850,22 @@ thread.Close(); test(reqStat==KRequestPending); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\NEWFILE.TXT")); - test(r==KErrNone); + test_KErrNone(r); // Test notification does not occur if a change is made to another file r=file.Replace(TheFs,_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Lion.log"),EFileStream); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); file.Close(); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Lion.log")); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); // Test notification occurs when a change is made to the file test.Next(_L("Delete monitored file")); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\WickedWitch.Msg")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); @@ -1880,9 +1881,9 @@ // RFs fs; TInt r=fs.Connect(); // Session to be notified of any changes - test(r==KErrNone); + test_KErrNone(r); r=fs.SetSessionPath(gSessionPath); - test(r==KErrNone); + test_KErrNone(r); // RFile::Write() to a file within the monitored directory test.Next(_L("RFile::Write()")); @@ -1894,13 +1895,13 @@ fs.NotifyChange(ENotifyAll,reqStat,path); test(reqStat==KRequestPending); r=file.Replace(TheFs,_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Dorothy.doc"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); fs.NotifyChange(ENotifyAll,reqStat,path); test(reqStat==KRequestPending); r=file.Write(0,_L8("Pay no attention to the man behind the curtain")); - test(r==KErrNone); + test_KErrNone(r); file.Close(); User::WaitForRequest(reqStat); test(reqStat==KErrNone); @@ -1911,7 +1912,7 @@ fs.NotifyChange(ENotifyAll,reqStat,path); test(reqStat==KRequestPending); r=file.Open(TheFs,_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Dorothy.doc"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); r=file.Read(0,temp,100); test(reqStat==KRequestPending); @@ -1919,7 +1920,7 @@ // RFile::SetAtt() of a file within the monitored directory test.Next(_L("RFile::SetAtt()")); r=file.SetAtt(KEntryAttSystem,KEntryAttNormal); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); fs.NotifyChange(ENotifyAll,reqStat,path); @@ -1928,7 +1929,7 @@ // RFile::SetSize() of a file within the monitored directory test.Next(_L("RFile::SetSize()")); r=file.SetSize(256); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); file.Close(); @@ -1939,7 +1940,7 @@ test(reqStat==KRequestPending); TFileName fileName; r=file.Temp(TheFs,path,fileName,EFileWrite); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); file.Close(); @@ -1951,7 +1952,7 @@ TTime now; now.HomeTime(); r=file.Open(TheFs,_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Dorothy.doc"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); file.SetModified(now); file.Close(); @@ -1966,7 +1967,7 @@ test(reqStat==KRequestPending); now.HomeTime(); r=TheFs.SetEntry(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Dorothy.doc"),now,KEntryAttHidden,KEntryAttNormal); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); @@ -1974,7 +1975,7 @@ test.Next(_L("RFile::Set()")); fs.NotifyChange(ENotifyAll,reqStat,path); r=file.Open(TheFs,_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Dorothy.doc"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); now.HomeTime(); r=file.Set(now,KEntryAttNormal,KEntryAttHidden); @@ -1988,13 +1989,13 @@ test(reqStat==KRequestPending); User::After(KNotifyChangeAfter); r=TheFs.SetDriveName(KDefaultDrive,_L("DRIVETEST")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); fs.NotifyChange(ENotifyEntry,reqStat,path); User::After(KNotifyChangeAfter); r=TheFs.SetDriveName(KDefaultDrive,_L("TEST")); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); fs.NotifyChangeCancel(reqStat); User::WaitForRequest(reqStat); @@ -2002,7 +2003,7 @@ fs.NotifyChange(ENotifyDisk,reqStat,path); User::After(KNotifyChangeAfter); r=TheFs.SetDriveName(KDefaultDrive,_L("DRIVE")); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); fs.NotifyChangeCancel(reqStat); User::WaitForRequest(reqStat); @@ -2014,7 +2015,7 @@ test(reqStat==KRequestPending); test.Next(_L("RFs::MkDir()")); r=TheFs.MkDir(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\EMERALD_CITY\\")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); @@ -2023,7 +2024,7 @@ fs.NotifyChange(ENotifyAll,reqStat,path); test(reqStat==KRequestPending); r=TheFs.RmDir(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\EMERALD_CITY\\")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); @@ -2032,7 +2033,7 @@ fs.NotifyChange(ENotifyAll,reqStat,path); test(reqStat==KRequestPending); r=file.Create(TheFs,_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Good_Witch.bat"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); file.Close(); @@ -2042,7 +2043,7 @@ fs.NotifyChange(ENotifyAll,reqStat,path); test(reqStat==KRequestPending); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Good_Witch.bat")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); @@ -2051,7 +2052,7 @@ fs.NotifyChange(ENotifyAll,reqStat,path); test(reqStat==KRequestPending); r=file.Replace(TheFs,_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Good_Witch.bat"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); file.Close(); @@ -2061,7 +2062,7 @@ fs.NotifyChange(ENotifyAll,reqStat,path); test(reqStat==KRequestPending); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Good_Witch.bat")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); @@ -2074,7 +2075,7 @@ TFileName currentVolName; r=TheFs.Volume(volInfo,driveNum); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); currentVolName=volInfo.iName; @@ -2084,27 +2085,27 @@ User::WaitForRequest(reqStat); test(reqStat==KErrNone); r=TheFs.Volume(volInfo,driveNum); - test(r==KErrNone); + test_KErrNone(r); test(volInfo.iName==_L("VOL")); // Test notification occurs under ENotifyDisk fs.NotifyChange(ENotifyDisk,reqStat,path); test(reqStat==KRequestPending); r=TheFs.SetVolumeLabel(_L("ABCDEFGHIJK"),driveNum); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); r=TheFs.Volume(volInfo,driveNum); - test(r==KErrNone); + test_KErrNone(r); test(volInfo.iName==_L("ABCDEFGHIJK")); // Test notification does not occur under ENotifyAttributes fs.NotifyChange(ENotifyAttributes,reqStat,path); r=TheFs.SetVolumeLabel(_L("TROPICANA"),driveNum); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); r=TheFs.Volume(volInfo,driveNum); - test(r==KErrNone); + test_KErrNone(r); test(volInfo.iName==_L("TROPICANA")); @@ -2115,11 +2116,11 @@ fs.NotifyChange(ENotifyEntry,reqStat,path); test(reqStat==KRequestPending); r=TheFs.SetVolumeLabel(currentVolName,driveNum); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); r=TheFs.Volume(volInfo,driveNum); - test(r==KErrNone); + test_KErrNone(r); test(volInfo.iName==currentVolName); } @@ -2137,12 +2138,12 @@ fs.NotifyChange(ENotifyEntry,reqStat,path); test(reqStat==KRequestPending); r=TheFs.Rename(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Dorothy.doc"),_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Toto.doc")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); r=TheFs.Rename(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Toto.doc"),_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Dorothy.doc")); - test(r==KErrNone); + test_KErrNone(r); #if defined(__WINS__) if(gSessionPath[0]=='Y'||gSessionPath[0]=='X') @@ -2153,11 +2154,11 @@ while(longName.Length()<(KMaxFileName-2)) longName+=_L("a"); r=TheFs.Rename(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Dorothy.doc"),longName); - test(r==KErrNone); + test_KErrNone(r); fs.NotifyChange(ENotifyEntry,reqStat,longName); test(reqStat==KRequestPending); r=TheFs.Rename(longName,_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Dorothy.doc")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); } @@ -2175,9 +2176,9 @@ // RFs fs; // Session to be notified when a change occurs TInt r=fs.Connect(); - test(r==KErrNone); + test_KErrNone(r); r=fs.SetSessionPath(gSessionPath); - test(r==KErrNone); + test_KErrNone(r); // RFile::Write() to a file in the subtree test.Next(_L("RFile::Write()")); @@ -2187,7 +2188,7 @@ RFile file; r=file.Open(TheFs,_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Dorothy.doc"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); r=file.Write(0,_L8("Pay no attention to the man behind the curtain")); file.Close(); @@ -2198,7 +2199,7 @@ fs.NotifyChange(ENotifyAll,reqStat,path); TBuf8<100> temp; r=file.Open(TheFs,_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Dorothy.doc"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); r=file.Read(0,temp,100); test(reqStat==KRequestPending); @@ -2206,7 +2207,7 @@ // RFile::SetAtt() of a file within the monitored directory test.Next(_L("RFile::SetAtt()")); r=file.SetAtt(KEntryAttNormal,KEntryAttHidden); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); @@ -2215,7 +2216,7 @@ fs.NotifyChange(ENotifyAll,reqStat,path); test(reqStat==KRequestPending); r=file.SetSize(256); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); file.Close(); @@ -2226,7 +2227,7 @@ test(reqStat==KRequestPending); TFileName fileName; r=file.Temp(TheFs,_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\"),fileName,EFileWrite); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); file.Close(); @@ -2237,7 +2238,7 @@ TTime now; now.HomeTime(); r=file.Open(TheFs,_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Dorothy.doc"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); file.SetModified(now); file.Close(); @@ -2252,7 +2253,7 @@ test(reqStat==KRequestPending); now.HomeTime(); r=TheFs.SetEntry(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Dorothy.doc"),now,KEntryAttHidden,KEntryAttNormal); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); @@ -2260,7 +2261,7 @@ test.Next(_L("RFile::Set()")); fs.NotifyChange(ENotifyAll,reqStat,path); r=file.Open(TheFs,_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Dorothy.doc"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); now.HomeTime(); r=file.Set(now,KEntryAttNormal,KEntryAttHidden); @@ -2274,12 +2275,12 @@ test(reqStat==KRequestPending); User::After(KNotifyChangeAfter); r=TheFs.SetDriveName(KDefaultDrive,_L("DRIVETEST")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); fs.NotifyChange(ENotifyEntry,reqStat,path); r=TheFs.SetDriveName(KDefaultDrive,_L("TEST")); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); User::After(KNotifyChangeAfter); fs.NotifyChangeCancel(reqStat); @@ -2288,7 +2289,7 @@ fs.NotifyChange(ENotifyDisk,reqStat,path); User::After(KNotifyChangeAfter); r=TheFs.SetDriveName(KDefaultDrive,_L("DRIVE")); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); fs.NotifyChangeCancel(reqStat); User::WaitForRequest(reqStat); @@ -2299,7 +2300,7 @@ fs.NotifyChange(ENotifyAll,reqStat,path); test(reqStat==KRequestPending); r=TheFs.MkDir(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\EMERALD_CITY\\")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); @@ -2308,7 +2309,7 @@ fs.NotifyChange(ENotifyAll,reqStat,path); test(reqStat==KRequestPending); r=TheFs.RmDir(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\EMERALD_CITY\\")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); @@ -2317,7 +2318,7 @@ fs.NotifyChange(ENotifyAll,reqStat,path); test(reqStat==KRequestPending); r=file.Create(TheFs,_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Good_Witch.bat"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); file.Close(); @@ -2327,7 +2328,7 @@ fs.NotifyChange(ENotifyAll,reqStat,path); test(reqStat==KRequestPending); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Good_Witch.bat")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); @@ -2336,7 +2337,7 @@ fs.NotifyChange(ENotifyAll,reqStat,path); test(reqStat==KRequestPending); r=file.Replace(TheFs,_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Good_Witch.bat"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); file.Close(); @@ -2346,7 +2347,7 @@ fs.NotifyChange(ENotifyAll,reqStat,path); test(reqStat==KRequestPending); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Good_Witch.bat")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); @@ -2360,7 +2361,7 @@ TVolumeInfo volInfo; TFileName currentVolName; r=TheFs.Volume(volInfo,driveNum); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); currentVolName=volInfo.iName; @@ -2370,27 +2371,27 @@ User::WaitForRequest(reqStat); test(reqStat==KErrNone); r=TheFs.Volume(volInfo,driveNum); - test(r==KErrNone); + test_KErrNone(r); test(volInfo.iName==_L("VOL")); // Test notification occurs under ENotifyDisk fs.NotifyChange(ENotifyDisk,reqStat,path); test(reqStat==KRequestPending); r=TheFs.SetVolumeLabel(_L("ABCDEFGHIJK"),driveNum); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); r=TheFs.Volume(volInfo,driveNum); - test(r==KErrNone); + test_KErrNone(r); test(volInfo.iName==_L("ABCDEFGHIJK")); // Test notification does not occur under ENotifyAttributes fs.NotifyChange(ENotifyAttributes,reqStat,path); r=TheFs.SetVolumeLabel(_L("TROPICANA"),driveNum); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); r=TheFs.Volume(volInfo,driveNum); - test(r==KErrNone); + test_KErrNone(r); test(volInfo.iName==_L("TROPICANA")); @@ -2401,11 +2402,11 @@ fs.NotifyChange(ENotifyEntry,reqStat,path); test(reqStat==KRequestPending); r=TheFs.SetVolumeLabel(currentVolName,driveNum); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); r=TheFs.Volume(volInfo,driveNum); - test(r==KErrNone); + test_KErrNone(r); test(volInfo.iName==currentVolName); } @@ -2422,14 +2423,14 @@ fs.NotifyChange(ENotifyAll,reqStat,path); test(reqStat==KRequestPending); r=TheFs.MkDir(_L("\\F32-TST\\NOTIFY\\EMERALD_CITY\\")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); fs.NotifyChange(ENotifyAll,reqStat,path); test(reqStat==KRequestPending); r=TheFs.RmDir(_L("\\F32-TST\\NOTIFY\\EMERALD_CITY\\")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); fs.Close(); @@ -2445,9 +2446,9 @@ // RFs fs; TInt r=fs.Connect(); // Session to be notified when a change occurs - test(r==KErrNone); + test_KErrNone(r); r=fs.SetSessionPath(gSessionPath); - test(r==KErrNone); + test_KErrNone(r); // RFile::Write() to a file in the subtree TFileName path=_L("\\F32-TST\\NOTIFY\\"); @@ -2456,7 +2457,7 @@ RFile file; r=file.Open(TheFs,_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Dorothy.doc"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); r=file.Write(0,_L8("Pay no attention to the man behind the curtain")); file.Close(); @@ -2467,14 +2468,14 @@ fs.NotifyChange(ENotifyAll,reqStat,path); TBuf8<100> temp; r=file.Open(TheFs,_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Dorothy.doc"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); r=file.Read(0,temp,100); test(reqStat==KRequestPending); // RFile::SetAtt() of a file within the monitored directory r=file.SetAtt(KEntryAttNormal,KEntryAttHidden); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); @@ -2482,7 +2483,7 @@ fs.NotifyChange(ENotifyAll,reqStat,path); test(reqStat==KRequestPending); r=file.SetSize(256); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); file.Close(); @@ -2493,7 +2494,7 @@ TTime now; now.HomeTime(); r=file.Open(TheFs,_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Dorothy.doc"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); file.SetModified(now); file.Close(); @@ -2507,14 +2508,14 @@ test(reqStat==KRequestPending); now.HomeTime(); r=TheFs.SetEntry(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Dorothy.doc"),now,KEntryAttHidden,KEntryAttNormal); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); // RFile::Set() to change file's modification time and attributes fs.NotifyChange(ENotifyAll,reqStat,path); r=file.Open(TheFs,_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Dorothy.doc"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); now.HomeTime(); r=file.Set(now,KEntryAttNormal,KEntryAttHidden); @@ -2527,20 +2528,20 @@ test(reqStat==KRequestPending); User::After(KNotifyChangeAfter); r=TheFs.SetDriveName(KDefaultDrive,_L("DRIVETEST")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); fs.NotifyChange(ENotifyEntry,reqStat,path); User::After(KNotifyChangeAfter); r=TheFs.SetDriveName(KDefaultDrive,_L("TEST")); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); fs.NotifyChangeCancel(reqStat); User::WaitForRequest(reqStat); fs.NotifyChange(ENotifyDisk,reqStat,path); User::After(KNotifyChangeAfter); r=TheFs.SetDriveName(KDefaultDrive,_L("DRIVE")); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); fs.NotifyChangeCancel(reqStat); User::WaitForRequest(reqStat); @@ -2551,7 +2552,7 @@ fs.NotifyChange(ENotifyAll,reqStat,path); test(reqStat==KRequestPending); r=TheFs.MkDir(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\EMERALD_CITY\\")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); @@ -2559,7 +2560,7 @@ fs.NotifyChange(ENotifyAll,reqStat,path); test(reqStat==KRequestPending); r=TheFs.RmDir(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\EMERALD_CITY\\")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); @@ -2567,7 +2568,7 @@ fs.NotifyChange(ENotifyAll,reqStat,path); test(reqStat==KRequestPending); r=file.Create(TheFs,_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Good_Witch.bat"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); file.Close(); @@ -2576,7 +2577,7 @@ fs.NotifyChange(ENotifyAll,reqStat,path); test(reqStat==KRequestPending); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Good_Witch.bat")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); @@ -2584,7 +2585,7 @@ fs.NotifyChange(ENotifyAll,reqStat,path); test(reqStat==KRequestPending); r=file.Replace(TheFs,_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Good_Witch.bat"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); file.Close(); @@ -2593,7 +2594,7 @@ fs.NotifyChange(ENotifyAll,reqStat,path); test(reqStat==KRequestPending); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Good_Witch.bat")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); @@ -2604,7 +2605,7 @@ TVolumeInfo volInfo; TFileName currentVolName; r=TheFs.Volume(volInfo,driveNum); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); currentVolName=volInfo.iName; @@ -2614,27 +2615,27 @@ User::WaitForRequest(reqStat); test(reqStat==KErrNone); r=TheFs.Volume(volInfo,driveNum); - test(r==KErrNone); + test_KErrNone(r); test(volInfo.iName==_L("VOL")); // Test notification occurs under ENotifyDisk fs.NotifyChange(ENotifyDisk,reqStat,path); test(reqStat==KRequestPending); r=TheFs.SetVolumeLabel(_L("ABCDEFGHIJK"),driveNum); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); r=TheFs.Volume(volInfo,driveNum); - test(r==KErrNone); + test_KErrNone(r); test(volInfo.iName==_L("ABCDEFGHIJK")); // Test notification does not occur under ENotifyAttributes fs.NotifyChange(ENotifyAttributes,reqStat,path); r=TheFs.SetVolumeLabel(_L("TROPICANA"),driveNum); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); r=TheFs.Volume(volInfo,driveNum); - test(r==KErrNone); + test_KErrNone(r); test(volInfo.iName==_L("TROPICANA")); @@ -2645,11 +2646,11 @@ fs.NotifyChange(ENotifyEntry,reqStat,path); test(reqStat==KRequestPending); r=TheFs.SetVolumeLabel(currentVolName,driveNum); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); r=TheFs.Volume(volInfo,driveNum); - test(r==KErrNone); + test_KErrNone(r); test(volInfo.iName==currentVolName); } @@ -2664,7 +2665,7 @@ fs.NotifyChange(ENotifyEntry,reqStat,path); test(reqStat==KRequestPending); r=TheFs.Rename(_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Dorothy.doc"),_L("\\F32-TST\\NOTIFY\\MUNCHKINS\\Toto.doc")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); @@ -2672,14 +2673,14 @@ fs.NotifyChange(ENotifyAll,reqStat,path); test(reqStat==KRequestPending); r=TheFs.MkDir(_L("\\F32-TST\\NOTIFY\\EMERALD_CITY\\")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); fs.NotifyChange(ENotifyAll,reqStat,path); test(reqStat==KRequestPending); r=TheFs.RmDir(_L("\\F32-TST\\NOTIFY\\EMERALD_CITY\\")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); fs.Close(); @@ -2696,20 +2697,20 @@ RFile file; TInt r=file.Replace(TheFs,_L("\\F32-TST\\NOTIFY\\kangaroo.txt"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); file.Close(); r=file.Replace(TheFs,_L("\\F32-TST\\NOTIFY\\koala.txt"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); file.Close(); r=file.Replace(TheFs,_L("\\F32-TST\\NOTIFY\\dingo.txt"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); file.Close(); RFs fs; r=fs.Connect(); - test(r==KErrNone); + test_KErrNone(r); r=fs.SetSessionPath(gSessionPath); - test(r==KErrNone); + test_KErrNone(r); TRequestStatus reqStat1(KRequestPending); TFileName path1=_L("\\F32-TST\\NOTIFY\\"); @@ -2759,10 +2760,10 @@ r=gSleepThread.CreateLocal(0); - test(r==KErrNone); + test_KErrNone(r); RThread thread1; r=thread1.Create(_L("TestThread1"),ThreadEntryPoint,0x4000,KHeapSize,KHeapSize,(TAny*)ETest5); - test(r==KErrNone); + test_KErrNone(r); thread1.Resume(); gSleepThread.Wait(); @@ -2786,7 +2787,7 @@ test(reqStat4==KRequestPending); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\kangaroo.txt")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat1); test(reqStat1==KErrNone); User::WaitForRequest(status1); @@ -2829,7 +2830,7 @@ test.Next(_L("Test reads and writes do cause notification under ENotifyAll")); r=file.Replace(TheFs,_L("\\F32-TST\\NOTIFY\\kangaroo.txt"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); file.Close(); fs.NotifyChange(ENotifyAll,reqStat1,path1); @@ -2842,10 +2843,10 @@ test(reqStat4==KRequestPending); r=gSleepThread.CreateLocal(0); - test(r==KErrNone); + test_KErrNone(r); RThread thread2; r=thread2.Create(_L("TestThread2"),ThreadEntryPoint,0x4000,KHeapSize,KHeapSize,(TAny*)ETest5); - test(r==KErrNone); + test_KErrNone(r); thread2.Resume(); gSleepThread.Wait(); @@ -2868,10 +2869,10 @@ test(reqStat4==KRequestPending); r=gSleepThread.CreateLocal(0); - test(r==KErrNone); + test_KErrNone(r); RThread thread3; r=thread3.Create(_L("TestThread3"),ThreadEntryPoint,0x4000,KHeapSize,KHeapSize,(TAny*)ETest5); - test(r==KErrNone); + test_KErrNone(r); thread3.Resume(); gSleepThread.Wait(); @@ -2884,16 +2885,16 @@ RFs fs2; r=fs2.Connect(); - test(r==KErrNone); + test_KErrNone(r); r=fs2.SetSessionPath(gSessionPath); - test(r==KErrNone); + test_KErrNone(r); TRequestStatus reqStat(KRequestPending); fs2.NotifyChange(ENotifyEntry,reqStat); test(reqStat==KRequestPending); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\kangaroo.txt")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat2); test(reqStat2==KErrNone); test(reqStat4==KRequestPending); @@ -2903,12 +2904,12 @@ fs2.NotifyChange(ENotifyAll,reqStat); test(reqStat==KRequestPending); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\koala.txt")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); test(reqStat4==KRequestPending); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\dingo.txt")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat4); test(reqStat4==KErrNone); @@ -2928,9 +2929,9 @@ // RFs fs; TInt r=fs.Connect(); // Session to be notified of any changes - test(r==KErrNone); + test_KErrNone(r); r=fs.SetSessionPath(gSessionPath); - test(r==KErrNone); + test_KErrNone(r); // RFile::Write() to a file within the monitored directory test.Next(_L("RFile::Write()")); @@ -2946,7 +2947,7 @@ RFile file; r=file.Replace(TheFs,_L("\\F32-TST\\NOTIFY\\NewFile.txt"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); fs.NotifyChange(ENotifyAll,reqStat,path); fs.NotifyChange(ENotifyFile,reqStat2,path); @@ -2993,7 +2994,7 @@ test(reqStat7==KErrCancel); r=file.Open(TheFs,_L("\\F32-TST\\NOTIFY\\NewFile.txt"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); // RFile::SetAtt() of a file within the monitored directory fs.NotifyChange(ENotifyAll,reqStat,path); @@ -3015,7 +3016,7 @@ test.Next(_L("RFile::SetAtt()")); r=file.SetAtt(KEntryAttSystem,KEntryAttNormal); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); User::WaitForRequest(reqStat4); test(reqStat==KErrNone); @@ -3031,7 +3032,7 @@ User::WaitForRequest(reqStat4); test(reqStat4==KErrArgument); r=file.SetAtt(KEntryAttNormal,KEntryAttSystem); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); // Monitoring with ENotifyWrite fs.NotifyChangeCancel(); // Cancel outstanding notification request @@ -3059,7 +3060,7 @@ // RFile::SetSize() of a file within the monitored directory test.Next(_L("RFile::SetSize()")); r=file.SetSize(256); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); User::WaitForRequest(reqStat4); test(reqStat==KErrNone); @@ -3073,7 +3074,7 @@ User::WaitForRequest(reqStat4); test(reqStat4==KErrArgument); r=file.SetSize(200); - test(r==KErrNone); + test_KErrNone(r); User::After(1000000); test(reqStat==KRequestPending); // Monitoring with ENotifyWrite @@ -3103,7 +3104,7 @@ TFileName fileName; r=file.Temp(TheFs,path,fileName,EFileWrite); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); test(reqStat2==KRequestPending); @@ -3123,7 +3124,7 @@ fs.NotifyChange(ENotifyDisk,reqStat2,path); fs.NotifyChange(ENotifyWrite,reqStat3,path); r=file.Temp(TheFs,path,fileName,EFileWrite); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); // Monitoring ENotifyFile test(reqStat2==KRequestPending); // Monitoring ENotifyDisk test(reqStat3==KRequestPending); // Monitoring ENotifyWrite @@ -3154,7 +3155,7 @@ TTime now; now.HomeTime(); r=file.Open(TheFs,_L("\\F32-TST\\NOTIFY\\NewFile.txt"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); file.SetModified(now); file.Close(); @@ -3188,7 +3189,7 @@ test(reqStat==KRequestPending); now.HomeTime(); r=TheFs.SetEntry(_L("\\F32-TST\\NOTIFY\\NewFile.txt"),now,KEntryAttHidden,KEntryAttNormal); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); User::WaitForRequest(reqStat3); test(reqStat==KErrNone); @@ -3215,7 +3216,7 @@ test(reqStat4==KRequestPending); r=file.Open(TheFs,_L("\\F32-TST\\NOTIFY\\NewFile.txt"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); now.HomeTime(); r=file.Set(now,KEntryAttNormal,KEntryAttHidden); @@ -3248,7 +3249,7 @@ User::After(KNotifyChangeAfter); r=TheFs.SetDriveName(KDefaultDrive,_L("DRIVETEST")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); test(reqStat==KErrNone); test(reqStat2==KRequestPending); @@ -3278,7 +3279,7 @@ test(reqStat4==KRequestPending); r=TheFs.MkDir(_L("\\F32-TST\\NOTIFY\\EMERALD_CITY\\")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); User::WaitForRequest(reqStat2); User::WaitForRequest(reqStat3); @@ -3298,7 +3299,7 @@ test(reqStat3==KRequestPending); r=TheFs.RmDir(_L("\\F32-TST\\NOTIFY\\EMERALD_CITY\\")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); User::WaitForRequest(reqStat2); test(reqStat==KErrNone); @@ -3325,7 +3326,7 @@ test(reqStat4==KRequestPending); r=file.Create(TheFs,_L("\\F32-TST\\NOTIFY\\Good_Witch.bat"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); User::WaitForRequest(reqStat2); User::WaitForRequest(reqStat4); @@ -3348,7 +3349,7 @@ test(reqStat4==KRequestPending); r=file.Create(TheFs,_L("\\F32-TST\\NOTIFY\\Bad_Witch.bat"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); User::WaitForRequest(reqStat2); test(reqStat==KErrNone); @@ -3376,7 +3377,7 @@ test(reqStat4==KRequestPending); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\Good_Witch.bat")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); User::WaitForRequest(reqStat2); User::WaitForRequest(reqStat4); @@ -3399,7 +3400,7 @@ test(reqStat4==KRequestPending); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\Bad_Witch.bat")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); User::WaitForRequest(reqStat2); User::WaitForRequest(reqStat4); @@ -3424,7 +3425,7 @@ test(reqStat4==KRequestPending); r=file.Replace(TheFs,_L("\\F32-TST\\NOTIFY\\Good_Witch.bat"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); User::WaitForRequest(reqStat2); User::WaitForRequest(reqStat3); @@ -3456,7 +3457,7 @@ test(reqStat4==KErrArgument); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\Good_Witch.bat")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); User::WaitForRequest(reqStat2); User::WaitForRequest(reqStat3); @@ -3488,7 +3489,7 @@ TVolumeInfo volInfo; TFileName currentVolName; r=TheFs.Volume(volInfo,driveNum); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); currentVolName=volInfo.iName; @@ -3516,7 +3517,7 @@ test(reqStat7==KRequestPending); r=TheFs.SetVolumeLabel(currentVolName,driveNum); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); User::WaitForRequest(reqStat2); @@ -3531,7 +3532,7 @@ test(reqStat7==KErrNone); r=TheFs.Volume(volInfo,driveNum); - test(r==KErrNone); + test_KErrNone(r); test(volInfo.iName==currentVolName); fs.NotifyChangeCancel(); @@ -3576,7 +3577,7 @@ test(reqStat4==KRequestPending); r=file.Rename(_L("\\F32-TST\\NOTIFY\\OldFile.abc")); - test(r==KErrNone||r==KErrAlreadyExists); + test_Value(r, r == KErrNone||r==KErrAlreadyExists); User::WaitForRequest(reqStat); User::WaitForRequest(reqStat2); User::WaitForRequest(reqStat3); @@ -3592,7 +3593,7 @@ path=_L("\\F32-TST\\NOTIFY\\OldFile.abc"); r=file.Open(TheFs,_L("\\F32-TST\\NOTIFY\\OldFile.abc"),EFileShareExclusive|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); fs.NotifyChange(ENotifyAll,reqStat,path); fs.NotifyChange(ENotifyEntry,reqStat2,path); fs.NotifyChange(ENotifyFile,reqStat3,path); @@ -3605,7 +3606,7 @@ test(reqStat4==KErrArgument); r=file.Rename(_L("\\F32-TST\\NOTIFY\\NewFile.xyz")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); User::WaitForRequest(reqStat2); User::WaitForRequest(reqStat3); @@ -3629,7 +3630,7 @@ test(reqStat4==KRequestPending); r=TheFs.Rename(_L("\\F32-TST\\NOTIFY\\NewFile.xyz"),_L("\\F32-TST\\NOTIFY\\NewerFile.cat")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); User::WaitForRequest(reqStat2); User::WaitForRequest(reqStat3); @@ -3658,7 +3659,7 @@ test(reqStat4==KErrArgument); r=TheFs.Rename(_L("\\F32-TST\\NOTIFY\\NewerFile.cat"),_L("\\F32-TST\\NOTIFY\\Original.dog")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); User::WaitForRequest(reqStat2); User::WaitForRequest(reqStat3); @@ -3678,7 +3679,7 @@ test(reqStat4==KRequestPending); r=TheFs.Rename(_L("\\F32-TST\\NOTIFY\\"),_L("\\F32-TST\\NOTIFY_TEMP\\")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); User::WaitForRequest(reqStat2); User::WaitForRequest(reqStat3); @@ -3702,7 +3703,7 @@ test(reqStat4==KErrArgument); r=TheFs.Rename(_L("\\F32-TST\\NOTIFY_TEMP\\"),_L("\\F32-TST\\NOTIFY\\")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); User::WaitForRequest(reqStat2); User::WaitForRequest(reqStat3); @@ -3737,7 +3738,7 @@ test(reqStat3==KRequestPending); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\Original.dog")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); User::WaitForRequest(reqStat2); User::WaitForRequest(reqStat3); @@ -3755,7 +3756,7 @@ test(reqStat3==KRequestPending); r=TheFs.Rename(_L("\\F32-TST\\"),_L("\\F32-TEST\\")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); User::WaitForRequest(reqStat2); User::WaitForRequest(reqStat3); @@ -3793,7 +3794,7 @@ test(reqStat3==KRequestPending); r=TheFs.Rename(_L("\\F32-TEST\\NOTIFY\\"),_L("\\F32-TEST\\NOTIFY_CHANGED\\")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); User::WaitForRequest(reqStat2); @@ -3817,7 +3818,7 @@ test(reqStat4==KRequestPending); r=TheFs.Rename(_L("\\F32-TEST\\"),_L("\\F32-TST\\")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); User::WaitForRequest(reqStat2); @@ -3844,7 +3845,7 @@ test(reqStat4==KRequestPending); r=TheFs.Rename(_L("\\F32-TST\\NOTIFY_CHANGED\\"),_L("\\F32-TST\\NOTIFY\\")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); User::WaitForRequest(reqStat2); @@ -3874,7 +3875,7 @@ test(reqStat4==KRequestPending); r=file.Create(TheFs,_L("\\F32-TST\\NOTIFY\\Munchkin.msg"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); User::WaitForRequest(reqStat2); User::WaitForRequest(reqStat3); @@ -3901,7 +3902,7 @@ TTime nowTime; nowTime.HomeTime(); r=file.Open(TheFs,_L("\\F32-TST\\NOTIFY\\Munchkin.msg"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); test(reqStat==KRequestPending); file.SetModified(now); file.Close(); @@ -3928,7 +3929,7 @@ test(reqStat4==KRequestPending); r=file.Open(TheFs,_L("\\F32-TST\\NOTIFY\\Munchkin.msg"),EFileRead|EFileWrite); - test(r==KErrNone); + test_KErrNone(r); r=file.Write(0,_L8("Pay no attention to the man behind the curtain")); file.Close(); User::WaitForRequest(reqStat); @@ -3955,7 +3956,7 @@ test(reqStat4==KRequestPending); r=TheFs.Delete(_L("\\F32-TST\\NOTIFY\\Munchkin.msg")); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(reqStat); User::WaitForRequest(reqStat2); User::WaitForRequest(reqStat3); @@ -3983,14 +3984,14 @@ RFs fs; TInt r=fs.Connect(); - test(r==KErrNone); + test_KErrNone(r); TDriveInfo driveInfo; TInt driveNum = EDriveC + SocketToDrive[gSocketNumber]; // verify TDriveInfo.iType == EMediaHardDisk r = fs.Drive(driveInfo, driveNum); - test (r == KErrNone); + test_KErrNone(r); test.Printf(_L("iType = %d\n"), driveInfo.iType); test(driveInfo.iType == EMediaHardDisk); @@ -4007,7 +4008,7 @@ // verify TDriveInfo.iType == EMediaNotPresent r = fs.Drive(driveInfo, driveNum); - test (r == KErrNone); + test_KErrNone(r); test.Printf(_L("iType = %d\n"), driveInfo.iType); test(driveInfo.iType == EMediaNotPresent); @@ -4024,7 +4025,7 @@ // verify TDriveInfo.iType == EMediaHardDisk r = fs.Drive(driveInfo, driveNum); - test (r == KErrNone); + test_KErrNone(r); test.Printf(_L("iType = %d\n"), driveInfo.iType); test(driveInfo.iType == EMediaHardDisk); @@ -4058,7 +4059,7 @@ test.Next(_L("Test original behaviour of asynchronous read API")); RFile reader; TInt r=reader.Open(TheFs,_L("\\F32-TST\\NOTIFY\\NewFile.txt"),EFileRead|EFileShareAny); - test(r==KErrNone); + test_KErrNone(r); TBuf8<596> readBuf; reader.Read(0, readBuf, 100, readStat1); User::WaitForRequest(readStat1); @@ -4068,15 +4069,15 @@ test.Next(_L("Test asynchronous read fails in EFileShareExclusive mode")); r=reader.Open(TheFs,_L("\\F32-TST\\NOTIFY\\NewFile.txt"),EFileRead|EFileReadAsyncAll|EFileShareExclusive); - test(r==KErrArgument); + test_Value(r, r == KErrArgument); test.Next(_L("Test asynchronous read fails in EFileShareReadersOnly mode")); r=reader.Open(TheFs,_L("\\F32-TST\\NOTIFY\\NewFile.txt"),EFileRead|EFileReadAsyncAll|EFileShareReadersOnly); - test(r==KErrArgument); + test_Value(r, r == KErrArgument); test.Next(_L("Test asynchronous read is cancelled when file is closed")); r=reader.Open(TheFs,_L("\\F32-TST\\NOTIFY\\NewFile.txt"),EFileRead|EFileReadAsyncAll|EFileShareAny); - test(r==KErrNone); + test_KErrNone(r); reader.Read(0, readBuf, 100, readStat1); test(readStat1==KRequestPending); reader.Close(); @@ -4085,7 +4086,7 @@ test.Next(_L("Test asynchronous read can be cancelled")); r=reader.Open(TheFs,_L("\\F32-TST\\NOTIFY\\NewFile.txt"),EFileRead|EFileReadAsyncAll|EFileShareAny); - test(r==KErrNone); + test_KErrNone(r); reader.Read(0, readBuf, 100, readStat1); test(readStat1==KRequestPending); reader.ReadCancel(readStat1); @@ -4098,7 +4099,7 @@ // runs (to test whether cancelling still works...) test.Next(_L("Test asynchronous read is cancelled when running at high priority")); r=reader.Open(TheFs,_L("\\F32-TST\\NOTIFY\\NewFile.txt"),EFileRead|EFileReadAsyncAll|EFileShareAny); - test(r==KErrNone); + test_KErrNone(r); RThread thisThread; thisThread.SetPriority(EPriorityRealTime); reader.Read(0, readBuf, 100, readStat1); @@ -4112,21 +4113,21 @@ test.Next(_L("Test asynchronous read is notified due to RFile::SetSize()")); r=reader.Open(TheFs,_L("\\F32-TST\\NOTIFY\\NewFile.txt"),EFileRead|EFileReadAsyncAll|EFileWrite|EFileShareAny); - test(r==KErrNone); + test_KErrNone(r); reader.Read(0, readBuf, 100, readStat1); test(readStat1==KRequestPending); r = reader.SetSize(100); - test(r==KErrNone); + test_KErrNone(r); User::WaitForRequest(readStat1); test(readStat1==KErrNone); test(readBuf.Length() == 100); r=reader.SetSize(0); - test(r==KErrNone); + test_KErrNone(r); reader.Close(); test.Next(_L("Test asynchronous read is notified due to RFile::Write()")); r=reader.Open(TheFs,_L("\\F32-TST\\NOTIFY\\NewFile.txt"),EFileRead|EFileReadAsyncAll|EFileWrite|EFileShareAny); - test(r==KErrNone); + test_KErrNone(r); reader.Read(0, readBuf, 26, readStat1); test(readStat1==KRequestPending); RFile writer; @@ -4140,9 +4141,9 @@ test.Next(_L("Test multiple asynchronous readers notified from separate thread")); r=reader.Open(TheFs,_L("\\F32-TST\\NOTIFY\\NewFile.txt"),EFileRead|EFileReadAsyncAll|EFileWrite|EFileShareAny); - test(r==KErrNone); + test_KErrNone(r); r=reader.SetSize(0); - test(r==KErrNone); + test_KErrNone(r); const TInt KReadLen = 26; test.Printf(_L(">Read%d[%d]\n"), 0, KReadLen); reader.Read(0, readBuf, KReadLen, readStat1); @@ -4154,7 +4155,7 @@ RThread thread; r=thread.Create(_L("MyThread"),ThreadEntryPoint,KDefaultStackSize,KHeapSize,KHeapSize,(TAny*)ETest12); - test(r==KErrNone); + test_KErrNone(r); thread.Logon(thrdStat); thread.Resume(); thread.Close(); @@ -4227,7 +4228,7 @@ fileName.Append(_L("TestFile.tst")); nRes=file.Replace(TheFs, fileName, EFileWrite|EFileRead); - test(nRes == KErrNone || nRes ==KErrAlreadyExists); + test_Value(nRes, nRes == KErrNone || nRes ==KErrAlreadyExists); file.Close(); //-- check that the notifier worked @@ -4287,7 +4288,7 @@ if (r == KErrNotSupported) continue; - test(r==KErrNone); + test_KErrNone(r); TInt sockNum = 0; if (d.IsRemovable(sockNum)>0) {