os/persistentdata/traceservices/commsdebugutility/TE_commsdebugutility/src/step_022_01.cpp
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/persistentdata/traceservices/commsdebugutility/TE_commsdebugutility/src/step_022_01.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,87 @@
1.4 +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// This contains Flogger Unit Test Case 022.01
1.18 +
1.19 +// EPOC includes
1.20 +#include <e32base.h>
1.21 +
1.22 +// Test system includes
1.23 +#include "teststepcomsdbg.h"
1.24 +#include "step_022_01.h"
1.25 +
1.26 +
1.27 +#include <comms-infras/commsdebugutility.h>
1.28 +
1.29 +
1.30 +/**
1.31 +* Function Name : CFloggerTest022_01
1.32 +* Input parameters : None
1.33 +* Output parameters : None
1.34 +* Description : This is the constructor
1.35 +*/
1.36 +
1.37 +
1.38 +CFloggerTest022_01::CFloggerTest022_01()
1.39 + {
1.40 + // store the name of this test case
1.41 + SetTestStepName(_L("step_022_01"));
1.42 + }
1.43 +
1.44 +
1.45 +/**
1.46 +* Function Name :~ CFloggerTest022_01
1.47 +* Input parameters : None
1.48 +* Output parameters : None
1.49 +* Description : This is the Destructor
1.50 +*/
1.51 +
1.52 +
1.53 +CFloggerTest022_01::~CFloggerTest022_01()
1.54 + {
1.55 + }
1.56 +
1.57 +
1.58 +/**
1.59 +* Function Name : doTestStepL
1.60 +* Input parameters : None
1.61 +* Output parameters : TVerdict
1.62 +* Description : This function returns weather the test case 022_01 has
1.63 +* passed or failed
1.64 +
1.65 +*/
1.66 +
1.67 +TVerdict CFloggerTest022_01::doTestStepL( )
1.68 + {
1.69 + INFO_PRINTF1(_L("Step 022.01 called "));
1.70 +
1.71 + TPtrC8 ptrSubSystem;
1.72 + TPtrC8 ptrComponent;
1.73 + ptrSubSystem.Set(_L8("SubSystem")); //Test system name
1.74 + ptrComponent.Set(_L8("Component")); //Test component name
1.75 +
1.76 + RFileLogger theFlogger;
1.77 + theFlogger.Connect(); //Connect to the file server
1.78 + theFlogger.SetLogTags(ptrSubSystem, ptrComponent); //To set the tags
1.79 + TRAPD(res, theFlogger.Close()); //Close the connection
1.80 +
1.81 + if (res == KErrNone)
1.82 + SetTestStepResult(EPass);
1.83 +
1.84 + else
1.85 + SetTestStepResult(EFail);
1.86 +
1.87 +
1.88 + return TestStepResult();
1.89 + }
1.90 +