Protocol test options

You have several options for controlling the behavior of protocol tests. The options are available either programmatically or with command-line options. All of these options are enabled unless you explicitly disable them.

Hash value checking

The Compare member function of comparison tests checks the hash values when comparing two objects.

To disable hash value checking from the command line, use the -h option.

To disable hash value checking in your test, use:

    SetCheckHash(false);

Primitive comparison checking

The primitive comparison test checks the constructor, destructor, copy constructor, and assignment operator.To disable the primitive comparison test from the command line, use the -p option.

To disable the TBasePrimitiveComparisonTest in your test, use:

    SetCheckPrimitiveComparison(false);

Stream-in version checking

Streaming tests normally check for proper handling of version numbers in the stream. Streaming tests stream in the version number from the stream, change the version number to a random value, stream the invalid version number back out, call operator<<= for the target class, and check that the operator<<= for the target class correctly throws the TInvalidVersionError exception. If the stream-in operator does not throw the exception, the test fails.

To disable the stream-in version check from the command line, use the -v option.

To disable stream-in version checking in your test, use:

    SetCheckVersionHandling(false);

[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker