appfw/apparchitecture/tef/T_ExeStep.CPP
changeset 0 2e3d3ce01487
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     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 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @internalComponent - Internal Symbian test code 
       
    19 */
       
    20 
       
    21 #include <e32std.h>
       
    22 #include <e32uid.h>
       
    23 #include <e32base.h>
       
    24 #include <e32test.h>
       
    25 #include <apadef.h>
       
    26 #include "T_ExeStep.h"
       
    27 
       
    28 /**
       
    29   Auxiliary Fn for Test Case ID T-ExeStep-doTestStepL
       
    30  
       
    31   This function accepts the data passed to the thread function and prints it.
       
    32   
       
    33 */
       
    34 void CT_ExeStep::DoThings(const TApaCommandLine& aCommandLine)
       
    35 	{
       
    36 	INFO_PRINTF1(_L("The test exe has been loaded."));
       
    37 	INFO_PRINTF1(_L("\n"));
       
    38 	INFO_PRINTF1(aCommandLine);
       
    39 	INFO_PRINTF1(_L("\n"));
       
    40 	}
       
    41 
       
    42 CT_ExeStep::~CT_ExeStep()
       
    43 /**
       
    44    Destructor
       
    45  */
       
    46 	{
       
    47 	}
       
    48 
       
    49 CT_ExeStep::CT_ExeStep()
       
    50 /**
       
    51    Constructor
       
    52  */
       
    53 	{
       
    54 	// Call base class method to set up the human readable name for logging
       
    55 	SetTestStepName(KT_ExeStep);
       
    56 	}
       
    57 
       
    58 TVerdict CT_ExeStep::doTestStepPreambleL()
       
    59 /**
       
    60    @return - TVerdict code
       
    61    Override of base class virtual
       
    62  */
       
    63 	{
       
    64 	SetTestStepResult(EPass);
       
    65 	return TestStepResult();
       
    66 	}
       
    67 
       
    68 TVerdict CT_ExeStep::doTestStepPostambleL()
       
    69 /**
       
    70    @return - TVerdict code
       
    71    Override of base class virtual
       
    72  */
       
    73 	{
       
    74 	return TestStepResult();
       
    75 	}
       
    76 	
       
    77 	
       
    78 /**
       
    79    @SYMTestCaseID T-ExeStep-doTestStepL
       
    80   
       
    81    @SYMPREQ
       
    82   
       
    83    @SYMTestCaseDesc Test retrieving data from main thread of a process. 
       
    84    
       
    85    @SYMTestPriority High 
       
    86   
       
    87    @SYMTestStatus Implemented
       
    88    
       
    89    @SYMTestActions The test creates a new process by calling the constructor of
       
    90    RProcess. Call RProcess::CommandLine() to get a copy of data which is
       
    91    passed to the thread function of the newly created process's main thread.
       
    92    Pass the data thus copied to method DoThings() to print the information.\n
       
    93    API Calls:\n	
       
    94    RProcess::CommandLine(TDes& aCommand) const
       
    95    
       
    96    @SYMTestExpectedResults Test should create a new process and copy data from
       
    97    main thread of newly created process.
       
    98     
       
    99  */
       
   100 TVerdict CT_ExeStep::doTestStepL()
       
   101 {
       
   102 	__UHEAP_MARK;
       
   103     TApaCommandLine commandline;
       
   104 	User::CommandLine(commandline);
       
   105     DoThings(commandline);
       
   106 	__UHEAP_MARKEND;
       
   107 
       
   108 	return TestStepResult();
       
   109 }
       
   110