Class: TTestSet

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 represents a test that contains a set of other TTest derived classes. Derive TTestSet if you have a group of related tests for which the order or execution does not matter.

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 use the AdoptTest function to add them to the set.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TTestSet::TTestSet

  1. TTestSet ()
  2. TTestSet (const TTestSet &)

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: TTestSet::operator=

TTestSet & operator =(const TTestSet &)

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: TTestSet::~TTestSet

virtual ~ TTestSet ()

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: TTestSet::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: TTestSet::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: TTestSet::RandomlyReorder

virtual void RandomlyReorder (long initialSeed =0)

Interface Category:

Developer Tool Programmer Interface.

Purpose:

Randomly rearranges the order in which subtests are executed by the Test function.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTestSet::SetSubtestRunCount

virtual void SetSubtestRunCount (unsigned long)

Interface Category:

Developer Tool Programmer Interface.

Purpose:

Sets the number of subtests to run.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTestSet::GetSubtestRunCount

virtual unsigned long GetSubtestRunCount () const

Interface Category:

Developer Tool Programmer Interface.

Purpose:

Gets the number of subtests to run.

Calling Context:

Called by the framework and directly.

Parameters:

Return Value:

Returns the number of subtests to run.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TTestSet::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.