后置条件测试通常用方法返回值的断言来表示。
Postconditions are often expressed as assertions about method return values.
方法和构造函数也可以有不变条件测试。
最后,不变条件测试断言永远不变的条件。
Finally, invariant tests assert conditions that never change.
同样,后置条件测试大致与after建议对应。
Similarly, postcondition tests correspond roughly to after advice.
同样,你会得到一个完整的身体条件测试及实验室检查。
You also will have a thorough physical exam and laboratory testing.
对组件输入(例如传递给方法的参数)的测试叫做前置条件测试。
Tests on component inputs (such as parameters passed to methods) are called precondition tests.
清单12分成两个部分,由一个if -else条件测试分隔。
Listing 12 is divided into two sections, separated by an if-else conditional test.
断言允许你执行常规比较和条件测试来检测代码如何运行。
Assertions allow you to perform common comparisons and condition testing to examine how code is running.
指定条件信息-环境、数据、预置的条件测试、安全入口等。
Specifies setup information - environment, data, prerequisite tests, security access.
空间数据库的主动规则条件测试对于规则的执行效率至关重要。
The condition testing of active rules in spatial database is a key element to the efficiency of rules execution.
最后,字段的不变条件测试只是在读写字段之后才进行,以便允许惰性计算。
Finally, field-invariant tests are only evaluated after field reads and writes, to permit lazy evaluation.
后置条件测试确保组件完成操作的时候结果符合要求,假设前置条件已经满足。
Postcondition tests are guarantees that the component promises to satisfy when it completes the operation, assuming the preconditions are met.
类似地,字段的不变条件测试从不在对象构造期间进行,但是它们会在构造完成之后进行。
Similarly, field-invariant tests are never evaluated during object construction, but they are evaluated after construction completes.
前置条件测试由before建议处理,该建议就在对应的方法执行连接点之前执行。
Precondition tests are handled by before advice, which is executed just before the corresponding method execution join point.
注意,虽然接口不能定义字段,但不变条件测试和其他测试引用了一个隐含的余额字段。
Notice that the invariant and other tests refer to an implied balance field, even though an interface can't define fields.
这种机制具有限制针对特定约束条件的重复条件测试的好处,如集合大小或之前讨论过的非null的情况。
This mechanism has the benefit of limiting repeated conditionals testing for certain constraints, such as collection sizes or the previously discussed not-null condition.
BankAccount的接口规范包含一个类范围的不变条件测试,即余额总要大于或等于0(对不起,不允许透支)。
The contract specification for BankAccount includes a class-wide invariant that the balance must always be greater than or equal to zero (sorry, no overdrafts allowed!).
最后,不变条件测试使用around建议,在该建议中,在连接点执行之前和之后都计算测试,同时具有前面提到过的例外。
Finally, invariant tests use around advice, where the tests are evaluated both before and after join point execution with the exceptions noted previously.
您还可以使用if/elif/else(elif,等价于PHP 中的elseif)创建更加复杂的条件测试,如清单8 所示。
You can also build more complex conditional tests using an if/elif/else (elif being the equivalent to PHP's elseif), as shown in Listing 8.
测试并不弥补明显的社会不公,因此不能说明一个物质条件差的年轻人,如果在较好的环境下成长的话,会有多大才干。
Tests do not compensate for gross social inequality, and thus do not tell how able an underprivileged youngster might have been had he grown up under more favorable circumstances.
例如,测试并不弥补明显的社会不公;因此,它们不能说明一个物质条件差的年轻人,如果在较好的环境下成长的话,会有多大才干。
For example, tests do not compensate for gross social inequality, and thus do not tell how able an underprivileged youngster might have been had he grown up under more favorable circumstances.
如果四项法案都通过的话,它们将代表着密歇根州2013年法律的重大改革,该法律允许在有限的条件下测试自动驾驶汽车。
If all four bills pass as written, they would represent a substantial update of Michigan's 2013 law that allowed the testing of self-driving vehicles in limited conditions.
2014年,韩国开设了第二个南极研究基地,称其将用于测试韩国研究人员开发的在极端条件下使用的机器人。
South Korea opened its second Antarctic research base in 2014, describing it as a way to test robots developed by Korean researchers for use in extreme conditions.
测试本身只是一种工具,可以在特定条件下以合理的精度测量其特性。
The tests themselves are merely tools, with characteristics that can be measured with reasonable precision under specified conditions.
当测试对象被要求在无噪声条件下对书面材料进行校对时,不同的噪声条件会产生不同的后效应。
The different noise conditions had quite different after-effects when the subjects were required to proofread written material under conditions of no noise.
设计师们花了一年多的时间选择和测试理想的材料,最终挑选出一种能够抵御月球上异常恶劣条件的新型材料。
Designers spent more than one year choosing and testing ideal materials, and finally picked a new kind of material that can resist the very difficult conditions on the Moon.
在测试流程时,这些边缘条件必须得到识别和测试。
As the process is tested, it is essential these edge conditions are identified and tested.
在这里的清单5 中应用的条件将测试user对象的job属性是否等于developer。
The condition applied here in Listing 5 tests if the job property of the user object is equal to developer.
在这里的清单5 中应用的条件将测试user对象的job属性是否等于developer。
The condition applied here in Listing 5 tests if the job property of the user object is equal to developer.
应用推荐