类似地,在函数的末尾,如果您知道应该有某些后置条件,那就编写对应于各项条件的断言。
Similarly, at the end of the function, if you know that there are certain post-conditions that should hold, write assertions corresponding to each.
前置条件和后置条件方法可以看到作为函数参数 (args)传递的值。
The pre-condition and post-condition methods can also see the values passed as function arguments (args).
前置条件和后置条件方法可以看到作为函数参数 (args)传递的值。
The pre-condition and post-condition methods can also see the values passed as function arguments (args).
应用推荐