Normal TDD writes only enough code to make a test fail.
标准的TDD只编写能够使一个测试失败的足够多的代码。
Then I would even take it a step further and run the test cases, even though I know they will fail because I haven't actually written any of the code for it.
接下来我甚至会进一步运行测试用例,尽管我知道它们将失败,因为我没有为该类编写任务代码。
Else code block is a simple logical crossroad that helps show why the test would fail or pass if one path - and not another - is taken, according to test expectations.
else代码块是一个简单的逻辑分支,根据测试期望说明选取一条路经——而不是另一条路经——之后测试将失败(或通过)的原因。
This code runs in a respectable time, but a couple of the test assertions fail.
这段代码运行的时间十分合理,但是几个测试断言都失败了。
This code runs in a respectable time, but a couple of the test assertions fail.
这段代码运行的时间十分合理,但是几个测试断言都失败了。
应用推荐