diff -r 5d03bc08d59c -r 01a6848ebfd7 graphicsresourceservices/graphicsresourceimplementation/test/src/tsggenericmanual.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/graphicsresourceservices/graphicsresourceimplementation/test/src/tsggenericmanual.cpp Fri Apr 16 16:21:04 2010 +0300 @@ -0,0 +1,132 @@ +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Tests for manual execution. + +/** + @file + @test + @internalComponent - Graphics Resource API Conformance Test Suite +*/ + +#include "tsggenericmanual.h" + +CTSgGenericManual::CTSgGenericManual(TBool aConformanceTests) : + CTSgTestStepBase(aConformanceTests) + { + INFO_PRINTF1(_L("Graphics resource component test - Generic Manual Tests.\r\n")); + } + +CTSgGenericManual::~CTSgGenericManual() + { + } + +/** +This is intented to be used for TestStressResourceLeakL (GRAPHICS-RESOURCE-0050) test. +It creates images until the memory full situation. The images are kept in the passed RArray of RSgImage. +The returned error code is expected to be either KErrNoMemory or KErrNoGraphicsMemory. +*/ +TInt CTSgGenericManual::CreateImages(const TSgImageInfo& aInfo, RArray& aTestImages) + { + TInt err = KErrNone; + while(err == KErrNone) + { + RSgImage image; + err = image.Create(aInfo); + if(err == KErrNone) + { + err = aTestImages.Append(image); + } + } + return err; + } + +void CTSgGenericManual::DestroyImages(RArray& aTestImages) + { + TInt count = aTestImages.Count(); + for(TInt i=0; i testImages; + + TInt count(0); + TInt err = KErrNone; + for(TInt i=0; i 0 && count != thisCount) + { + ERR_PRINTF4(_L("Mismatch @ iteration %d : Was %d, now %d"), i, count, thisCount); + } + count = thisCount; + } + + INFO_PRINTF2(_L("%d images created \r\n"), count); + TestCloseDriver(); + } +