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

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.

主站蜘蛛池模板: 太康县| 甘洛县| 合阳县| 淮北市| 喀什市| 琼结县| 于都县| 仲巴县| 隆林| 静海县| 麦盖提县| 高邑县| 枞阳县| 禹州市| 进贤县| 胶南市| 句容市| 印江| 措美县| 邯郸县| 邯郸县| 灵武市| 房产| 达孜县| 黄平县| 涟源市| 珲春市| 石楼县| 遵义县| 神农架林区| 乐山市| 固镇县| 巩留县| 临沂市| 临沭县| 弥勒县| 读书| 连州市| 景泰县| 平乐县| 衢州市|