契约式设计是一种发现和修复代码中逻辑错误的工具。
Design by contract is a tool for finding and fixing logic bugs in code.
注意,在生产部署时可以关闭契约式设计测试,以消除它们的开销。
Note that Design by Contract tests can be turned off in production deployments to remove their overhead.
正如前面提到过的,单元测试和契约式设计用不同的方式实现类似的目标。
As previously noted, it is true that unit testing and Design by Contract accomplish similar objectives by different means.
应用推荐