You write enough code to make the test pass.
编写足够的代码,使测试通过。
I ran the test and implemented code to make the test pass.
运行这个测试案例并实现代码使测试通过。
As I said last month, writing just enough code to make a test pass keeps code simpler and keeps me focused on the task at hand.
正如我上月所述,编写足够的代码以使测试通过可以简化程序代码,从而有更多的精力关注手边的工作。
TDD requires that you do the opposite: write the test first and allow it to inform how you write the code that makes the test pass.
TDD要求您反过来做:先编写测试,并让它来提示如何编写可以让测试通过的代码。
Prepare the hardware and software environment of test pass;
准备视觉测试所需要的软件和硬件环境。
You are not allowed to write any production code unless it is to make a failing unit test pass.
在写完“红色”(无法通过测试)的单元测试代码之前,不允许写任何的产品代码。
You are not allowed to write any production code unless it is to make a failing unit test pass.
在写完“红色”(无法通过测试)的单元测试代码之前,不允许写任何的产品代码。
应用推荐