)所以,要去除测试代码(test code)和产品代码(production code)中的任何冗余。例如去除冗余的幻数(magic numbers)和字符串(strings),从而使2.3中写的代码通过。
基于104个网页-相关网页
Engine test code 发动机试验规程 ; 发动机试验规范 ; 发动机试车法规 ; 发动机的试验规程
hit-test code 点击测试程序代码 ; 点击测试代码
Performance test code 压力释放装置 ; 性能测试规范
Test code for machine tools 机床检验通则 ; 机床试验规程 ; 机床试验法规 ; 机床验收规则
Noise test code 噪声试验规程 ; 噪声检测规则 ; 噪声试验规范
Unit test code 单元测试码
system test code 由系统测试代码 ; 由系统测试码
Test code and procedures 试验规范和程序 ; 试验规范和步骤
Utilities and Test Code 工具和测试代码
Write your test code for the model.
为模型编写测试代码。
The test code is shown in Listing 2.
测试代码如清单 2 所示
The updated test code is shown in Listing 6.
更新后的测试代码如清单 6 所示。
That was the kind of thing you saw. Asserts said here are some conditions to test. If they're true, I'm going to let the rest of the code run.
这就是你看到的,断言是一些测试条件,如果他们为真。
Important lesson, so that there would be some predictability in the results and I would have some, if you will, smoke test for knowing whether or not I was getting, my code seemed to be working.
这很重要,因为这样我就可以预测,结果会是多少了,如果你愿意,我们可以做烟气试验,来看我的代码是否工作正常。
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.
第一点,当我们写代码的时候,尤其是一些含有分支语句的代码的时候,当我为这些代码,设计测试用例的时候,我应该为每一个可能的程序路径,都设计一个特别的用例。
应用推荐