testexecmdw/tef/tef/test/regressiontest/concurrenttest/src/te_regconcurrentteststepbase.cpp
branchRCL_3
changeset 3 9397a16b6eb8
parent 1 6edeef394eb7
equal deleted inserted replaced
1:6edeef394eb7 3:9397a16b6eb8
     1 /*
       
     2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  
       
    15 * Example CTestStep derived implementation
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 /**
       
    22  @file te_regconcurrentteststep1.cpp
       
    23  @internalTechnology
       
    24 */
       
    25 #include "te_regconcurrentteststepbase.h"
       
    26 #include "te_regconcurrenttestsuitedefs.h"
       
    27 
       
    28 CTe_RegConcurrentTestStepBase::~CTe_RegConcurrentTestStepBase()
       
    29 /**
       
    30  * Destructor
       
    31  */
       
    32 	{
       
    33 	
       
    34 	}
       
    35 
       
    36 CTe_RegConcurrentTestStepBase::CTe_RegConcurrentTestStepBase()
       
    37 /**
       
    38  * Constructor
       
    39  */
       
    40 	{
       
    41 	// **MUST** call SetTestStepName in the constructor as the controlling
       
    42 	// framework uses the test step name immediately following construction to set
       
    43 	// up the step's unique logging ID.
       
    44 	
       
    45 	}
       
    46 
       
    47 TVerdict CTe_RegConcurrentTestStepBase::doTestStepPreambleL()
       
    48 /**
       
    49  * @return - TVerdict code
       
    50  * Override of base class virtual
       
    51  */
       
    52 	{
       
    53 	SetTestStepResult(EPass);
       
    54 	PrintCurrentTimeStamp();
       
    55 	return TestStepResult();
       
    56 	}
       
    57 
       
    58 
       
    59 /*TVerdict CTe_RegConcurrentTestStepBase::doTestStepL()
       
    60 *
       
    61  * @return - TVerdict code
       
    62  * Override of base class pure virtual
       
    63  * Our implementation only gets called if the base class doTestStepPreambleL() did
       
    64  * not leave. That being the case, the current test result value will be EPass.
       
    65  
       
    66 	{
       
    67 	INFO_PRINTF1(_L("Running Test Step1..."));
       
    68 	return TestStepResult();
       
    69 	}*/
       
    70 
       
    71 
       
    72 
       
    73 TVerdict CTe_RegConcurrentTestStepBase::doTestStepPostambleL()
       
    74 /**
       
    75  * @return - TVerdict code
       
    76  * Override of base class virtual
       
    77  */
       
    78 	{
       
    79 	PrintCurrentTimeStamp(EFalse);
       
    80 	return TestStepResult();
       
    81 	}
       
    82 
       
    83 void CTe_RegConcurrentTestStepBase::PrintCurrentTimeStamp(TBool aStart)
       
    84 	{
       
    85 	TTime time;
       
    86 	time.UniversalTime();
       
    87 	TDateTime dateTime = time.DateTime();
       
    88 	TBuf<32> timeBuf;
       
    89 	timeBuf.Format(_L("%02d:%02d:%02d:%03d"), dateTime.Hour(), dateTime.Minute(), dateTime.Second(), dateTime.MicroSecond());
       
    90 	TBuf<16> buf(aStart?_L("started"):_L("ended"));
       
    91 	_LIT(KTimeFormat, "%S in server %S %S at %S");
       
    92 	INFO_PRINTF5(KTimeFormat, &ConfigSection(), &GetServerName(), &buf, &timeBuf);
       
    93 	}
       
    94