CTestFlexPeriodic Class Reference

List of all members.

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.

Detailed Description

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

Since:
TB10.1

Member Function Documentation

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:

  • CFlexPeriodic::NewL()
  • CFlexPeriodic::Start() 64-bit
  • CFlexPeriodic::Cancel()
  • CFlexPeriodic::~CFlexPeriodic()
  • Expiration of CFlexPeriodic timers
  • Cancelling and starting timer in callback function
Parameters:
aResult The result of the test.
aCallback Pointer to the STIF test class
Returns:
The status of execution of the test. KErrNone if the test was executed ok, any system wide errorcode otherwise.
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().

Parameters:
aResult The result of the test.
aCallback Pointer to the STIF test class
Returns:
The status of execution of the test. KErrNone if the test was executed ok, any system wide errorcode otherwise.
static TInt CTestFlexPeriodic::ConfigureAfterStartL ( TTestResult &  aResult,
CTestFlexTimer *  aCallback 
) [static]

Configure timer after it has been started.

Start two timers: T1:

  • delay 1 microsecond, window 0
  • interval 1 sec, window 0

T2:

  • delay 2 sec, default window
  • interval 2 sec, default window

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, ...

Parameters:
aResult The result of the test.
aCallback Pointer to the STIF test class
Returns:
The status of execution of the test. KErrNone if the test was executed ok, any system wide errorcode otherwise.
static TInt CTestFlexPeriodic::ConfigureWindow32L ( TTestResult &  aResult,
CTestFlexTimer *  aCallback 
) [static]

Configure window sizes, 32 bit.

Start 2 timers: T1:

  • delay 3.0 sec, window 0.0 sec
  • interval 2.0 sec, window 1.5 sec T2:
  • delay 3.5 sec, window 1.5 sec
  • interval 1.0 sec, window 0.0 sec

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:

  • CFlexPeriodic::NewL()
  • CFlexPeriodic::Configure() 32-bit
  • CFlexPeriodic::Start() 32-bit
  • CFlexPeriodic::Cancel()
  • CFlexPeriodic::~CFlexPeriodic()
  • Expiration of CFlexPeriodic timers
  • Delay
  • Interval
  • Delay window
  • Interval window
Parameters:
aResult The result of the test.
aCallback Pointer to the STIF test class
Returns:
The status of execution of the test. KErrNone if the test was executed ok, any system wide errorcode otherwise.
static TInt CTestFlexPeriodic::ConfigureWindow64L ( TTestResult &  aResult,
CTestFlexTimer *  aCallback 
) [static]

Configure window sizes, 64 bit.

See also:
ConfigureWindow32L for test setup.

Tests:

  • CFlexPeriodic::NewL()
  • CFlexPeriodic::Configure() 64-bit
  • CFlexPeriodic::Start() 64-bit
  • CFlexPeriodic::Cancel()
  • CFlexPeriodic::~CFlexPeriodic()
  • Expiration of CFlexPeriodic timers
  • Delay
  • Interval
  • Delay window
  • Interval window
Parameters:
aResult The result of the test.
aCallback Pointer to the STIF test class
Returns:
The status of execution of the test. KErrNone if the test was executed ok, any system wide errorcode otherwise.
static TInt CTestFlexPeriodic::ConfigureWindowMixL ( TTestResult &  aResult,
CTestFlexTimer *  aCallback 
) [static]

Configure window sizes, 32 bit and 64 bit.

See also:
ConfigureWindow32L for test setup.

Tests:

  • CFlexPeriodic::NewL()
  • CFlexPeriodic::Configure() 32-bit
  • CFlexPeriodic::Configure() 64-bit
  • CFlexPeriodic::Start() 32-bit
  • CFlexPeriodic::Start() 64-bit
  • CFlexPeriodic::Cancel()
  • CFlexPeriodic::~CFlexPeriodic()
  • Expiration of CFlexPeriodic timers
  • Delay
  • Interval
  • Delay window
  • Interval window
Parameters:
aResult The result of the test.
aCallback Pointer to the STIF test class
Returns:
The status of execution of the test. KErrNone if the test was executed ok, any system wide errorcode otherwise.
static TInt CTestFlexPeriodic::ConfigureWithNegativeDelayWindow32L ( TTestResult &  aResult,
CTestFlexTimer *  aCallback 
) [static]

Configure timer with negative delay window (32 bit).

Configure should panic with CFlexPeriodic 9 (EFlexPeriodicIntervalWindowLessThanZero)

Parameters:
aResult The result of the test.
aCallback Pointer to the STIF test class
Returns:
The status of execution of the test. KErrNone if the test was executed ok, any system wide errorcode otherwise.
static TInt CTestFlexPeriodic::ConfigureWithNegativeDelayWindow64L ( TTestResult &  aResult,
CTestFlexTimer *  aCallback 
) [static]

Configure timer with negative delay window (64 bit).

Configure should panic with CFlexPeriodic 9 (EFlexPeriodicIntervalWindowLessThanZero)

Parameters:
aResult The result of the test.
aCallback Pointer to the STIF test class
Returns:
The status of execution of the test. KErrNone if the test was executed ok, any system wide errorcode otherwise.
static TInt CTestFlexPeriodic::ConfigureWithNegativeIntervalWindow32L ( TTestResult &  aResult,
CTestFlexTimer *  aCallback 
) [static]

Configure timer with negative interval window (32 bit).

Configure should panic with CFlexPeriodic 8 (EFlexPeriodicDelayWindowLessThanZero)

Parameters:
aResult The result of the test.
aCallback Pointer to the STIF test class
Returns:
The status of execution of the test. KErrNone if the test was executed ok, any system wide errorcode otherwise.
static TInt CTestFlexPeriodic::ConfigureWithNegativeIntervalWindow64L ( TTestResult &  aResult,
CTestFlexTimer *  aCallback 
) [static]

Configure timer with negative interval window (64 bit).

Configure should panic with CFlexPeriodic 8 (EFlexPeriodicDelayWindowLessThanZero)

Parameters:
aResult The result of the test.
aCallback Pointer to the STIF test class
Returns:
The status of execution of the test. KErrNone if the test was executed ok, any system wide errorcode otherwise.
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).

Parameters:
aResult The result of the test.
aCallback Pointer to the STIF test class
Returns:
The status of execution of the test. KErrNone if the test was executed ok, any system wide errorcode otherwise.
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).

Parameters:
aResult The result of the test.
aCallback Pointer to the STIF test class
Returns:
The status of execution of the test. KErrNone if the test was executed ok, any system wide errorcode otherwise.
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:

  • CFlexPeriodic::NewL()
  • CFlexPeriodic::Start() 32-bit
  • CFlexPeriodic::Cancel()
  • CFlexPeriodic::~CFlexPeriodic()
  • Expiration of CFlexPeriodic timers
Parameters:
aResult The result of the test.
aCallback Pointer to the STIF test class
Returns:
The status of execution of the test. KErrNone if the test was executed ok, any system wide errorcode otherwise.
static TInt CTestFlexPeriodic::StartWithMaximumDelay64L ( TTestResult &  aResult,
CTestFlexTimer *  aCallback 
) [static]

Start timer with maximum delay (64 bit), 0x7FFFFFFFFFFFFFFF.

Start should panic with CFlexPeriodic 24 (EFlexTimerServerIllegalTimerValue)

Parameters:
aResult The result of the test.
aCallback Pointer to the STIF test class
Returns:
The status of execution of the test. KErrNone if the test was executed ok, any system wide errorcode otherwise.
static TInt CTestFlexPeriodic::StartWithMaximumInterval64L ( TTestResult &  aResult,
CTestFlexTimer *  aCallback 
) [static]

Start timer with maximum interval (64 bit), 0x7FFFFFFFFFFFFFFF.

Start should panic with CFlexPeriodic 24 (EFlexTimerServerIllegalTimerValue)

Parameters:
aResult The result of the test.
aCallback Pointer to the STIF test class
Returns:
The status of execution of the test. KErrNone if the test was executed ok, any system wide errorcode otherwise.
static TInt CTestFlexPeriodic::StartWithMinAndMaxL ( TTestResult &  aResult,
CTestFlexTimer *  aCallback 
) [static]

Test timer start allowed value range.

Start timers with following parameters:

T1:

  • Configure (32 bit): delay window 1 sec, interval window 1 sec
  • Start (32 bit): delay 0 microseconds, interval 1 sec

T2:

  • Configure (32 bit): delay window 1 sec, interval window 1 sec
  • Start (32 bit): delay 0x7FFFFF microseconds, interval 1 sec

T3:

  • Configure (32 bit): delay window 1 sec, interval window 1 sec
  • Start (32 bit): delay 1 sec, interval 0 microseconds

T4:

  • Configure (32 bit): delay window 1 sec, interval window 1 sec
  • Start (32 bit): delay 1 sec, interval 0x7FFFFF microseconds

T5:

  • Configure (64 bit): delay window 1 sec, interval window 1 sec
  • Start (64 bit): delay 0 microseconds, interval 1 sec

T6:

  • Configure (64 bit): delay window 1 sec, interval window 1 sec
  • Start (64 bit): delay 1 year, interval 1 sec

T7:

  • Configure (64 bit): delay window 1 sec, interval window 1 sec
  • Start (64 bit): delay 1 sec, interval 0 microseconds

T8:

  • Configure (64 bit): delay window 1 sec, interval window 1 sec
  • Start (64 bit): delay 1 sec, interval 1 year
Parameters:
aResult The result of the test.
aCallback Pointer to the STIF test class
Returns:
The status of execution of the test. KErrNone if the test was executed ok, any system wide errorcode otherwise.
static TInt CTestFlexPeriodic::StartWithNegativeDelay32L ( TTestResult &  aResult,
CTestFlexTimer *  aCallback 
) [static]

Start timer with negative delay (32 bit).

Start should panic with CFlexPeriodic 6 (EFlexPeriodicDelayLessThanZero)

Parameters:
aResult The result of the test.
aCallback Pointer to the STIF test class
Returns:
The status of execution of the test. KErrNone if the test was executed ok, any system wide errorcode otherwise.
static TInt CTestFlexPeriodic::StartWithNegativeDelay64L ( TTestResult &  aResult,
CTestFlexTimer *  aCallback 
) [static]

Start timer with negative delay (64 bit).

Start should panic with CFlexPeriodic 6 (EFlexPeriodicDelayLessThanZero)

Parameters:
aResult The result of the test.
aCallback Pointer to the STIF test class
Returns:
The status of execution of the test. KErrNone if the test was executed ok, any system wide errorcode otherwise.
static TInt CTestFlexPeriodic::StartWithNegativeInterval32L ( TTestResult &  aResult,
CTestFlexTimer *  aCallback 
) [static]

Start timer with negative interval (32 bit).

Start should panic with CFlexPeriodic 7 (EFlexPeriodicIntervalTooSmall)

Parameters:
aResult The result of the test.
aCallback Pointer to the STIF test class
Returns:
The status of execution of the test. KErrNone if the test was executed ok, any system wide errorcode otherwise.
static TInt CTestFlexPeriodic::StartWithNegativeInterval64L ( TTestResult &  aResult,
CTestFlexTimer *  aCallback 
) [static]

Start timer with negative interval (64 bit).

Start should panic with CFlexPeriodic 7 (EFlexPeriodicIntervalTooSmall)

Parameters:
aResult The result of the test.
aCallback Pointer to the STIF test class
Returns:
The status of execution of the test. KErrNone if the test was executed ok, any system wide errorcode otherwise.
static TInt CTestFlexPeriodic::StartWithNullCallBack32L ( TTestResult &  aResult,
CTestFlexTimer *  aCallback 
) [static]

Start timer with NULL callback function (32 bit).

Parameters:
aResult The result of the test.
aCallback Pointer to the STIF test class
Returns:
The status of execution of the test. KErrNone if the test was executed ok, any system wide errorcode otherwise.
static TInt CTestFlexPeriodic::StartWithNullCallBack64L ( TTestResult &  aResult,
CTestFlexTimer *  aCallback 
) [static]

Start timer with NULL callback function (64 bit).

Parameters:
aResult The result of the test.
aCallback Pointer to the STIF test class
Returns:
The status of execution of the test. KErrNone if the test was executed ok, any system wide errorcode otherwise.
static TInt CTestFlexPeriodic::StartWithZeroInterval32L ( TTestResult &  aResult,
CTestFlexTimer *  aCallback 
) [static]

Start timer with zero interval (32 bit).

Start should panic with CFlexPeriodic 7 (EFlexPeriodicIntervalTooSmall)

Parameters:
aResult The result of the test.
aCallback Pointer to the STIF test class
Returns:
The status of execution of the test. KErrNone if the test was executed ok, any system wide errorcode otherwise.
static TInt CTestFlexPeriodic::StartWithZeroInterval64L ( TTestResult &  aResult,
CTestFlexTimer *  aCallback 
) [static]

Start timer with zero interval (64 bit).

Start should panic with CFlexPeriodic 7 (EFlexPeriodicIntervalTooSmall)

Parameters:
aResult The result of the test.
aCallback Pointer to the STIF test class
Returns:
The status of execution of the test. KErrNone if the test was executed ok, any system wide errorcode otherwise.
 All Classes Functions
Generated on Thu Apr 22 15:09:47 2010 for FlexTimerStifSpecs by  doxygen 1.6.3