os/ossrv/genericopenlibs/posixrealtimeextensions/test/testtimer/src/ttimer.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/genericopenlibs/posixrealtimeextensions/test/testtimer/src/ttimer.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,224 @@
     1.4 +// Copyright (c) 2008-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 +// Name        : ttimer.cpp
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +#include "ttimer.h"
    1.22 +
    1.23 +
    1.24 +
    1.25 +CTesttimer::~CTesttimer() 
    1.26 +	{ 
    1.27 +	}  
    1.28 +
    1.29 +CTesttimer::CTesttimer(const TDesC& aStepName)
    1.30 +	{
    1.31 +	// MANDATORY Call to base class method to set up the human readable name for logging.
    1.32 +	SetTestStepName(aStepName);		
    1.33 +	}
    1.34 +
    1.35 +TVerdict CTesttimer::doTestStepPreambleL()
    1.36 +	{
    1.37 +	__UHEAP_MARK;
    1.38 +	SetTestStepResult(EPass);
    1.39 +	return TestStepResult();
    1.40 +	}
    1.41 +
    1.42 +
    1.43 +
    1.44 +TVerdict CTesttimer::doTestStepPostambleL()
    1.45 +	{
    1.46 +	__UHEAP_MARKEND;	
    1.47 +	iParamCnt=0;
    1.48 +	return TestStepResult();
    1.49 +	}
    1.50 +
    1.51 +
    1.52 +TVerdict CTesttimer::doTestStepL()
    1.53 +	{
    1.54 +	int err;
    1.55 +	if(TestStepName() == KTesttimerapi1)
    1.56 +   		{
    1.57 +   	   	INFO_PRINTF1(_L("Testtimerapi1():"));
    1.58 +   	   	err = Testtimerapi1();
    1.59 +   	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
    1.60 +   	   	}   	
    1.61 +	if(TestStepName() == KTesttimerapi2)
    1.62 +   		{
    1.63 +   	   	INFO_PRINTF1(_L("Testtimerapi2():"));
    1.64 +   	   	err = Testtimerapi2();
    1.65 +   	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
    1.66 +   	   	}     	
    1.67 +	if(TestStepName() == KTesttimerapi3)
    1.68 +   		{
    1.69 +   	   	INFO_PRINTF1(_L("Testtimerapi3():"));
    1.70 +   	   	err = Testtimerapi3();
    1.71 +   	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
    1.72 +   	   	}     	
    1.73 +	if(TestStepName() == KTesttimerapi4)
    1.74 +   		{
    1.75 +   	   	INFO_PRINTF1(_L("Testtimerapi4():"));
    1.76 +   	   	err = Testtimerapi4();
    1.77 +   	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
    1.78 +   	   	}      	
    1.79 +	if(TestStepName() == KTesttimerapi5)
    1.80 +   		{
    1.81 +   	   	INFO_PRINTF1(_L("Testtimerapi5():"));
    1.82 +   	   	err = Testtimerapi5();
    1.83 +   	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
    1.84 +   	   	}      	
    1.85 +	if(TestStepName() == KTesttimerapi6)
    1.86 +   		{
    1.87 +   	   	INFO_PRINTF1(_L("Testtimerapi6():"));
    1.88 +   	   	err = Testtimerapi6();
    1.89 +   	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
    1.90 +   	   	}      	
    1.91 +	if(TestStepName() == KTesttimerapi7)
    1.92 +   		{
    1.93 +   	   	INFO_PRINTF1(_L("Testtimerapi7():"));
    1.94 +   	   	err = Testtimerapi7();
    1.95 +   	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
    1.96 +   	   	}       	
    1.97 +	if(TestStepName() == KTesttimerapi8)
    1.98 +   		{
    1.99 +   	   	INFO_PRINTF1(_L("Testtimerapi8():"));
   1.100 +   	   	err = Testtimerapi8();
   1.101 +   	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   1.102 +   	   	}      	
   1.103 +	if(TestStepName() == KTesttimerapi9)
   1.104 +   		{
   1.105 +   	   	INFO_PRINTF1(_L("Testtimerapi9():"));
   1.106 +   	   	err = Testtimerapi9();
   1.107 +   	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   1.108 +   	   	}      	
   1.109 +	if(TestStepName() == KTesttimerapi10)
   1.110 +   		{
   1.111 +   	   	INFO_PRINTF1(_L("Testtimerapi10():"));
   1.112 +   	   	err = Testtimerapi10();
   1.113 +   	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   1.114 +   	   	}      	
   1.115 +	if(TestStepName() == KTesttimerapi11)
   1.116 +   		{
   1.117 +   	   	INFO_PRINTF1(_L("Testtimerapi11():"));
   1.118 +   	   	err = Testtimerapi11();
   1.119 +   	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   1.120 +   	   	}      	
   1.121 +	if(TestStepName() == KTesttimerapi12)
   1.122 +   		{
   1.123 +   	   	INFO_PRINTF1(_L("Testtimerapi12():"));
   1.124 +   	   	err = Testtimerapi12();
   1.125 +   	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   1.126 +   	   	}      	
   1.127 +	if(TestStepName() == KTesttimerapi13)
   1.128 +   		{
   1.129 +   	   	INFO_PRINTF1(_L("Testtimerapi13():"));
   1.130 +   	   	err = Testtimerapi13();
   1.131 +   	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   1.132 +   	   	}      	
   1.133 +	if(TestStepName() == KTesttimerapi14)
   1.134 +   		{
   1.135 +   	   	INFO_PRINTF1(_L("Testtimerapi14():"));
   1.136 +   	   	err = Testtimerapi14();
   1.137 +   	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   1.138 +   	   	}       	
   1.139 +	if(TestStepName() == KTesttimerapi15)
   1.140 +   		{
   1.141 +   	   	INFO_PRINTF1(_L("Testtimerapi15():"));
   1.142 +   	   	err = Testtimerapi15();
   1.143 +   	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   1.144 +   	   	}       	
   1.145 +	if(TestStepName() == KTesttimerapi16)
   1.146 +   		{
   1.147 +   	   	INFO_PRINTF1(_L("Testtimerapi16():"));
   1.148 +   	   	err = Testtimerapi16();
   1.149 +   	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   1.150 +   	   	}       	
   1.151 +	if(TestStepName() == KTesttimerapi17)
   1.152 +   		{
   1.153 +   	   	INFO_PRINTF1(_L("Testtimerapi17():"));
   1.154 +   	   	err = Testtimerapi17();
   1.155 +   	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   1.156 +   	   	}       	
   1.157 +	if(TestStepName() == KTesttimerapi18)
   1.158 +   		{
   1.159 +   	   	INFO_PRINTF1(_L("Testtimerapi18():"));
   1.160 +   	   	err = Testtimerapi18();
   1.161 +   	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   1.162 +   	   	}        	
   1.163 +	if(TestStepName() == KTesttimerapi19)
   1.164 +   		{
   1.165 +   	   	INFO_PRINTF1(_L("Testtimerapi19():"));
   1.166 +   	   	err = Testtimerapi19();
   1.167 +   	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   1.168 +   	   	}        	
   1.169 +	if(TestStepName() == KTesttimerapi20)
   1.170 +   		{
   1.171 +   	   	INFO_PRINTF1(_L("Testtimerapi20():"));
   1.172 +   	   	err = Testtimerapi20();
   1.173 +   	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   1.174 +   	   	}        	
   1.175 +	if(TestStepName() == KTesttimerapi21)
   1.176 +   		{
   1.177 +   	   	INFO_PRINTF1(_L("Testtimerapi21():"));
   1.178 +   	   	err = Testtimerapi21();
   1.179 +   	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   1.180 +   	   	}        	
   1.181 +	if(TestStepName() == KTesttimerapi22)
   1.182 +   		{
   1.183 +   	   	INFO_PRINTF1(_L("Testtimerapi22():"));
   1.184 +   	   	err = Testtimerapi22();
   1.185 +   	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   1.186 +   	   	}        	
   1.187 +	if(TestStepName() == KTesttimerapi23)
   1.188 +   		{
   1.189 +   	   	INFO_PRINTF1(_L("Testtimerapi23():"));
   1.190 +   	   	err = Testtimerapi23();
   1.191 +   	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   1.192 +   	   	}         	
   1.193 +	if(TestStepName() == KTesttimerapi24)
   1.194 +   		{
   1.195 +   	   	INFO_PRINTF1(_L("Testtimerapi24():"));
   1.196 +   	   	err = Testtimerapi24();
   1.197 +   	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   1.198 +   	   	}           	
   1.199 +	if(TestStepName() == KTesttimerapi25)
   1.200 +   		{
   1.201 +   	   	INFO_PRINTF1(_L("Testtimerapi25():"));
   1.202 +   	   	err = Testtimerapi25();
   1.203 +   	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   1.204 +   	   	}          	
   1.205 +	if(TestStepName() == KTesttimerapi26)
   1.206 +   		{
   1.207 +   	   	INFO_PRINTF1(_L("Testtimerapi26():"));
   1.208 +   	   	err = Testtimerapi26();
   1.209 +   	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   1.210 +   	   	}           	
   1.211 +	if(TestStepName() == KTesttimerapi27)
   1.212 +   		{
   1.213 +   	   	INFO_PRINTF1(_L("Testtimerapi27():"));
   1.214 +   	   	err = Testtimerapi27();
   1.215 +   	   	SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   1.216 +   	   	}
   1.217 +    if(TestStepName() == KTesttimerapi28)
   1.218 +        {
   1.219 +        INFO_PRINTF1(_L("Testtimerapi28():"));
   1.220 +        err = Testtimerapi28();
   1.221 +        SetTestStepResult(err ? static_cast<TVerdict>(err) : EPass);
   1.222 +        } 
   1.223 +	
   1.224 +		return TestStepResult();
   1.225 +	}
   1.226 + 
   1.227 +