Previous Section Next Section

10.7 Turning On Coverage

Use the cover configuration option to turn on coverage, as in Example 10-8 below. If cover groups are defined then coverage is automatically turned on. Note that in this example, although only one mode is illustrated, other modes for coverage are available. These modes for coverage are discussed in detail in the e language reference manuals.

Example 10-8 Turning on Coverage
Example shows how to turn on the coverage
for the various coverage groups defined in the
e code. The set_config() method is called to turn
on coverage. The set_config() method has many different
options. The simplest option is shown in this example.
This file should be compiled with other e files to turn
on coverage.

<'
extend sys {
    setup() is also { //Extend the setup() method of sys.
        set_config(cover, mode, on); //Turns on coverage
                                         //Other modes are available
    };
};
'>
Previous Section Next Section