--- a/kerneltest/f32test/server/t_blockmap.cpp Tue Aug 31 16:34:26 2010 +0300
+++ b/kerneltest/f32test/server/t_blockmap.cpp Wed Sep 01 12:34:56 2010 +0100
@@ -33,7 +33,6 @@
//! @SYMTestStatus Implemented
-#define __E32TEST_EXTENSION__
#include <e32test.h>
#include <e32svr.h>
#include <f32file.h>
@@ -81,12 +80,12 @@
r = fMan->Delete(name);
r = fMan->Copy(KTestFile, name);
- test_KErrNone(r);
+ test( r == KErrNone );
TInt localDriveNum = 0;
RFile testFile;
r = testFile.Open( TheFs, name, EFileRead );
- test_KErrNone(r);
+ test( r == KErrNone );
RArray<SBlockMapInfo> map; // From RArray<TBlockMapEntry> map; to RArray<SBlockMapInfo> map;
SBlockMapInfo info;
@@ -103,9 +102,9 @@
map.Close();
testFile.Close();
r = fMan->Attribs(name, 0, KEntryAttReadOnly, 0);
- test_KErrNone(r);
+ test( r == KErrNone );
r = fMan->Delete(name);
- test_KErrNone(r);
+ test( r == KErrNone );
delete fMan;
return bmErr;
}
@@ -118,7 +117,7 @@
TInt size;
r = testFile.Size(size);
- test_KErrNone(r);
+ test( r == KErrNone );
TBuf8<KReadBufferSize> buf1;
TBuf8<KReadBufferSize> buf2;
@@ -145,7 +144,7 @@
const TInt KTotalSegments = totalSegments;
r = localDrive.Connect( localDriveNum, changed );
- test_KErrNone(r);
+ test( r == KErrNone );
// For each SBlockMapInfo object in RArray map
for ( c = 0; c < map.Count(); c++ )
@@ -176,7 +175,7 @@
testFile.Read( startPos + amountRead, buf1, KReadBufferSize );
localDrive.Read( map[c].iStartBlockAddress + myBlockMapEntry->iStartBlock * map[c].iBlockGranularity + (c2 == 1?map[c].iBlockStartOffset:0) + myCounter*KReadBufferSize, KReadBufferSize, buf2);
r = buf1.Compare( buf2 );
- test_Value(r, r == 0 );
+ test( r == 0 );
buf1.Zero();
buf2.Zero();
myCounter++;
@@ -189,7 +188,7 @@
testFile.Read(startPos + amountRead, buf1, miniLength);
localDrive.Read( map[c].iStartBlockAddress + myBlockMapEntry->iStartBlock * map[c].iBlockGranularity + (c2 == 1?map[c].iBlockStartOffset:0) + myCounter*KReadBufferSize, miniLength, buf2);
r = buf1.Compare( buf2 );
- test_Value(r, r == 0 );
+ test( r == 0 );
amountRead += miniLength;
length -= miniLength;
miniLength = 0;
@@ -202,9 +201,9 @@
testFile.Close();
r=fMan->Attribs(name, 0, KEntryAttReadOnly, 0);
- test_KErrNone(r);
+ test( r == KErrNone );
r = fMan->Delete(name);
- test_KErrNone(r);
+ test( r == KErrNone );
delete fMan;
return bmErr;
}
@@ -217,7 +216,7 @@
TInt localDriveNum = 0;
RFile testFile;
TInt r = testFile.Open( TheFs, KTestFileFAT, EFileRead );
- test_KErrNone(r);
+ test( r == KErrNone );
RArray<SBlockMapInfo> map; // From RArray<TBlockMapEntry> map; to RArray<SBlockMapInfo> map;
SBlockMapInfo info;
@@ -244,7 +243,7 @@
TInt size;
r = testFile.Size(size);
- test_KErrNone(r);
+ test( r == KErrNone );
TBuf8<KReadBufferSize> buf1;
TBuf8<KReadBufferSize> buf2;
@@ -269,7 +268,7 @@
const TInt KTotalSegments = totalSegments;
r = localDrive.Connect( localDriveNum, changed );
- test_KErrNone(r);
+ test( r == KErrNone );
// For each SBlockMapInfo object in RArray map
for ( c = 0; c < map.Count(); c++ )
@@ -301,7 +300,7 @@
testFile.Read( startPos + amountRead, buf1, KReadBufferSize );
localDrive.Read( map[c].iStartBlockAddress + myBlockMapEntry->iStartBlock * map[c].iBlockGranularity + (c2 == 1?map[c].iBlockStartOffset:0) + myCounter*KReadBufferSize, KReadBufferSize, buf2);
r = buf1.Compare( buf2 );
- test_Value(r, r == 0 );
+ test( r == 0 );
buf1.Zero();
buf2.Zero();
myCounter++;
@@ -314,7 +313,7 @@
testFile.Read(startPos + amountRead, buf1, miniLength);
localDrive.Read( map[c].iStartBlockAddress + myBlockMapEntry->iStartBlock * map[c].iBlockGranularity + (c2 == 1?map[c].iBlockStartOffset:0) + myCounter*KReadBufferSize, miniLength, buf2);
r = buf1.Compare( buf2 );
- test_Value(r, r == 0 );
+ test( r == 0 );
amountRead += miniLength;
length -= miniLength;
miniLength = 0;
@@ -336,7 +335,7 @@
TInt localDriveNum = 0;
RFile testFile;
TInt r = testFile.Open( TheFs, KTestFile, EFileRead );
- test_KErrNone(r);
+ test( r == KErrNone );
RArray<SBlockMapInfo> map; // From RArray<TBlockMapEntry> map; to RArray<SBlockMapInfo> map;
SBlockMapInfo info;
@@ -363,7 +362,7 @@
TInt size;
r = testFile.Size(size);
- test_KErrNone(r);
+ test( r == KErrNone );
TBuf8<KReadBufferSize> buf1;
TBuf8<KReadBufferSize> buf2;
@@ -385,7 +384,7 @@
totalSegments += granularity;
}
r = localDrive.Connect( localDriveNum, changed );
- test_KErrNone(r);
+ test( r == KErrNone );
// For each SBlockMapInfo object in RArray map
for ( c = 0; c < map.Count(); c++ )
@@ -413,7 +412,7 @@
testFile.Read( startPos + amountRead, buf1, KReadBufferSize );
localDrive.Read( map[c].iStartBlockAddress + myBlockMapEntry->iStartBlock * map[c].iBlockGranularity + (c2 == 1?map[c].iBlockStartOffset:0) + myCounter*KReadBufferSize, KReadBufferSize, buf2);
r = buf1.Compare( buf2 );
- test_Value(r, r == 0 );
+ test( r == 0 );
buf1.Zero();
buf2.Zero();
myCounter++;
@@ -426,7 +425,7 @@
testFile.Read(startPos + amountRead, buf1, miniLength);
localDrive.Read( map[c].iStartBlockAddress + myBlockMapEntry->iStartBlock * map[c].iBlockGranularity + (c2 == 1?map[c].iBlockStartOffset:0) + myCounter*KReadBufferSize, miniLength, buf2);
r = buf1.Compare( buf2 );
- test_Value(r, r == 0 );
+ test( r == 0 );
amountRead += miniLength;
length -= miniLength;
miniLength = 0;
@@ -456,12 +455,12 @@
r = fMan->Delete(name);
r = fMan->Copy(KTestFile, name);
- test_Value(r, r == KErrNone || r == KErrAlreadyExists);
+ test( r == KErrNone || r == KErrAlreadyExists);
TInt localDriveNum = 0;
RFile testFile;
r = testFile.Open( TheFs, name, EFileRead );
- test_KErrNone(r);
+ test( r == KErrNone );
RArray<SBlockMapInfo> map; // From RArray<TBlockMapEntry> map; to RArray<SBlockMapInfo> map;
SBlockMapInfo info;
@@ -478,9 +477,9 @@
map.Close();
testFile.Close();
r = fMan->Attribs(name, 0, KEntryAttReadOnly, 0);
- test_KErrNone(r);
+ test( r == KErrNone );
r = fMan->Delete(name);
- test_KErrNone(r);
+ test( r == KErrNone );
delete fMan;
return bmErr;
}
@@ -493,7 +492,7 @@
TInt size;
r = testFile.Size(size);
- test_KErrNone(r);
+ test( r == KErrNone );
TBuf8<KReadBufferSize> buf1;
TBuf8<KReadBufferSize> buf2;
@@ -521,7 +520,7 @@
const TInt KTotalSegments = totalSegments;
r = localDrive.Connect( localDriveNum, changed );
- test_KErrNone(r);
+ test( r == KErrNone );
// For each SBlockMapInfo object in RArray map
for ( c = 0; c < map.Count(); c++ )
@@ -553,7 +552,7 @@
testFile.Read( startPos + amountRead, buf1, KReadBufferSize );
localDrive.Read( map[c].iStartBlockAddress + myBlockMapEntry->iStartBlock * map[c].iBlockGranularity + (c2 == 1?map[c].iBlockStartOffset:0) + myCounter*KReadBufferSize, KReadBufferSize, buf2);
r = buf1.Compare( buf2 );
- test_Value(r, r == 0 );
+ test( r == 0 );
buf1.Zero();
buf2.Zero();
myCounter++;
@@ -566,7 +565,7 @@
testFile.Read(startPos + amountRead, buf1, miniLength);
localDrive.Read( map[c].iStartBlockAddress + myBlockMapEntry->iStartBlock * map[c].iBlockGranularity + (c2 == 1?map[c].iBlockStartOffset:0) + myCounter*KReadBufferSize, miniLength, buf2);
r = buf1.Compare( buf2 );
- test_Value(r, r == 0 );
+ test( r == 0 );
amountRead += miniLength;
length -= miniLength;
miniLength = 0;
@@ -579,9 +578,9 @@
testFile.Close();
r=fMan->Attribs(name, 0, KEntryAttReadOnly, 0);
- test_KErrNone(r);
+ test( r == KErrNone );
r = fMan->Delete(name);
- test_KErrNone(r);
+ test( r == KErrNone );
delete fMan;
return bmErr;
}
@@ -601,11 +600,11 @@
r = fMan->Delete(name);
r = fMan->Copy(KTestFile, name);
- test_Value(r, r == KErrNone || r == KErrAlreadyExists);
+ test( r == KErrNone || r == KErrAlreadyExists);
RFile testFile;
r = testFile.Open( TheFs, name, EFileRead );
- test_KErrNone(r);
+ test( r == KErrNone );
RArray<SBlockMapInfo> map; // From RArray<TBlockMapEntry> map; to RArray<SBlockMapInfo> map;
SBlockMapInfo info;
@@ -617,9 +616,9 @@
testFile.Close();
r = fMan->Attribs(name, 0, KEntryAttReadOnly, 0);
- test_KErrNone(r);
+ test( r == KErrNone );
r = fMan->Delete(name);
- test_KErrNone(r);
+ test( r == KErrNone );
delete fMan;
return bmErr;
}
@@ -636,11 +635,11 @@
name.Append( KTestFileName );
TInt r=fMan->Copy(KTestFile, name);
- test_Value(r, r == KErrNone || r == KErrAlreadyExists);
+ test( r == KErrNone || r == KErrAlreadyExists);
RFile testFile;
r = testFile.Open( TheFs, name, EFileRead );
- test_KErrNone(r);
+ test( r == KErrNone );
RArray<SBlockMapInfo> map; // From RArray<TBlockMapEntry> map; to RArray<SBlockMapInfo> map;
SBlockMapInfo info;
@@ -649,9 +648,9 @@
testFile.Close();
r=fMan->Attribs(name, 0, KEntryAttReadOnly, 0);
- test_KErrNone(r);
+ test( r == KErrNone );
r = fMan->Delete(name);
- test_KErrNone(r);
+ test( r == KErrNone );
delete fMan;
return bmErr;
}
@@ -668,12 +667,12 @@
name.Append( KTestFileName );
TInt r=fMan->Copy(KTestFile, name);
- test_Value(r, r == KErrNone || r == KErrAlreadyExists);
+ test( r == KErrNone || r == KErrAlreadyExists);
TInt localDriveNum = 0;
RFile testFile;
r = testFile.Open( TheFs, name, EFileRead );
- test_KErrNone(r);
+ test( r == KErrNone );
RArray<SBlockMapInfo> map; // From RArray<TBlockMapEntry> map; to RArray<SBlockMapInfo> map;
SBlockMapInfo info;
@@ -690,9 +689,9 @@
map.Close();
testFile.Close();
r = fMan->Attribs(name, 0, KEntryAttReadOnly, 0);
- test_KErrNone(r);
+ test( r == KErrNone );
r = fMan->Delete(name);
- test_KErrNone(r);
+ test( r == KErrNone );
delete fMan;
return bmErr;
}
@@ -705,7 +704,7 @@
TInt size;
r = testFile.Size(size);
- test_KErrNone(r);
+ test( r == KErrNone );
TBuf8<KReadBufferSize> buf1;
TBuf8<KReadBufferSize> buf2;
@@ -733,7 +732,7 @@
const TInt KTotalSegments = totalSegments;
r = localDrive.Connect( localDriveNum, changed );
- test_KErrNone(r);
+ test( r == KErrNone );
// For each SBlockMapInfo object in RArray map
for ( c = 0; c < map.Count(); c++ )
@@ -765,7 +764,7 @@
testFile.Read( startPos + amountRead, buf1, KReadBufferSize );
localDrive.Read( map[c].iStartBlockAddress + myBlockMapEntry->iStartBlock * map[c].iBlockGranularity + (c2 == 1?map[c].iBlockStartOffset:0) + myCounter*KReadBufferSize, KReadBufferSize, buf2);
r = buf1.Compare( buf2 );
- test_Value(r, r == 0 );
+ test( r == 0 );
buf1.Zero();
buf2.Zero();
myCounter++;
@@ -778,7 +777,7 @@
testFile.Read(startPos + amountRead, buf1, miniLength);
localDrive.Read( map[c].iStartBlockAddress + myBlockMapEntry->iStartBlock * map[c].iBlockGranularity + (c2 == 1?map[c].iBlockStartOffset:0) + myCounter*KReadBufferSize, miniLength, buf2);
r = buf1.Compare( buf2 );
- test_Value(r, r == 0 );
+ test( r == 0 );
amountRead += miniLength;
length -= miniLength;
miniLength = 0;
@@ -791,9 +790,9 @@
testFile.Close();
r=fMan->Attribs(name, 0, KEntryAttReadOnly, 0);
- test_KErrNone(r);
+ test( r == KErrNone );
r = fMan->Delete(name);
- test_KErrNone(r);
+ test( r == KErrNone );
delete fMan;
return bmErr;
}
@@ -815,7 +814,7 @@
TInt localDriveNum = 0;
RFile testFile;
TInt r = testFile.Open( TheFs, name, EFileRead );
- test_KErrNone(r);
+ test( r == KErrNone );
RArray<SBlockMapInfo> map; // From RArray<TBlockMapEntry> map; to RArray<SBlockMapInfo> map;
SBlockMapInfo info;
TInt counter = 0;
@@ -833,9 +832,9 @@
if ( Finished )
{
r = fMan->Attribs(name, 0, KEntryAttReadOnly, 0);
- test_KErrNone(r);
+ test( r == KErrNone );
r = fMan->Delete(name);
- test_KErrNone(r);
+ test( r == KErrNone );
}
delete fMan;
return bmErr;
@@ -848,7 +847,7 @@
TInt granularity;
TInt size;
r = testFile.Size(size);
- test_KErrNone(r);
+ test( r == KErrNone );
TBuf8<KReadBufferSize> buf1;
TBuf8<KReadBufferSize> buf2;
@@ -875,7 +874,7 @@
const TInt KTotalSegments = totalSegments;
r = localDrive.Connect( localDriveNum, changed );
- test_KErrNone(r);
+ test( r == KErrNone );
// For each SBlockMapInfo object in RArray map
for ( c = 0; c < map.Count(); c++ )
@@ -907,7 +906,7 @@
testFile.Read( startPos + amountRead, buf1, KReadBufferSize );
localDrive.Read( map[c].iStartBlockAddress + myBlockMapEntry->iStartBlock * map[c].iBlockGranularity + (c2 == 1?map[c].iBlockStartOffset:0) + myCounter*KReadBufferSize, KReadBufferSize, buf2);
r = buf1.Compare( buf2 );
- test_Value(r, r == 0 );
+ test( r == 0 );
buf1.Zero();
buf2.Zero();
myCounter++;
@@ -920,7 +919,7 @@
testFile.Read(startPos + amountRead, buf1, miniLength );
localDrive.Read( map[c].iStartBlockAddress + myBlockMapEntry->iStartBlock * map[c].iBlockGranularity + (c2 == 1?map[c].iBlockStartOffset:0) + myCounter*KReadBufferSize, miniLength, buf2);
r = buf1.Compare( buf2 );
- test_Value(r, r == 0 );
+ test( r == 0 );
amountRead += miniLength;
length -= miniLength;
miniLength = 0;
@@ -935,9 +934,9 @@
if ( Finished )
{
r=fMan->Attribs(name, 0, KEntryAttReadOnly, 0);
- test_KErrNone(r);
+ test( r == KErrNone );
r = fMan->Delete(name);
- test_KErrNone(r);
+ test( r == KErrNone );
}
delete fMan;
return bmErr;
@@ -958,7 +957,7 @@
name1.Append( KFragmentedFileName1 );
RFile file1;
r = file1.Create(TheFs, name1, EFileWrite);
- test_KErrNone(r);
+ test( r == KErrNone );
file1.Close();
TFileName name2(KDriveBase);
@@ -973,7 +972,7 @@
name2.Append( KFragmentedFileName2 );
RFile file2;
r = file2.Create(TheFs, name2, EFileWrite);
- test_KErrNone(r);
+ test( r == KErrNone );
file2.Close();
TInt64 randomSeed;
TBuf8<KMaxFragmentSize> tempBuf;
@@ -1000,31 +999,31 @@
*buf++ = (TUint8)('A' + (Math::Rand(randomSeed) % ('Z' - 'A')));
}
r = file1.Open( TheFs, name1, EFileWrite );
- test_KErrNone(r);
+ test( r == KErrNone );
r = file1.Seek( ESeekEnd, pos1 );
- test_KErrNone(r);
+ test( r == KErrNone );
r = file1.Write( pos1, tempBuf );
- test_KErrNone(r);
+ test( r == KErrNone );
r = file1.Flush();
- test_KErrNone(r);
+ test( r == KErrNone );
file1.Close();
if ( mycount++ < 6 )
{
r = file2.Open( TheFs, name2, EFileWrite );
- test_KErrNone(r);
+ test( r == KErrNone );
r = file2.Seek( ESeekEnd, pos2 );
- test_KErrNone(r);
+ test( r == KErrNone );
r = file2.Write( pos2, tempBuf );
- test_KErrNone(r);
+ test( r == KErrNone );
r = file2.Flush();
- test_KErrNone(r);
+ test( r == KErrNone );
file2.Close();
}
} while ( fileSize < KMaxFileSize );
CFileMan* fMan=CFileMan::NewL(TheFs);
test(fMan!=NULL);
r = fMan->Delete(name2);
- test_KErrNone(r);
+ test( r == KErrNone );
delete fMan;
}
@@ -1038,7 +1037,7 @@
TInt r = TheFs.Drive(info, i);
if ( r != KErrNone )
continue;
- test_KErrNone(r);
+ test( r == KErrNone );
if ( aDriveType == EDriveNand )
{
c++ == 0 ? test.Printf( _L("Searching for NAND drive.")) : test.Printf( _L("."));
@@ -1121,9 +1120,9 @@
TInt testFileSize = 0;
RFile testFile;
TInt r = testFile.Open(TheFs, KTestFile, EFileRead);
- test_KErrNone(r);
+ test(r==KErrNone);
r = testFile.Size(testFileSize);
- test_KErrNone(r);
+ test(r==KErrNone);
test(testFileSize>16384);
testFile.Close();
@@ -1131,7 +1130,7 @@
{
TInt value;
r = HAL::Get( HAL::EMachineUid, value );
- test_KErrNone(r);
+ test( r == KErrNone );
if ( value != HAL::EMachineUid_Lubbock ) // Lubbock cannot run FindDrive as it doesn't support the NAND API
{
test.Next(_L("Test BlockMap retrieval on NAND FAT."));
@@ -1139,184 +1138,184 @@
if ( NandDrive > -1 ) // not finding a NAND drive isn't an error as only NAND builds have one
{
r = TestBlockMapNandFATUserData(0, -1);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapNandFATUserData(1024, 4096);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapNandFATUserData(1020, 4100);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapNandFATUserData(1024, 4100);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapNandFATUserData(1020, 4096);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapNandFATUserData(1025, 1200);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapNandFATUserData(0, testFileSize+100);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapNandFATUserData(-5, -1);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapNandFATUserData(-5, testFileSize+100);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapNandFATUserData(0, 0);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapNandFATUserData(testFileSize, -1);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapNandFATUserData(0, -1);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapNandFATUserData(2000, 2001);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapNandFATUserData(0, 0);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapNandFATUserData(2000, 2000);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapNandFATUserData(2048, 2048);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
test.Printf(_L("Generating Fragmented File..."));
GenerateFragmentedFiles(EDriveNand);
test.Printf(_L("Done!\n"));
test.Next(_L("Test BlockMap retrieval on NAND FAT (User area) (fragmented)."));
r = TestBlockMapFragmented(EDriveNand, 0, -1);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapFragmented(EDriveNand, 1024, 4096);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapFragmented(EDriveNand, 1020, 4100);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapFragmented(EDriveNand, 1024, 4100);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapFragmented(EDriveNand, 1020, 4096);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapFragmented(EDriveNand, 1025, 1200);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapFragmented(EDriveNand, 0, testFileSize+100);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapFragmented(EDriveNand, -5, -1);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapFragmented(EDriveNand, -5, testFileSize+100);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapFragmented(EDriveNand, 0, 0);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapFragmented(EDriveNand, testFileSize, -1);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapFragmented(EDriveNand, 0, -1);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapFragmented(EDriveNand, 2000, 2001);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapFragmented(EDriveNand, 0, 0);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapFragmented(EDriveNand, 2000, 2000);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
Finished = ETrue;
r = TestBlockMapFragmented(EDriveNand, 2048, 2048);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
test.Next(_L("Test BlockMap retrieval on NAND FAT."));
r = TestBlockMapNandFAT(0, -1);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapNandFAT(1024, 4096);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapNandFAT(1020, 4100);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapNandFAT(1024, 4100);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapNandFAT(1020, 4096);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapNandFAT(1025, 1200);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapNandFAT(0, testFileSize+100);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapNandFAT(-5, -1);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapNandFAT(-5, testFileSize+100);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapNandFAT(0, 0);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapNandFAT(testFileSize, -1);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapNandFAT(0, -1);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapNandFAT(2000, 2001);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapNandFAT(0, 0);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapNandFAT(2000, 2000);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapNandFAT(2048, 2048);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
test.Next(_L("Test BlockMap retrieval on NAND ROFS."));
r = TestBlockMapNandROFS(0, -1);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapNandROFS(1024, 4096);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapNandROFS(1020, 4100);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapNandROFS(1024, 4100);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapNandROFS(1020, 4096);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapNandROFS(1025, 1200);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapNandROFS(0, testFileSize+100);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapNandROFS(-5, -1);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapNandROFS(-5, testFileSize+100);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapNandROFS(0, 0);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapNandROFS(testFileSize, -1);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapNandROFS(0, -1);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapNandROFS(2000, 2001);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapNandROFS(0, 0);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapNandROFS(2000, 2000);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapNandROFS(2048, 2048);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
test.Next(_L("Test BlockMap retrieval on RAM FAT."));
FindDrive(EDriveRam);
test( RamFatDrive > -1 );
r = TestBlockMapRamFAT(0, -1);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapRamFAT(1024, 4096);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapRamFAT(1020, 4100);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapRamFAT(1024, 4100);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapRamFAT(1020, 4096);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapRamFAT(1025, 1200);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapRamFAT(0, testFileSize+100);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapRamFAT(-5, -1);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapRamFAT(-5, testFileSize+100);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapRamFAT(0, 0);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapRamFAT(testFileSize, -1);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapRamFAT(0, -1);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapRamFAT(2000, 2001);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapRamFAT(0, 0);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapRamFAT(2000, 2000);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapRamFAT(2048, 2048);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
test.Next(_L("Test BlockMap retrieval on Ram FAT (2)."));
r = TestBlockMapRamFAT2(0, -1);
- test_Value(r, r == KErrNotSupported );
+ test( r == KErrNotSupported );
FindDrive(EDriveRemovable);
if ( RemovableFatDrive > -1)
{
test.Next(_L("Test BlockMap retrieval on removable FAT."));
r = TestBlockMapRemovableFAT(0, -1);
- test_Value(r, r == Pageable ? KErrNotSupported : KErrCompletion);
+ Pageable?test( r == KErrNotSupported ):test( r == KErrCompletion );
}
else
{
@@ -1324,37 +1323,37 @@
FindDrive(EDriveInternalRemovable);
test( InternalRemovableFatDrive > -1);
r = TestBlockMapInternalRemovableFAT(0, -1);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapInternalRemovableFAT(1024, 4096);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapInternalRemovableFAT(1020, 4100);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapInternalRemovableFAT(1024, 4100);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapInternalRemovableFAT(1020, 4096);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapInternalRemovableFAT(1025, 1200);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapInternalRemovableFAT(0, testFileSize+100);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapInternalRemovableFAT(-5, -1);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapInternalRemovableFAT(-5, testFileSize+100);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapInternalRemovableFAT(0, 0);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapInternalRemovableFAT(testFileSize, -1);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapInternalRemovableFAT(0, -1);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapInternalRemovableFAT(2000, 2001);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapInternalRemovableFAT(0, 0);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapInternalRemovableFAT(2000, 2000);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapInternalRemovableFAT(2048, 2048);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
}
test.Next(_L("Test BlockMap retrieval on Ram FAT (fragmented)."));
test.Printf(_L("Generating Fragmented File..."));
@@ -1362,38 +1361,38 @@
test.Printf(_L("Done!\n"));
Finished = EFalse;
r = TestBlockMapFragmented(EDriveRam, 0, -1);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapFragmented(EDriveRam, 1020, 4100);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapFragmented(EDriveRam, 2049, 4096);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapFragmented(EDriveRam, 1024, 4100);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapFragmented(EDriveRam, 1020, 4096);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapFragmented(EDriveRam, 1025, 1200);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapFragmented(EDriveRam, 0, testFileSize+100);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapFragmented(EDriveRam, -5, -1);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapFragmented(EDriveRam, -5, testFileSize+100);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapFragmented(EDriveRam, 0, 0);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapFragmented(EDriveRam, testFileSize, -1);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapFragmented(EDriveRam, 0, -1);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapFragmented(EDriveRam, 2000, 2001);
- test_Value(r, r == KErrCompletion );
+ test( r == KErrCompletion );
r = TestBlockMapFragmented(EDriveRam, 0, 0);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
r = TestBlockMapFragmented(EDriveRam, 2000, 2000);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
Finished = ETrue;
r = TestBlockMapFragmented(EDriveRam, 2048, 2048);
- test_Value(r, r == KErrArgument );
+ test( r == KErrArgument );
}
else
{