commsfwutils/commsbufs/TE_mbufmgr/src/Test01CreateDeleteMBufMgr.cpp
changeset 72 ae47d0499bee
equal deleted inserted replaced
68:5da8188e392b 72:ae47d0499bee
       
     1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Contains MBufMgr Test Step 01 to Create & destroy RMBufManager
       
    15 // 
       
    16 //
       
    17 
       
    18 // EPOC includes
       
    19 #include <e32base.h>
       
    20 
       
    21 // Test system includes
       
    22 //#ifdef SYMBIAN_OLD_EXPORT_LOCATION
       
    23 //#include "networking/log.h"
       
    24 //#include "networking/teststep.h"
       
    25 //#else
       
    26 //#include <networking/log.h>
       
    27 //#include <networking/teststep.h>
       
    28 //#endif
       
    29 #include "TestStepCTMbufmgr.h"
       
    30 
       
    31 #include "Test01CreateDeleteMBufMgr.h"
       
    32 #include <comms-infras/commsbufpond.h>
       
    33 
       
    34 // constructor
       
    35 CTest01CreateDeleteMBufMgr::CTest01CreateDeleteMBufMgr()
       
    36 	{
       
    37 	SetTestStepName(_L("MBufMgrTest01"));// Store the name of this test case
       
    38 	}
       
    39 
       
    40 // destructor
       
    41 CTest01CreateDeleteMBufMgr::~CTest01CreateDeleteMBufMgr() 
       
    42 	{
       
    43 	}
       
    44 
       
    45 // 
       
    46 enum TVerdict CTest01CreateDeleteMBufMgr::doTestStepL(void)
       
    47 	{
       
    48 	SetTestStepResult(EFail);
       
    49 	//-------------- substep 1 -------------------- 
       
    50 	INFO_PRINTF1(_L("  01 Create CMBufManager and install active scheduler: blh blah blha"));
       
    51     CleanupStack::PushL( iActSch = new(ELeave) CActiveScheduler );
       
    52 	CActiveScheduler::Install(iActSch);
       
    53 	CreateInstanceMBufMgrL(KMBufDefaultHeapSize);
       
    54 
       
    55 	//-------------- substep 2 -------------------- 
       
    56 	INFO_PRINTF1(_L("  02 Clean up stack:"));
       
    57     iBufPond.Close();
       
    58 	CActiveScheduler::Install(NULL);
       
    59 	CleanupStack::PopAndDestroy(iActSch);
       
    60 
       
    61         SetTestStepResult(EPass);
       
    62 
       
    63 	return TestStepResult();
       
    64 	}
       
    65