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