有多少任务需要其他任务作为前置条件?
这些天来,你一直在这样作,一直在签入没有检查其前置条件的代码,而这样作的结果就是某些人将要付出沉重的代价。
One of these days, you dispenser of depraved dementia, you are going to check in code that doesn't check its preconditions, and it's going to cost someone dearly!
根据这个用例的目标,在测试用例的前置条件或者设置中还需要一些数据输入。
Depending on the goal of the use case, some data input will be required in the pre-conditions or setup of the test case.
在软件开发里,程序员编写前置和后置条件来确立特定软件组件的角色。
In software development, the programmer writes pre - and postconditions in order to establish the role of a particular software component.
某些派别的信徒支持使用异常来检查参数和其他的前置条件,使用错误编码来报告程序中出错的处理。
Some disciples espouse using exceptions to check parameters and other preconditions, and error codes to report processing errors within the function.
前置条件和后置条件方法可以看到作为函数参数 (args)传递的值。
The pre-condition and post-condition methods can also see the values passed as function arguments (args).
这就与我们在调用main之前需要确认的很多前置条件的概念吻合了。
This matches our concept of a number of pre-conditions we want to make sure of before calling the main code.
对组件输入(例如传递给方法的参数)的测试叫做前置条件测试。
Tests on component inputs (such as parameters passed to methods) are called precondition tests.
可以将断言语句作为方法的前置条件或后置条件来添加。
You can add assertion statements as the pre- or post-conditions of a method.
后置条件测试确保组件完成操作的时候结果符合要求,假设前置条件已经满足。
Postcondition tests are guarantees that the component promises to satisfy when it completes the operation, assuming the preconditions are met.
假设有一个具有互斥分支的循环流;每个分支都有一些应用于该分支中所有活动的前置条件和不变量。
Consider a cyclic flow that has mutually exclusive branches; each branch has preconditions and invariants that apply to all activities in the branch.
透明性:前置和后置条件代码不与业务逻辑混合。
Transparency: The pre - and post-condition code isn't mixed with business logic.
将异常处理改为断言去掉了前置条件赐予的保护膜。
Changing the exception to an assertion removed the blessed protection of the precondition tests.
例如,用例的前置及后置条件、输入和输出定义服务依赖关系、边界和数据要求。
For example, the pre - and post-conditions, inputs, and outputs of the use case define the service dependencies, boundary, and data requirements.
另一个前置条件是运行前述约束检测算法所需的数据,要在模型中是实际可用的。
The other precondition is that the data that is needed to run the constraint-checking algorithm defined above is actually available in the model.
为了能够表达消息的语义,以及它们对系统状态的影响,我们引入了前置条件和后置条件。
To be able to express semantics of messages and their effects on system state we introduced pre- and postconditions.
用OVal为方法指定前置条件必须对方法参数进行标注。
To specify preconditions for a method with OVal, you must annotate method parameters.
withdraw有额外的前置条件,要求取款的数额不能超过现有余额。
Withdraw has the additional precondition requirement that the amount can't exceed the existing balance.
如下所示,前置条件通常作为方法体中的参数验证,如下所示
This precondition is generally used for parameter validation when entering a method’s body as in the example below
高危项目审批必须把安全生产作为前置条件。
High risk project approval must be safe production as a pre condition.
因此,前置和后置条件是契约理论的两个基本要素。
So pre - and post conditions are two fundamental elements of contracts.
Jacobson的方法涉及一系列进入和退出的准则,分别被称作前置条件和后置条件,和一个称为事件流的核心准则。
Jacobson's method involves a set of entry and exit criteria called pre-conditions and post-conditions respectively, and a core criteria called the flow of events.
前置条件测试由before建议处理,该建议就在对应的方法执行连接点之前执行。
Precondition tests are handled by before advice, which is executed just before the corresponding method execution join point.
合约还有几个前置条件,要求客户传递给withdraw()和deposit() 的参数大于或等于0。
The contract also has preconditions that require clients to pass in an amount greater than or equal to zero to both withdraw() and deposit().
在本例中,只要是我指定了OVal约束条件的地方,在OVal代码中定义的逻辑就会编入我的代码,进而充当起前置条件和后置条件。
In this case, everywhere I specify an OVal constraint, the logic defined in OVal code will be weaved into my code, thus acting like preconditions and postconditions.
请注意,它是一个非常简单的类,几乎所有函数都有前置条件。
Please note that this is a very simple class, with preconditions on almost all its functions.
应该接收同样的参数,返回同样类型,并且遵循同样的前置条件和后置条件。
It should take the same parameters, return the same type, and obey the same preconditions and postconditions.
因此,菲单方面提起的仲裁并未满足《公约》规定的法定前置条件。
Therefore, , the Philippines' unilateral initiation of arbitration has fallen short of meeting the UNCLOS conditions.
使用断言测试方法的前置和后置条件。
Use assertions to test pre - and postconditions of a method.
满足方法的前置条件通常是指传递的参数必须符合方法的要求,也可能指必须按照正确的顺序依次调用多个方法。
Abiding by the preconditions of a method usually means passing arguments as the method expects them; it may also mean calling a set of methods in the correct order.
应用推荐