diff -r d57b86b1867a -r dc268b18d709 kerneltest/e32test/buffer/t_hashtab.cpp --- a/kerneltest/e32test/buffer/t_hashtab.cpp Mon Sep 13 15:16:07 2010 +0100 +++ b/kerneltest/e32test/buffer/t_hashtab.cpp Wed Sep 22 10:53:45 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of the License "Eclipse Public License v1.0" @@ -1491,6 +1491,46 @@ map.ResetAndDestroy(); } +void TestInsertL() + { + TInt i; + TInt count=50; + const TInt KMaxBufferSize=256; + // Array used to hold test data to store in the hash objects + RPointerArray iPointerArray; + + for (i=0; iDes(); + TTestName number(NumberInWords(i)); + buf.Copy(number); + // Append "one" "two" "three" ..... + iPointerArray.AppendL(hbuf); + CleanupStack::Pop(hbuf); + } + + // Creates an object ptrHashMap using the template class RPtrHashMap + RPtrHashMap ptrHashMap; + // Push object on to the cleanup stack + CleanupClosePushL(ptrHashMap); + // Expand the array with the number of key-value pairs for which space should be allocated + ptrHashMap.ReserveL(count); + + // Insert a key-value pairs into the array + for (i=0; i