主要内容

Enable relational boundary coverage (-cov-relbound)

Specify whether to calculate relational boundary coverage

Since R2023b

Description

Specify whether Polyspace® Test™ calculates the metric Relational Boundary Coverage. If you enable this option, Polyspace Test instruments your source code to check the relational boundary coverage metric for each relational operation.

Set Option

Set the option using one of these methods:

  • Polyspace Platform user interface (desktop products only): In your project configuration, on the Testing & Profiling tab, select the Code Coverage node and then select this option.

  • Command line: Use the option -cov-relbound. See Command-Line Information.

Why Use This Option

Use this option to check how many of the relational boundaries in your code are covered by your test cases.

Settings

On

Polyspace Test calculates the relational boundary coverage metric.

Note that in the Polyspace Platform user interface, relational boundary coverage is not reported in a separate column on the Results List pane. If you select a decision containing a relational operator (==, <=, and so on), the Result Details pane shows this metric. To see more details on how this metric value was calculated, generate an HTML report from your coverage results. See Structure of HTML Reports Generated from C/C++ Code Profiling Results.

Off (default)

Polyspace Test does not calculate the relational boundary coverage metric.

Dependencies

To select a code coverage level, you must select Coverage as the Type of profiling.

Command-Line Information

The command-line workflow for setting this option depends on your workflow.

  • If you build your source and tests using a Polyspace Platform Project — Once you set this option in the project using the Polyspace Platform user interface, you cannot override or modify this option using the polyspace-test command.

  • If you build your sources and xUnit tests using your own toolchain — Specify this option to the polyspace-code-profiler command.

Parameter:-cov-relbound
Default:off
Example: polyspace-code-profiler -instrument -instrum-dir instrumFolder -cov-relbound -- compileCommand

Version History

Introduced in R2023b