--- a/kerneltest/f32test/server/t_fsy2k.cpp Tue Aug 31 16:34:26 2010 +0300
+++ b/kerneltest/f32test/server/t_fsy2k.cpp Wed Sep 01 12:34:56 2010 +0100
@@ -15,7 +15,6 @@
//
//
-#define __E32TEST_EXTENSION__
#include <f32file.h>
#include <e32test.h>
#include "t_server.h"
@@ -37,11 +36,11 @@
MakeFile(_L("Y2KTEST.tst"));
TInt r=TheFs.SetEntry(_L("Y2KTEST.tst"),*aTime,KEntryAttHidden,KEntryAttArchive);
- test_KErrNone(r);
+ test(r==KErrNone);
TEntry entry;
r=TheFs.Entry(_L("Y2KTEST.tst"),entry);
- test_KErrNone(r);
+ test(r==KErrNone);
TDateTime checkDateTime=(entry.iModified).DateTime();
test(checkDateTime.Year()==aDateTime->Year());
@@ -60,14 +59,14 @@
test.Printf(_L("Valid date: %S\n"),&gDateBuf);
r=TheFs.Delete(_L("Y2KTEST.tst"));
- test_KErrNone(r);
+ test(r==KErrNone);
MakeDir(_L("\\Y2KTEST\\"));
r=TheFs.SetEntry(_L("\\Y2KTEST\\"),*aTime,KEntryAttHidden,KEntryAttArchive);
- test_KErrNone(r);
+ test(r==KErrNone);
r=TheFs.Entry(_L("\\Y2KTEST\\"),entry);
- test_KErrNone(r);
+ test(r==KErrNone);
checkDateTime=(entry.iModified).DateTime();
test(checkDateTime.Year()==aDateTime->Year());
@@ -86,7 +85,7 @@
test.Printf(_L("Valid date: %S\n"),&gDateBuf);
r=TheFs.RmDir(_L("\\Y2KTEST\\"));
- test_KErrNone(r);
+ test(r==KErrNone);
}
@@ -99,11 +98,11 @@
MakeFile(_L("Y2KTEST.tst"));
TInt r=TheFs.SetModified(_L("Y2KTEST.tst"),*aTime);
- test_KErrNone(r);
+ test(r==KErrNone);
TTime check;
r=TheFs.Modified(_L("Y2KTEST.tst"),check);
- test_KErrNone(r);
+ test(r==KErrNone);
TDateTime checkDateTime=check.DateTime();
@@ -124,14 +123,14 @@
test.Printf(_L("Valid date: %S\n"),&gDateBuf);
r=TheFs.Delete(_L("Y2KTEST.tst"));
- test_KErrNone(r);
+ test(r==KErrNone);
MakeDir(_L("\\Y2KTEST\\"));
r=TheFs.SetModified(_L("\\Y2KTEST\\"),*aTime);
- test_KErrNone(r);
+ test(r==KErrNone);
r=TheFs.Modified(_L("\\Y2KTEST\\"),check);
- test_KErrNone(r);
+ test(r==KErrNone);
checkDateTime=check.DateTime();
test(checkDateTime.Year()==aDateTime->Year());
@@ -150,7 +149,7 @@
test.Printf(_L("Valid date: %S\n"),&gDateBuf);
r=TheFs.RmDir(_L("\\Y2KTEST\\"));
- test_KErrNone(r);
+ test(r==KErrNone);
}
@@ -161,16 +160,16 @@
{
RFile file;
TInt r=file.Replace(TheFs,_L("Y2KTEST.tst"),0);
- test_Value(r, r == KErrNone || r==KErrPathNotFound);
+ test(r==KErrNone || r==KErrPathNotFound);
r=file.Set(*aTime,KEntryAttHidden,KEntryAttNormal);
- test_KErrNone(r);
+ test(r==KErrNone);
file.Close();
TTime check;
file.Open(TheFs,_L("Y2KTEST.tst"),EFileWrite);
r=file.Modified(check);
- test_KErrNone(r);
+ test(r==KErrNone);
file.Close();
test.Printf(_L("Date set to "));
@@ -224,16 +223,16 @@
{
RFile file;
TInt r=file.Replace(TheFs,_L("Y2KTEST.tst"),0);
- test_Value(r, r == KErrNone || r==KErrPathNotFound);
+ test(r==KErrNone || r==KErrPathNotFound);
r=file.SetModified(*aTime);
- test_KErrNone(r);
+ test(r==KErrNone);
file.Close();
TTime check;
file.Open(TheFs,_L("Y2KTEST.tst"),EFileWrite);
r=file.Modified(check);
- test_KErrNone(r);
+ test(r==KErrNone);
file.Close();
TDateTime checkDateTime=check.DateTime();
@@ -267,11 +266,11 @@
CFileMan* fileMan=CFileMan::NewL(TheFs);
TInt r=fileMan->Attribs(_L("Y2KTEST.tst"),KEntryAttHidden,KEntryAttNormal,*aTime);
- test_KErrNone(r);
+ test(r==KErrNone);
TEntry entry;
r=TheFs.Entry(_L("Y2KTEST.tst"),entry);
- test_KErrNone(r);
+ test(r==KErrNone);
TTime check=entry.iModified;
TDateTime checkDateTime=check.DateTime();
@@ -293,7 +292,7 @@
test.Printf(_L("Valid date: %S\n"),&gDateBuf);
r=TheFs.Delete(_L("Y2KTEST.tst"));
- test_KErrNone(r);
+ test(r==KErrNone);
delete fileMan;
}
@@ -494,7 +493,7 @@
for (i=0;i<KMaxValidDateTimes;i++)
{
TRAPD(error,testCFileManAttribsL(tempDateTime, tempTime, ETrue));
- test_KErrNone(error);
+ test(error==KErrNone);
tempDateTime++;
tempTime++;
}
@@ -567,7 +566,7 @@
{
test.Printf(_L("Invalid date: %S\n"),&invalidDates[i]);
TRAPD(error,testCFileManAttribsL(tempDateTime, tempTime, EFalse));
- test_KErrNone(error);
+ test(error==KErrNone);
tempDateTime++;
tempTime++;
}
@@ -591,13 +590,13 @@
{
// Dummy time is used to initialise validDateTime[i] before calling SetX()
r=validDateTime[i].Set(1998,EJune,23,11,11,11,0);
- test_KErrNone(r);
+ test(r==KErrNone);
r=validDateTime[i].SetYear(testYearValid[i]);
- test_KErrNone(r);
+ test(r==KErrNone);
r=validDateTime[i].SetMonth(testMonthValid[i]);
- test_KErrNone(r);
+ test(r==KErrNone);
r=validDateTime[i].SetDay(testDayValid[i]);
- test_KErrNone(r);
+ test(r==KErrNone);
validTime[i]=validDateTime[i];
}
@@ -611,15 +610,15 @@
{
// Dummy time is used to initialise validDateTime[i] before calling SetX()
r=invalidDateTime[i].Set(1998,EJune,22,11,11,11,0);
- test_KErrNone(r);
+ test(r==KErrNone);
r=invalidDateTime[i].SetYear(testYearInvalid[i]);
- test_KErrNone(r);
+ test(r==KErrNone);
r=invalidDateTime[i].SetMonth(testMonthInvalid[i]);
- test_KErrNone(r);
+ test(r==KErrNone);
r=invalidDateTime[i].SetDay(testDayInvalid[i]);
- test_Value(r, r == KErrGeneral); // This will fail because it is an invalid date
+ test(r==KErrGeneral); // This will fail because it is an invalid date
r=invalidDateTime[i].SetDay(testDayInvalid[i]-1);
- test_KErrNone(r); // Set it one day less
+ test(r==KErrNone); // Set it one day less
invalidTime[i]=invalidDateTime[i];
invalidTime[i]+=extraDay; // Add on an extra day. This should bump the
} // date onto the next month, NOT set the day
@@ -636,7 +635,7 @@
{
TInt r=TheFs.MkDirAll(_L("\\F32-TST\\YEAR 2000 TESTS\\"));
- test_Value(r, r == KErrNone || r==KErrAlreadyExists);
+ test(r==KErrNone || r==KErrAlreadyExists);
TRAP(r,CallTests());
if (r==KErrNone)
TheFs.ResourceCountMarkEnd();
@@ -646,5 +645,5 @@
test(0);
}
r=TheFs.RmDir(_L("\\F32-TST\\YEAR 2000 TESTS\\"));
- test_KErrNone(r);
+ test(r==KErrNone);
}