sl@0: // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: /** sl@0: @file UloggerServerTest5Step.cpp sl@0: @internalTechnology sl@0: */ sl@0: #include "uloggerservertest5step.h" sl@0: #include "te_uloggerservertestsuitedefs.h" sl@0: #include "uloggerdatatypes.h" sl@0: sl@0: namespace Ulogger sl@0: { sl@0: sl@0: CUloggerServerTest5Step::~CUloggerServerTest5Step() sl@0: /** sl@0: * Destructor sl@0: */ sl@0: { sl@0: sl@0: } sl@0: sl@0: CUloggerServerTest5Step::CUloggerServerTest5Step() sl@0: /** sl@0: * Constructor sl@0: */ sl@0: { sl@0: SetTestStepName(KUloggerServerTest5Step); sl@0: } sl@0: sl@0: TVerdict CUloggerServerTest5Step::doTestStepPreambleL() sl@0: /** sl@0: * @return - TVerdict code sl@0: * Override of base class virtual sl@0: */ sl@0: { sl@0: INFO_PRINTF1(_L("****This is unit test for CUloggerChannelSettings class****")); sl@0: iScheduler = new (ELeave) CActiveScheduler(); sl@0: CActiveScheduler::Install(iScheduler); sl@0: sl@0: sl@0: SetTestStepResult(EPass); sl@0: return TestStepResult(); sl@0: } sl@0: sl@0: sl@0: TVerdict CUloggerServerTest5Step::doTestStepL() sl@0: /** sl@0: * @return - TVerdict code sl@0: * Override of base class pure virtual sl@0: * Our implementation only gets called if the base class doTestStepPreambleL() did sl@0: * not leave. That being the case, the current test result value will be EPass. sl@0: */ sl@0: { sl@0: iErrors = 0; sl@0: if (TestStepResult()==EPass) sl@0: { sl@0: iErrors += Test1L(); //CControlFramework::StartReading + StopReading sl@0: sl@0: //display results sl@0: TBuf<128> res; sl@0: res.AppendFormat(_L("%d errors"), iErrors); sl@0: INFO_PRINTF1(_L("****Results****")); sl@0: INFO_PRINTF1(res); sl@0: if(iErrors == 0) sl@0: SetTestStepResult(EPass); sl@0: else sl@0: SetTestStepResult(EFail); sl@0: } sl@0: sl@0: return TestStepResult(); sl@0: } sl@0: sl@0: sl@0: sl@0: TVerdict CUloggerServerTest5Step::doTestStepPostambleL() sl@0: /** sl@0: * @return - TVerdict code sl@0: * Override of base class virtual sl@0: */ sl@0: { sl@0: delete iScheduler; sl@0: iScheduler = NULL; sl@0: sl@0: return TestStepResult(); sl@0: } sl@0: sl@0: sl@0: sl@0: sl@0: TInt CUloggerServerTest5Step::Test1L() sl@0: { sl@0: TInt errors = 0; sl@0: sl@0: return errors; sl@0: } sl@0: sl@0: }