将位于方法开头、说明该方法所起作用的注释块翻译为单元测试。
Translate block comments at the beginning of methods describing what the method does into unit tests.
本书当中,所有的程序都将以一段特别的注释开头,这段注释叫做程序注解,是用来整体描述这段程序的。
In this text, every program begins with a special comment called the program comment that describes the operation of the program as a whole.
减小前一个示例中的循环计数值,在脚本的开头添加set - x和一个注释,见清单12。
Tone down the loop count on the previous example, add set -x to the beginning of the script as well as a comment, and execute it, as shown in Listing 12.
自己尝试一下:在带有以“Weshouldraise…”开头的长注释块和不带这一长注释块这两种情况下,运行stat -comments . pl,并查看统计信息的差异。
Try it for yourself: Run stat-comments.pl with and without the long comment block that begins with "We should raise...", and see the difference in statistics.
自己尝试一下:在带有以“Weshouldraise…”开头的长注释块和不带这一长注释块这两种情况下,运行stat -comments . pl,并查看统计信息的差异。
Try it for yourself: Run stat-comments.pl with and without the long comment block that begins with "We should raise...", and see the difference in statistics.
应用推荐