os/persistentdata/traceservices/commsdebugutility/TE_commsdebugutility/src/step_021_01.cpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     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 021.01
    15 
    16 // EPOC includes
    17 #include <e32base.h>
    18 
    19 // Test system includes
    20 #include "teststepcomsdbg.h"
    21 #include "step_021_01.h"
    22 
    23 
    24 #include <comms-infras/commsdebugutility.h>
    25 
    26 
    27 /**
    28 * Function  Name	: CFloggerTest021_01
    29 * Input parameters	: None
    30 * Output parameters : None
    31 * Description		: This is the constructor
    32 */
    33 
    34 
    35 CFloggerTest021_01::CFloggerTest021_01()
    36 	{
    37 	// store the name of this test case
    38 	SetTestStepName(_L("step_021_01"));
    39 	}
    40 
    41 
    42 /**
    43 * Function  Name	:~ CFloggerTest021_01
    44 * Input parameters	: None
    45 * Output parameters : None
    46 * Description		: This is the Destructor
    47 */ 
    48 
    49 
    50 CFloggerTest021_01::~CFloggerTest021_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 021_01 has 
    60 * 					  passed or failed
    61 
    62 */
    63 
    64 TVerdict CFloggerTest021_01::doTestStepL( )
    65 	{
    66 	INFO_PRINTF1(_L("Step 021.01 called "));
    67 		
    68 	RFileLogger theFlogger;
    69 	TPtrC8 ptrSubSystem;
    70 	TPtrC8 ptrComponent;
    71 	ptrSubSystem.Set(_L8("SubSystem")); //Test system name
    72 	ptrComponent.Set(_L8("Component")); //Test component name
    73 
    74 	theFlogger.Connect();
    75 	theFlogger.SetLogTags(ptrSubSystem, ptrComponent); //To set the tags 
    76 	
    77 	TBool res = theFlogger.LogValid();
    78 	if (res == 1)
    79 		SetTestStepResult(EPass);
    80 
    81 	else
    82 		SetTestStepResult(EFail);
    83 
    84 
    85 	theFlogger.Close();		
    86 	
    87 	return TestStepResult();
    88 	}
    89