• First one, when I write a piece of code, especially code that has branches in it, when I design test cases for that piece of code, I should try and have a specific test case for each possible path through the code.

    第一点,当我们写代码的时候,尤其是一些含有分支语句的代码的时候,当我为这些代码,设计测试用例的时候,我应该为每一个可能的程序路径,都设计一个特别的用例

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • For the latter, this is a place where running test cases would do a good job of helping with that. Nonetheless, having done that, let's look at a better way to write this. Which is right here it is also, I think, on your sheet, I'm going to uncomment that, and comment this one out, yeah. All right?

    对于后者来说,运行测试用例,对它会有很大的帮助,尽管如此,讲完了这些,让我们再来看看更好的,来写这个程序的一种方法吧,也就是这里,我想这程序也在,你们的课堂手册上面,我得先把这里取消注释,然后注释掉这里,是的,对不对?

    麻省理工公开课 - 计算机科学及编程导论课程节选

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定