返回介绍

29.2.2.3 $coverage_get

发布于 2020-09-09 22:56:01 字数 1250 浏览 915 评论 0 收藏 0

$coverage_get(coverage_type, scope_def, modules_or_instance)

This function obtains the current coverage value for the given coverage type over the given portion of the hierarchy. This number can be converted to a coverage percentage by use of the equation:

The return value follows the same pattern as $coverage_get_max (see Section 29.2.2.2), but with pos_num representing the current coverage level, i.e., the number of the coverable items that have been covered in this/these hierarchy(ies).

The scope of this function is specified as per $coverage_control (see Section 29.2.2.1).

The return value is an integer, with the following meanings.

-2 (‘SV_COV_OVERFLOW)
the value exceeds a number that can be represented as an integer.

-1 (‘SV_COV_ERROR)
an error occurred (typically due to using incorrect arguments).

0 (‘SV_COV_NOCOV)
no coverage is available for that coverage type on that/those hierarchy(ies).

+pos_num
the maximum coverage number (where pos_num > 0), which is the sum of all coverable
items of that type over the given hierarchy(ies).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文