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

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.

主站蜘蛛池模板: 万山特区| 旺苍县| 循化| 黔西县| 云阳县| 金阳县| 陵水| 漾濞| 庄浪县| 安丘市| 芦溪县| 邵阳市| 赤壁市| 炎陵县| 周至县| 东乡族自治县| 普宁市| 柳州市| 高台县| 华安县| 张家口市| 万盛区| 措勤县| 淳安县| 铁力市| 白朗县| 乐山市| 丽江市| 木里| 崇礼县| 舞钢市| 南江县| 清水县| 中超| 阳高县| 台前县| 泗洪县| 绵阳市| 长顺县| 靖江市| 葫芦岛市|