Taxonomy Categories:
Member Functions:
Interface Category:
Developer Tool Programmer Interface.
Inherits From:
TBasePrimitiveComparisonTest
Inherited By:
None.
Purpose:
A template class derived from TBasePrimitiveComparisonTest. It tests the canonical functions: constructor, destructor, copy constructor, and assignment operator.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
TPrimitiveComparisonTestOf can be used directly only if the target and comparator are set outside the test before running the test. Otherwise, create a derived class of TPrimitiveComparisonTestOf and overload the SetupComparator function to specify which comparator to use for the test, the SetupComparator function to specify which comparator to use for the test, and the CreateNewTarget function to create the target. Clients can also override the CreateEqualTarget and CreateUnequalTarget to create the objects used to check equality and inequality. The TPrimitiveComparisonTestOf macros can be used to create your derived class and define all the functions you need to override.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
- TPrimitiveComparisonTestOf ()
- TPrimitiveComparisonTestOf (const TPrimitiveComparisonTestOf < AType > & that)
Interface Category:
Developer Tool Programmer Interface.
Purpose:
- Default constructor.
- Copy constructor.
Calling Context:
- Called by the stream-in operators.
- Called to copy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TPrimitiveComparisonTestOf ()
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.
TPrimitiveComparisonTestOf < AType > & operator =(const TPrimitiveComparisonTestOf < AType > & 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.
virtual const char * GetTargetClassNameAsString () const
Interface Category:
Developer Tool Programmer Interface.
Purpose:
Returns the name of the target class.
Calling Context:
Called by Test framework. Do not call this function directly.
Parameters:
Return Value:
Returns the name of the target class.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void * CreateNewTarget () const
Interface Category:
Developer Tool Programmer Interface.
Purpose:
Returns a NIL pointer. Derived classes must overload CreateNewTarget to create the target object.
Calling Context:
Called by Test framework. Do not call this function directly.
Parameters:
Return Value:
Returns a NIL pointer.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void DeleteTarget (void *) const
Interface Category:
Developer Tool Programmer Interface.
Purpose:
Deletes the given target object after casting it to the target class to invoke the correct destructor.
Calling Context:
Called by Test framework. Do not call this function directly.
Parameters:
- void * -The target object.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
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:
- void * source -The object to be assigned.
- void * destination -The object where the source is to be assigned.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
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:
- void * source -The source object that is used to create the copy-constructed object.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
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:
- TLocalMemoryHeap & heap -Th heap where the object is created.
- void * source -The source object that is used to create the copy-constructed object.
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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.