Class: TTestSequence

Declaration: TestCollection.h

Taxonomy Categories:

Member Functions:


Interface Category:

Developer Tool Programmer Interface.

Inherits From:

TTestCollection

Inherited By:

None.

Purpose:

A derived class of TTestCollection that implements a test that contains a sequence of subtests. These subtests are always executed in a fixed order (first to last). Derive TTestSequence if you have a group of related tests that must be executed in a fixed order. The default behavior is to halt on a subtest failure.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

This class is a framework class. To use it, derive it and override the SetupSubtests function to instantiate each of your subtests and add them to the sequence in the correct order using the AdoptFirstTest and AdoptLastTest functions.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TTestSequence::TTestSequence

  1. TTestSequence ()
  2. TTestSequence (const TTestSequence &)

Interface Category:

Developer Tool Programmer Interface.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called by the stream-in operators and Runtest.
  2. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTestSequence::operator=

TTestSequence & operator =(const TTestSequence &)

Interface Category:

Developer Tool Programmer Interface.

Purpose:

Assignment operator.

Calling Context:

Called when an object is assigned to another compatible object.

Parameters:

Return Value:

A non-const reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTestSequence::~TTestSequence

virtual ~ TTestSequence ()

Interface Category:

Developer Tool Programmer Interface.

Purpose:

Destructor.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTestSequence::operator<<=

virtual TStream & operator <<= (TStream & source)

Interface Category:

Developer Tool Programmer Interface.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself in from.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTestSequence::operator>>=

virtual TStream & operator >>=(TStream & destination) const

Interface Category:

Developer Tool Programmer Interface.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself out to.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTestSequence::AdoptFirstTest

virtual void AdoptFirstTest (TTest * subTest)

Interface Category:

Developer Tool Programmer Interface.

Purpose:

Adds a subtest to the start of the TTestSequence's collection of subtests so that the subtest is executed first.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

The caller must not delete the subtest after calling AdoptFirstTest.

Member Function: TTestSequence::AdoptLastTest

virtual void AdoptLastTest (TTest * subTest)

Interface Category:

Developer Tool Programmer Interface.

Purpose:

Adds a subtest to the end of the TTestSequence's collection of subtests so that the subtest is executed last.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

The caller must not delete the subtest after calling AdoptFirstTest.

Member Function: TTestSequence::GetNewSubtests

virtual TCollectionOf < TTest > & GetNewSubtests () const

Interface Category:

Developer Tool Programmer Interface.

Purpose:

Returns the collection of subtests. Clients and derived classes should not call or override this function.

Calling Context:

Called by Test framework. Do not call this function directly.

Parameters:

Return Value:

Returns a collection of subtests.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.