os/persistentdata/traceservices/commsdebugutility/TE_commsdebugutility/src/step_022_01.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2003-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 // This contains Flogger Unit Test Case 022.01
    15 
    16 // EPOC includes
    17 #include <e32base.h>
    18 
    19 // Test system includes
    20 #include "teststepcomsdbg.h"
    21 #include "step_022_01.h"
    22 
    23 
    24 #include <comms-infras/commsdebugutility.h>
    25 
    26 
    27 /**
    28 * Function  Name	: CFloggerTest022_01
    29 * Input parameters	: None
    30 * Output parameters : None
    31 * Description		: This is the constructor
    32 */
    33 
    34 
    35 CFloggerTest022_01::CFloggerTest022_01()
    36 	{
    37 	// store the name of this test case
    38 	SetTestStepName(_L("step_022_01"));
    39 	}
    40 
    41 
    42 /**
    43 * Function  Name	:~ CFloggerTest022_01
    44 * Input parameters	: None
    45 * Output parameters : None
    46 * Description		: This is the Destructor
    47 */ 
    48 
    49 
    50 CFloggerTest022_01::~CFloggerTest022_01()
    51 	{
    52 	}
    53 
    54 
    55 /**
    56 * Function  Name	: doTestStepL
    57 * Input parameters	: None
    58 * Output parameters : TVerdict 
    59 * Description		: This function returns weather the test case 022_01 has 
    60 * 					  passed or failed
    61 
    62 */
    63 
    64 TVerdict CFloggerTest022_01::doTestStepL( )
    65 	{
    66 	INFO_PRINTF1(_L("Step 022.01 called "));
    67 
    68 	TPtrC8 ptrSubSystem;
    69 	TPtrC8 ptrComponent;
    70 	ptrSubSystem.Set(_L8("SubSystem")); //Test system name
    71 	ptrComponent.Set(_L8("Component")); //Test component name
    72 	
    73 	RFileLogger theFlogger;
    74 	theFlogger.Connect(); //Connect to the file server
    75 	theFlogger.SetLogTags(ptrSubSystem, ptrComponent); //To set the tags 
    76 	TRAPD(res, theFlogger.Close()); //Close the connection 		
    77 
    78 	if (res == KErrNone)
    79 		SetTestStepResult(EPass);
    80 
    81 	else
    82 		SetTestStepResult(EFail);
    83 
    84 	
    85 	return TestStepResult();
    86 	}
    87