官术网_书友最值得收藏!

Green

In the green step, you write the simplest code that makes the test pass. It doesn't matter whether the code you write is good and clean. The code can also be silly and even wrong. It is enough when all the tests pass. The name green refers to how most IDEs indicate a passing test. Xcode uses a green diamond with a white check mark.

It is very important that you try to write the simplest code that makes the tests pass. By doing so, you only write code that you actually need and that is the simplest implementation possible. When I say simple, I mean that it should be easy to read, understand, and change. The code should always be easy to understand.

Often the simplest implementation will not be enough for the feature you try to implement, but still enough to make all the tests pass. This just means that you need another failing test to further drive the development of that feature.

主站蜘蛛池模板: 剑河县| 广灵县| 陆河县| 博野县| 黔西县| 临邑县| 阳曲县| 浮梁县| 林芝县| 玛多县| 家居| 富裕县| 永春县| 大埔县| 临澧县| 连江县| 万山特区| 望江县| 淮北市| 瑞安市| 固原市| 卓尼县| 陆川县| 乌拉特后旗| 保德县| 西畴县| 兰坪| 临海市| 营山县| 汪清县| 繁峙县| 吉木乃县| 镇赉县| 遵化市| 新疆| 贵定县| 安庆市| 湘阴县| 黑龙江省| 甘洛县| 黄浦区|