Testing an interface inherited from a base class

The -target option of RunTest allows you to do polymorphic testing. For example, you start with a class named TSampleObject and you have written a test class called TSampleObjectBaseTest to test your class.

You can then derive a class from TSampleObject called TSampleObjectTwo and use the same test class that you used for the base class without recompiling
your test.

To test TSampleObject, use this command:

    RunTest -test TSampleObjectBaseTest SampleObjectTestLib -target TSampleObject TestSamplesLib
To test TSampleObjectTwo, use this command:

    RunTest -test TSampleObjectBaseTest SampleObjectTestLib -target TSampleObject2 TestSamplesLib

[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