主要内容

库误用缺陷

与库使用(例如基于 Polyspace® Test™ xUnit 的 API)不正确相关的缺陷

当您使用的库函数违反了库规范时,便会出现此类缺陷。这组缺陷检查项目前涵盖一个库,即基于 Polyspace Test xUnit 的 API。有关详细信息,请参阅使用 C/C++ xUnit API 编写测试 (Polyspace Test)

Polyspace 结果

不正确地使用测试设置/拆解 APITest setup invoked in test suite configuration, suite setup invoked in test configuration, and so on (自 R2023b 起)
不正确地使用测试脚手架Test fixture accessed in suite-test setup/teardown, suite-test fixture accessed in suite setup/teardown (自 R2023b 起)
不正确地使用模拟 APIMock function accessed outside test body, and so on (自 R2023b 起)
不正确的测试注册或定义Test or test suite not defined, test not registered, and so on (自 R2023b 起)
对测试编写 API 使用了不受支持的语法Higher order calls in test or test suite configuration, and so on (自 R2023b 起)