00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef TESTCFLEXTIMER_H
00025 #define TESTCFLEXTIMER_H
00026
00027 #include <e32base.h>
00028 #include "testflextimer.h"
00029 #include "inheritedcflextimer2.h"
00030
00031 class CTestFlexTimer;
00032
00033 class TTimerStruct
00034 {
00035 public:
00036 CInheritedCFlexTimer2 *iTimer;
00037 TExtendedTestResult *iEResult;
00038 TInt iTimersRunning;
00039 TInt iCurrentlyActive;
00040
00041
00042 CPeriodic *iStartTimer;
00043 TTimerStruct() :
00044 iTimer(0), iEResult(0), iTimersRunning(0), iCurrentlyActive(0),
00045 iStartTimer(0)
00046 {
00047 }
00048 ;
00049 };
00050
00059 NONSHARABLE_CLASS( CTestCFlexTimer ) : public CBase
00060 {
00061
00062 public:
00063
00067 virtual ~CTestCFlexTimer();
00068
00069
00070
00082 static TInt CreateAndDestroyCFlexTimerL( TTestResult& aResult,
00083 CTestFlexTimer *cb );
00084
00096 static TInt CreateAndExpireCFlexTimerL( TTestResult& aResult,
00097 CTestFlexTimer *cb );
00098
00112 static TInt CreateAndExpireTwoOverlappingAfterTimersL(
00113 TTestResult& aResult, CTestFlexTimer *cb );
00114
00128 static TInt CreateAndExpireTwoOverlappingAfterTimers64L(
00129 TTestResult& aResult, CTestFlexTimer *cb );
00130
00143 static TInt CreateAndExpireTwoNonOverlappingAfterTimersL(
00144 TTestResult& aResult, CTestFlexTimer *cb );
00145
00162 static TInt HugemongousAmountOfTimeridelidilidousL( TTestResult& aResult,
00163 CTestFlexTimer *cb );
00164
00180 static TInt CreateAndExpireThreeTimersL( TTestResult& aResult,
00181 CTestFlexTimer *cb );
00182
00183
00184
00197 static TInt NormalCancelL( TTestResult& aResult, CTestFlexTimer *cb );
00198
00212 static TInt CancelTimerThatWouldHaveTriggeredAnotherTimerL(
00213 TTestResult& aResult, CTestFlexTimer *cb );
00214
00215
00216
00231 static TInt ConfigureCTimerOverlap1L( TTestResult& aResult,
00232 CTestFlexTimer *cb );
00233
00249 static TInt ConfigureCTimerOverlap2L( TTestResult& aResult,
00250 CTestFlexTimer *cb );
00251
00267 static TInt ConfigureCTimerOverlap3L( TTestResult& aResult,
00268 CTestFlexTimer *cb );
00269
00285 static TInt ConfigureCTimerNonOverlap1L( TTestResult& aResult,
00286 CTestFlexTimer *cb );
00287
00304 static TInt ConfigureCTimerNonOverlap2L( TTestResult& aResult,
00305 CTestFlexTimer *cb );
00306
00307
00322 static TInt SystemTimeChangesL( TTestResult& aResult, CTestFlexTimer *cb );
00323
00338 static TInt TimeZoneChangesL( TTestResult& aResult, CTestFlexTimer *cb );
00339
00340
00354 static TInt DumbAssParametersForCTimerL( TTestResult& aResult,
00355 CTestFlexTimer *cb );
00356
00369 static TInt DumbAssParametersForCTimerZero32bitL( TTestResult& aResult,
00370 CTestFlexTimer *cb );
00371
00384 static TInt DumbAssParametersForCTimerZero64bitL( TTestResult& aResult,
00385 CTestFlexTimer *cb );
00386
00399 static TInt DumbAssParametersForCTimer64MaxL( TTestResult& aResult,
00400 CTestFlexTimer *cb );
00401
00414 static TInt DumbAssParametersForCTimer64ThreeYearsL( TTestResult& aResult,
00415 CTestFlexTimer *cb );
00416
00429 static TInt DumbAssParametersForCTimer64OneYearL( TTestResult& aResult,
00430 CTestFlexTimer *cb );
00431
00444 static TInt AfterWithNegativeValueL( TTestResult& aResult,
00445 CTestFlexTimer *cb );
00446
00459 static TInt AfterWithNegativeValue64L( TTestResult& aResult,
00460 CTestFlexTimer *cb );
00461
00473 static TInt AtWithCurrentTimeL( TTestResult& aResult,
00474 CTestFlexTimer *cb );
00475
00487 static TInt AtUTCWithCurrentTimeL( TTestResult& aResult,
00488 CTestFlexTimer *cb );
00500 static TInt AtWithThreeYearsL( TTestResult& aResult,
00501 CTestFlexTimer *cb );
00514 static TInt AtWithOneYearL( TTestResult& aResult,
00515 CTestFlexTimer *cb );
00516
00529 static TInt AtWithTimeInThePastL( TTestResult& aResult,
00530 CTestFlexTimer *cb );
00531
00546 static TInt
00547 CancelExpiredTimerL( TTestResult& aResult, CTestFlexTimer *cb );
00548
00549
00563 static TInt ConfigureLeftSideInThePastL( TTestResult& aResult,
00564 CTestFlexTimer *cb );
00565
00580 static TInt ConfigureLeftSideInThePastWindowCheckL( TTestResult& aResult,
00581 CTestFlexTimer *cb );
00582
00595 static TInt ConfigureWithNegativeWindowSize32L( TTestResult& aResult,
00596 CTestFlexTimer *cb );
00597
00610 static TInt ConfigureWithNegativeWindowSize64L( TTestResult& aResult,
00611 CTestFlexTimer *cb );
00612
00625 static TInt ConfigureWithMaxWindow32L( TTestResult& aResult,
00626 CTestFlexTimer *cb );
00627
00640 static TInt ConfigureWithThreeYearWindow64L( TTestResult& aResult,
00641 CTestFlexTimer *cb );
00642
00655 static TInt ConfigureWithMaxWindow64L( TTestResult& aResult,
00656 CTestFlexTimer *cb );
00657
00672 static TInt ConfigureWhileTimerIsInUseL( TTestResult& aResult,
00673 CTestFlexTimer *cb );
00674
00688 static TInt TimerIsStartedTwiceL( TTestResult& aResult,
00689 CTestFlexTimer *cb );
00690
00691
00692
00693
00694
00703 static TInt InheritedFlexTimerCallbackStopSchedulerKErrNone(
00704 TAny* aArgument );
00705
00714 static TInt InheritedFlexTimerCallbackStopSchedulerKErrCancel(
00715 TAny* aArgument );
00716
00725 static TInt InheritedFlexTimerCallbackStopSchedulerKErrAbort(
00726 TAny* aArgument );
00727
00736 static TInt InheritedFlexTimerCallbackKErrNone( TAny* aArgument );
00737
00746 static TInt InheritedFlexTimerCallbackKErrAbort( TAny* aArgument );
00747
00757 static TInt InheritedFlexTimerCallbackKErrNoneMarkTimestamp(
00758 TAny* aArgument );
00759
00769 static TInt InheritedFlexTimerCallbackKErrNoneMarkTimestampStopScheduler(
00770 TAny* aArgument );
00771
00780 static TInt StopActiveScheduler( TAny* aArgument );
00781
00790 static TInt ChangeSystemTime1sAndCancel( TAny* aArgument );
00791
00800 static TInt ChangeTimeZoneAndCancel( TAny* aArgument );
00801
00810 static TInt ChangeSecureTimeAndCancel( TAny* aArgument );
00811
00820 static TInt CancelCFlexTimer( TAny* aArgument );
00821
00830 static TInt StopSchedulerKErrNoneArray( TAny* aArgument );
00831
00840 static TInt CancelCFlexTimerCancelPeriodic( TAny* aArgument );
00849 static TInt CancelCFlexTimerArray( TAny* aArgument );
00858 static TInt CancelCFlexTimerAndStopActiveScheduler( TAny* aArgument );
00859
00868 static TInt StopSchedulerAndCancel( TAny* aArgument );
00869
00878 static TInt NotCalledCB( TAny* aArgument );
00888 static TInt CTestCFlexTimer::StartTimerAndAddToListCB( TAny* aArgument );
00897 static TInt StartTimerAndAddToList(
00898 RArray<TTimerStruct>* aArgument, TInt aTimers );
00899
00908 static TInt StopTimer( TAny* aArgument );
00917 static TInt ConfigureKErrInUseArray( TAny* aArgument );
00918
00927 static TInt StartTimerAgainArray( TAny* aArgument );
00928
00937 static TInt CTestCFlexTimer::CpuLoadCreateAndExpireTwoOverlappingAfterTimersL(
00938 TTestResult& aResult, CTestFlexTimer *cb );
00939
00948 static TInt CTestCFlexTimer::CpuLoadManyTimersL(
00949 TTestResult& aResult, CTestFlexTimer *cb );
00950 private:
00951
00955 CTestCFlexTimer();
00956
00957 };
00958
00959 #endif // TESTCFLEXTIMER_H