Class: TBasePrimitiveComparisonTest

Declaration: PrimitiveComparisonTest.h

Taxonomy Categories:

Member Functions:


Interface Category:

Developer Tool Programmer Interface.

Inherits From:

TBaseComparisonTest

Inherited By:

TPrimitiveComparisonTestOf

Purpose:

An abstract base class derived from TBaseComparisonTest that defines the protocol used for TPrimitiveComparisonTestOf tests. TBasePrimitiveComparisonTest tests the constructor, the destructor, the copy constructor, and the assignment operator.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

TBasePrimitiveComparisonTest cannot be used directly. Use the template class TPrimitiveComparisonTestOf or the TPrimitiveComparisonTestOf macros. The template class defines all the functions that you must override for TBasePrimitiveComparisonTest.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TBasePrimitiveComparisonTest::~TBasePrimitiveComparisonTest

virtual ~ TBasePrimitiveComparisonTest ()

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: TBasePrimitiveComparisonTest::CopyInfo

virtual void CopyInfo (TDictionaryOf < TStandardText, TText >& infoDict) const

Interface Category:

Developer Tool Programmer Interface.

Purpose:

Framework function that derived classes can override to provide metainformation about themselves.

Calling Context:

Called by Test framework and test logging classes.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBasePrimitiveComparisonTest::SetEqualTarget

void SetEqualTarget (void * equalObject)

Interface Category:

Developer Tool Programmer Interface.

Purpose:

Sets the object equal to the target.

Calling Context:

Called by Test framework and directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBasePrimitiveComparisonTest::GetEqualTarget

void * GetEqualTarget ()

Interface Category:

Developer Tool Programmer Interface.

Purpose:

Gets the object that is equal to the target.

Calling Context:

Called by Test framework and directly.

Parameters:

Return Value:

Returns the object that is equal to the target.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBasePrimitiveComparisonTest::SetUnequalTarget

void SetUnequalTarget (void * unequalObject)

Interface Category:

Developer Tool Programmer Interface.

Purpose:

Sets the object that is not equal to the target.

Calling Context:

Called by Test framework and directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBasePrimitiveComparisonTest::GetUnequalTarget

void * GetUnequalTarget ()

Interface Category:

Developer Tool Programmer Interface.

Purpose:

Gets the object that is not equal to the target.

Calling Context:

Called by Test framework and directly.

Parameters:

Return Value:

Returns the object that is not equal to the target.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBasePrimitiveComparisonTest::TBasePrimitiveComparisonTest

  1. TBasePrimitiveComparisonTest ()
  2. TBasePrimitiveComparisonTest (const TBasePrimitiveComparisonTest & that)

Interface Category:

Developer Tool Programmer Interface.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called by the stream-in operators.
  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: TBasePrimitiveComparisonTest::operator=

TBasePrimitiveComparisonTest & operator =(const TBasePrimitiveComparisonTest & that)

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: TBasePrimitiveComparisonTest::Test

virtual void Test ()

Interface Category:

Developer Tool Programmer Interface.

Purpose:

Compares a separately constructed equal object with the target. It compares a copy-constructed object on the stack with the target. If possible, it compares a separately constructed unequal object with the target. Test compares a copy-constructed object on the heap with the target and checks that they they are equal. An assignment operator is called with the heap object to check operator= for the assigned object and the self-assigned heap object. Memory leaks are checked after the call to the assignment operator, the copy constructor, and the destructor for the heap object.

Calling Context:

Called by Test framework. Do not 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: TBasePrimitiveComparisonTest::AssignObjects

virtual void AssignObjects (void * source, void * destination)

Interface Category:

Developer Tool Programmer Interface.

Purpose:

Assigns the destination object to the source object after casting both pointers to the target class.

Calling Context:

Called by Test framework. Do not 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: TBasePrimitiveComparisonTest::CheckCopyConstructedStackObject

virtual void CheckCopyConstructedStackObject (void * source)

Interface Category:

Developer Tool Programmer Interface.

Purpose:

Creates a copy-constructed object on the stack using the given source. It then compares the copy-constructed object and the source and checks that the objects are equal.

Calling Context:

Called by Test framework. Do not 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: TBasePrimitiveComparisonTest::CreateHeapObject

virtual void * CreateHeapObject (TLocalMemoryHeap & heap, void * source)

Interface Category:

Developer Tool Programmer Interface.

Purpose:

Creates a copy-constructed object on the given heap using the source and returns the heap object.

Calling Context:

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

Parameters:

Return Value:

Returns the copy-constructed object that was allocated on the heap.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBasePrimitiveComparisonTest::CreateUnequalTarget

virtual void * CreateUnequalTarget () const

Interface Category:

Developer Tool Programmer Interface.

Purpose:

Creates an object that is unequal to the target and returns the unequal target.

Calling Context:

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

Parameters:

Return Value:

Returns the unequal target.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBasePrimitiveComparisonTest::CreateEqualTarget

virtual void * CreateEqualTarget () const

Interface Category:

Developer Tool Programmer Interface.

Purpose:

Creates an object that is equal to the target and returns the equal target.

Calling Context:

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

Parameters:

Return Value:

Returns the equal target.

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.