dbgsrv/coredumpserver/test/automatictests/tcds_app/src/testformatterusersidestep.cpp
changeset 0 c6b0df440bee
equal deleted inserted replaced
-1:000000000000 0:c6b0df440bee
       
     1 // Copyright (c) 2005-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 // Example CTestStep derived implementation
       
    15 //
       
    16 
       
    17 
       
    18 
       
    19 /**
       
    20  @file SELFStep.cpp
       
    21  @internalTechnology
       
    22 */
       
    23 #include "testformatterusersidestep.h"
       
    24 #include "tcoredumpserversuitedefs.h"
       
    25 #include "tcoredumpserversuiteserver.h"
       
    26 #include "optionconfig.h"
       
    27 
       
    28 CTestFormatterUserSideStep::~CTestFormatterUserSideStep()
       
    29 /**
       
    30  * Destructor
       
    31  */
       
    32 	{
       
    33 	}
       
    34 
       
    35 CTestFormatterUserSideStep::CTestFormatterUserSideStep()
       
    36 /**
       
    37  * Constructor
       
    38  */
       
    39 	{
       
    40 	// **MUST** call SetTestStepName in the constructor as the controlling
       
    41 	// framework uses the test step name immediately following construction to set
       
    42 	// up the step's unique logging ID.
       
    43 	SetTestStepName(KTestFormatterUserSideStep);
       
    44 	}
       
    45 
       
    46 TVerdict CTestFormatterUserSideStep::doTestStepPreambleL()
       
    47 /**
       
    48  * @return - TVerdict code
       
    49  * Override of base class virtual
       
    50  */
       
    51 	{
       
    52 	   
       
    53 	TInt ret = KErrNone;
       
    54 	ret = iSess.Connect(); 
       
    55 	if(ret != KErrNone)
       
    56 		{
       
    57 		SetTestStepResult( EFail );
       
    58 		INFO_PRINTF2(_L("Error %d from iSess->Connect()/n"), ret);
       
    59 		}	
       
    60 	else
       
    61 		{
       
    62 		SetTestStepResult(EPass);
       
    63 		}
       
    64 
       
    65 	return TestStepResult();
       
    66 	}
       
    67 
       
    68 TVerdict CTestFormatterUserSideStep::doTestStepL()
       
    69 /**
       
    70  * @return - TVerdict code
       
    71  * Override of base class pure virtual
       
    72  * Our implementation only gets called if the base class doTestStepPreambleL() did
       
    73  * not leave. That being the case, the current test result value will be EPass.
       
    74  */
       
    75 	{
       
    76 	if (TestStepResult()==EPass)
       
    77 		{	
       
    78 		TInt ret = KErrNone;
       
    79 
       
    80 		__UHEAP_MARK;
       
    81 
       
    82 		TRAP(ret, ClientAppL());
       
    83 		if(KErrNone != ret)
       
    84 			{
       
    85 			SetTestStepResult(EFail);
       
    86 			INFO_PRINTF2(_L("Error %d from CTestFormatterUserSideStep->ClientAppL()"), ret);
       
    87 			}
       
    88 		
       
    89 		__UHEAP_MARKEND;
       
    90 
       
    91 		}
       
    92 	return TestStepResult();  
       
    93 	}
       
    94 
       
    95 void CTestFormatterUserSideStep::ClientAppL()
       
    96 /**
       
    97  * @return void
       
    98  * This calls each stage of the test
       
    99  */
       
   100 	{
       
   101 	INFO_PRINTF1(_L("Starting TestFormatterUserSide Plugin Test Suite") );
       
   102 
       
   103 	}
       
   104 
       
   105 TVerdict CTestFormatterUserSideStep::doTestStepPostambleL()
       
   106 /**
       
   107  * @return - TVerdict code
       
   108  * Override of base class virtual
       
   109  */
       
   110 	{
       
   111 	iSess.Disconnect();
       
   112 	return EPass;	
       
   113 	}
       
   114