diff -r a179b74831c9 -r c1f20ce4abcf kerneltest/e32test/buffer/t_bma.cpp --- a/kerneltest/e32test/buffer/t_bma.cpp Thu Aug 19 11:14:22 2010 +0300 +++ b/kerneltest/e32test/buffer/t_bma.cpp Tue Aug 31 16:34:26 2010 +0300 @@ -157,14 +157,31 @@ pBitMapAllocator->Free(i); test(pBitMapAllocator->Avail()==pBitMapAllocator->Size()); // + test.Next(_L("AllocFrom")); + i=0; + for (;iAllocFrom(i); + test(j==i); + } + test(pBitMapAllocator->Avail()==0); + + test.Next(_L("Try AllocFrom for already allocated pos")); //should return KErrNoMemory + TInt j=pBitMapAllocator->AllocFrom(i-1); + test(j==KErrNoMemory); + + test.Next(_L("Free (again)")); + for (i=0;iFree(i); + } + test(pBitMapAllocator->Avail()==pBitMapAllocator->Size()); +// + test.Next(_L("AllocAt")); pBitMapAllocator->AllocAt(aSize-1); test(pBitMapAllocator->Avail()==pBitMapAllocator->Size()-1); -// -// test.Next(_L("AllocAt an already allocated cell")); // this test should cause a Panic. -// pBitMapAllocator->AllocAt(aSize-1); -// test(pBitMapAllocator->Avail()==pBitMapAllocator->Size()-1); -// + test.Next(_L("Free (again)")); pBitMapAllocator->Free(aSize-1); test(pBitMapAllocator->Avail()==pBitMapAllocator->Size());