Static Public Member Functions | |
static TInt | StartOneTimerL (TTestResult &aResult, CTestFlexTimer *aCallback) |
Create and expire CFlexPeriodic timer. | |
static TInt | CallbackRestartL (TTestResult &aResult, CTestFlexTimer *aCallback) |
Restart CFlexPeriodic in callback function. | |
static TInt | ConfigureWindow32L (TTestResult &aResult, CTestFlexTimer *aCallback) |
Configure window sizes, 32 bit. | |
static TInt | ConfigureWindow64L (TTestResult &aResult, CTestFlexTimer *aCallback) |
Configure window sizes, 64 bit. | |
static TInt | ConfigureWindowMixL (TTestResult &aResult, CTestFlexTimer *aCallback) |
Configure window sizes, 32 bit and 64 bit. | |
static TInt | ConfigureAfterStartL (TTestResult &aResult, CTestFlexTimer *aCallback) |
Configure timer after it has been started. | |
static TInt | StartAfterStartL (TTestResult &aResult, CTestFlexTimer *aCallback) |
Start a running timer. | |
static TInt | StartInCallbackL (TTestResult &aResult, CTestFlexTimer *aCallback) |
Start a running timer in its callback function. | |
static TInt | StartWithNegativeDelay32L (TTestResult &aResult, CTestFlexTimer *aCallback) |
static TInt | StartWithZeroInterval32L (TTestResult &aResult, CTestFlexTimer *aCallback) |
Start timer with zero interval (32 bit). | |
static TInt | StartWithNegativeInterval32L (TTestResult &aResult, CTestFlexTimer *aCallback) |
Start timer with negative interval (32 bit). | |
static TInt | StartWithNegativeDelay64L (TTestResult &aResult, CTestFlexTimer *aCallback) |
Start timer with negative delay (64 bit). | |
static TInt | StartWithZeroInterval64L (TTestResult &aResult, CTestFlexTimer *aCallback) |
Start timer with zero interval (64 bit). | |
static TInt | StartWithNegativeInterval64L (TTestResult &aResult, CTestFlexTimer *aCallback) |
Start timer with negative interval (64 bit). | |
static TInt | ConfigureWithNegativeDelayWindow32L (TTestResult &aResult, CTestFlexTimer *aCallback) |
Configure timer with negative delay window (32 bit). | |
static TInt | ConfigureWithNegativeIntervalWindow32L (TTestResult &aResult, CTestFlexTimer *aCallback) |
Configure timer with negative interval window (32 bit). | |
static TInt | ConfigureWithNegativeDelayWindow64L (TTestResult &aResult, CTestFlexTimer *aCallback) |
Configure timer with negative delay window (64 bit). | |
static TInt | ConfigureWithNegativeIntervalWindow64L (TTestResult &aResult, CTestFlexTimer *aCallback) |
Configure timer with negative interval window (64 bit). | |
static TInt | StartWithMinAndMaxL (TTestResult &aResult, CTestFlexTimer *aCallback) |
Test timer start allowed value range. | |
static TInt | StartWithMaximumDelay64L (TTestResult &aResult, CTestFlexTimer *aCallback) |
Start timer with maximum delay (64 bit), 0x7FFFFFFFFFFFFFFF. | |
static TInt | StartWithMaximumInterval64L (TTestResult &aResult, CTestFlexTimer *aCallback) |
Start timer with maximum interval (64 bit), 0x7FFFFFFFFFFFFFFF. | |
static TInt | StartWithNullCallBack32L (TTestResult &aResult, CTestFlexTimer *aCallback) |
Start timer with NULL callback function (32 bit). | |
static TInt | StartWithNullCallBack64L (TTestResult &aResult, CTestFlexTimer *aCallback) |
Start timer with NULL callback function (64 bit). | |
static TInt | ClientCrashL (TTestResult &aResult, CTestFlexTimer *aCallback) |
Crash client with active periodic flexible timer. |
STIF test cases for CFlexPeriodic class. This class is only a container for STIF test cases - it should NOT be instantiated, just call the static functions.
testflextimer.lib
static TInt CTestFlexPeriodic::CallbackRestartL | ( | TTestResult & | aResult, | |
CTestFlexTimer * | aCallback | |||
) | [static] |
Restart CFlexPeriodic in callback function.
Start a periodic timer with 1 sec delay and interval.
After 2 expiration cancel and start the timer in its callback function with 2 secs delay and interval.
Timer expiration times (sec): 1, 2, 4, 6, 8, ...
Tests:
aResult | The result of the test. | |
aCallback | Pointer to the STIF test class |
static TInt CTestFlexPeriodic::ClientCrashL | ( | TTestResult & | aResult, | |
CTestFlexTimer * | aCallback | |||
) | [static] |
Crash client with active periodic flexible timer.
Start two timers in separate threads: T1: delay 1 sec, interval 1 sec with default windows T2: delay 1 sec, interval 1 sec with default windows
Panic timer T1's thread after 3 sec.
Cancel T2 after 5 sec and check that it had worked correctly. Implementation of T2 uses test case StartOneTimerL().
aResult | The result of the test. | |
aCallback | Pointer to the STIF test class |
static TInt CTestFlexPeriodic::ConfigureAfterStartL | ( | TTestResult & | aResult, | |
CTestFlexTimer * | aCallback | |||
) | [static] |
Configure timer after it has been started.
Start two timers: T1:
T2:
Try to configure T2 with 1.5 sec delay and interval windows by both 32 bit and 64 bit Configure(). Check that configure returns KErrInUse and it has not changed the window sizes. The timer expirations should be T1: 1, 2, 3, 4, 5, 6, 7, 8, ... T2: 2, 4, 6, 8, ...
Cancel the timer T2 and set its callback function to call Configure() (32 bit and 64 bit versions) while the timer is running. Check that both configurations return KErrInUse
Cancel timer T2 and configure its delay and interval windows to 1.5 sec. Let the timer(s) run a while and check that the timer expirations are: T1: ..., 10, 11, 12, 13, ... T2: ..., 10, 11, 12, 13, ...
aResult | The result of the test. | |
aCallback | Pointer to the STIF test class |
static TInt CTestFlexPeriodic::ConfigureWindow32L | ( | TTestResult & | aResult, | |
CTestFlexTimer * | aCallback | |||
) | [static] |
Configure window sizes, 32 bit.
Start 2 timers: T1:
Both timers shoud expire at (sec) 3.0, 4.0, 5.0, 6.0, ...
Functionality of delay window is tested in sec 3.0 expiration and functionality of interval window is tested in other expirations.
Tests:
aResult | The result of the test. | |
aCallback | Pointer to the STIF test class |
static TInt CTestFlexPeriodic::ConfigureWindow64L | ( | TTestResult & | aResult, | |
CTestFlexTimer * | aCallback | |||
) | [static] |
Configure window sizes, 64 bit.
Tests:
aResult | The result of the test. | |
aCallback | Pointer to the STIF test class |
static TInt CTestFlexPeriodic::ConfigureWindowMixL | ( | TTestResult & | aResult, | |
CTestFlexTimer * | aCallback | |||
) | [static] |
Configure window sizes, 32 bit and 64 bit.
Tests:
aResult | The result of the test. | |
aCallback | Pointer to the STIF test class |
static TInt CTestFlexPeriodic::ConfigureWithNegativeDelayWindow32L | ( | TTestResult & | aResult, | |
CTestFlexTimer * | aCallback | |||
) | [static] |
Configure timer with negative delay window (32 bit).
Configure should panic with CFlexPeriodic 9 (EFlexPeriodicIntervalWindowLessThanZero)
aResult | The result of the test. | |
aCallback | Pointer to the STIF test class |
static TInt CTestFlexPeriodic::ConfigureWithNegativeDelayWindow64L | ( | TTestResult & | aResult, | |
CTestFlexTimer * | aCallback | |||
) | [static] |
Configure timer with negative delay window (64 bit).
Configure should panic with CFlexPeriodic 9 (EFlexPeriodicIntervalWindowLessThanZero)
aResult | The result of the test. | |
aCallback | Pointer to the STIF test class |
static TInt CTestFlexPeriodic::ConfigureWithNegativeIntervalWindow32L | ( | TTestResult & | aResult, | |
CTestFlexTimer * | aCallback | |||
) | [static] |
Configure timer with negative interval window (32 bit).
Configure should panic with CFlexPeriodic 8 (EFlexPeriodicDelayWindowLessThanZero)
aResult | The result of the test. | |
aCallback | Pointer to the STIF test class |
static TInt CTestFlexPeriodic::ConfigureWithNegativeIntervalWindow64L | ( | TTestResult & | aResult, | |
CTestFlexTimer * | aCallback | |||
) | [static] |
Configure timer with negative interval window (64 bit).
Configure should panic with CFlexPeriodic 8 (EFlexPeriodicDelayWindowLessThanZero)
aResult | The result of the test. | |
aCallback | Pointer to the STIF test class |
static TInt CTestFlexPeriodic::StartAfterStartL | ( | TTestResult & | aResult, | |
CTestFlexTimer * | aCallback | |||
) | [static] |
Start a running timer.
Test should panic with E32USER-CBase 42 (attempt to active CActive when a request is still outstanding).
aResult | The result of the test. | |
aCallback | Pointer to the STIF test class |
static TInt CTestFlexPeriodic::StartInCallbackL | ( | TTestResult & | aResult, | |
CTestFlexTimer * | aCallback | |||
) | [static] |
Start a running timer in its callback function.
Test should panic with E32USER-CBase 42 (attempt to active CActive when a request is still outstanding).
aResult | The result of the test. | |
aCallback | Pointer to the STIF test class |
static TInt CTestFlexPeriodic::StartOneTimerL | ( | TTestResult & | aResult, | |
CTestFlexTimer * | aCallback | |||
) | [static] |
Create and expire CFlexPeriodic timer.
Create and start one CFlexPeriodic timer with 1 sec delay and interval wait for 5 secs. Check that the timer has been expired at correct times.
Timer expiration times (sec): 1, 2, 3, 4, ...
Tests:
aResult | The result of the test. | |
aCallback | Pointer to the STIF test class |
static TInt CTestFlexPeriodic::StartWithMaximumDelay64L | ( | TTestResult & | aResult, | |
CTestFlexTimer * | aCallback | |||
) | [static] |
Start timer with maximum delay (64 bit), 0x7FFFFFFFFFFFFFFF.
Start should panic with CFlexPeriodic 24 (EFlexTimerServerIllegalTimerValue)
aResult | The result of the test. | |
aCallback | Pointer to the STIF test class |
static TInt CTestFlexPeriodic::StartWithMaximumInterval64L | ( | TTestResult & | aResult, | |
CTestFlexTimer * | aCallback | |||
) | [static] |
Start timer with maximum interval (64 bit), 0x7FFFFFFFFFFFFFFF.
Start should panic with CFlexPeriodic 24 (EFlexTimerServerIllegalTimerValue)
aResult | The result of the test. | |
aCallback | Pointer to the STIF test class |
static TInt CTestFlexPeriodic::StartWithMinAndMaxL | ( | TTestResult & | aResult, | |
CTestFlexTimer * | aCallback | |||
) | [static] |
Test timer start allowed value range.
Start timers with following parameters:
T1:
T2:
T3:
T4:
T5:
T6:
T7:
T8:
aResult | The result of the test. | |
aCallback | Pointer to the STIF test class |
static TInt CTestFlexPeriodic::StartWithNegativeDelay32L | ( | TTestResult & | aResult, | |
CTestFlexTimer * | aCallback | |||
) | [static] |
Start timer with negative delay (32 bit).
Start should panic with CFlexPeriodic 6 (EFlexPeriodicDelayLessThanZero)
aResult | The result of the test. | |
aCallback | Pointer to the STIF test class |
static TInt CTestFlexPeriodic::StartWithNegativeDelay64L | ( | TTestResult & | aResult, | |
CTestFlexTimer * | aCallback | |||
) | [static] |
Start timer with negative delay (64 bit).
Start should panic with CFlexPeriodic 6 (EFlexPeriodicDelayLessThanZero)
aResult | The result of the test. | |
aCallback | Pointer to the STIF test class |
static TInt CTestFlexPeriodic::StartWithNegativeInterval32L | ( | TTestResult & | aResult, | |
CTestFlexTimer * | aCallback | |||
) | [static] |
Start timer with negative interval (32 bit).
Start should panic with CFlexPeriodic 7 (EFlexPeriodicIntervalTooSmall)
aResult | The result of the test. | |
aCallback | Pointer to the STIF test class |
static TInt CTestFlexPeriodic::StartWithNegativeInterval64L | ( | TTestResult & | aResult, | |
CTestFlexTimer * | aCallback | |||
) | [static] |
Start timer with negative interval (64 bit).
Start should panic with CFlexPeriodic 7 (EFlexPeriodicIntervalTooSmall)
aResult | The result of the test. | |
aCallback | Pointer to the STIF test class |
static TInt CTestFlexPeriodic::StartWithNullCallBack32L | ( | TTestResult & | aResult, | |
CTestFlexTimer * | aCallback | |||
) | [static] |
Start timer with NULL callback function (32 bit).
aResult | The result of the test. | |
aCallback | Pointer to the STIF test class |
static TInt CTestFlexPeriodic::StartWithNullCallBack64L | ( | TTestResult & | aResult, | |
CTestFlexTimer * | aCallback | |||
) | [static] |
Start timer with NULL callback function (64 bit).
aResult | The result of the test. | |
aCallback | Pointer to the STIF test class |
static TInt CTestFlexPeriodic::StartWithZeroInterval32L | ( | TTestResult & | aResult, | |
CTestFlexTimer * | aCallback | |||
) | [static] |
Start timer with zero interval (32 bit).
Start should panic with CFlexPeriodic 7 (EFlexPeriodicIntervalTooSmall)
aResult | The result of the test. | |
aCallback | Pointer to the STIF test class |
static TInt CTestFlexPeriodic::StartWithZeroInterval64L | ( | TTestResult & | aResult, | |
CTestFlexTimer * | aCallback | |||
) | [static] |
Start timer with zero interval (64 bit).
Start should panic with CFlexPeriodic 7 (EFlexPeriodicIntervalTooSmall)
aResult | The result of the test. | |
aCallback | Pointer to the STIF test class |