一、对一个方法进行测试 1)画出此方法的控制流图 2)T1 : n = 3 ;T2 : n = 5; 设计一个 Fault 使T2 能发现,T1不能发现: 答: 将 if ( isDivisible(primes[i],curPrime) 修改 为 if ( isDivisible(primes[0 ...
分类:
其他好文 时间:
2016-03-30 01:40:41
阅读次数:
234
今天在hanoi问题上出现了segmentation fault 在gcc编译的过程中 没出现error,然而程序运行到一半就出现segmentation fault; 上网发现 这条语句是非法的内存操作,如数组越界(申请了a[5],结果使用了a[6]), 检测发现是我的被调用函数 void han
分类:
其他好文 时间:
2016-03-19 01:02:58
阅读次数:
529
1. RCNN: Rich feature hierarchies for accurate object detection and semantic segmentation 三个主要的模块: The first generates category-independent region pro
分类:
其他好文 时间:
2016-03-12 21:12:59
阅读次数:
272
1、(1)fault:由i>0知,i不可能为0,所以不可能得到期望值0,应该为 i >= 0 (2) 不执行故障测试用例 :x=[]; y=2 期望值=-1 (3) 执行故障不导致错误用例 : x=[3,2,5]; y=2 期望值=1 (4)导致错误但不是失败结果的用例: x=[1,3,5]; y=
分类:
其他好文 时间:
2016-03-10 01:34:29
阅读次数:
140
Fault的定义:可能导致系统或功能失效的异常条件(Abnormal condition that can cause an element or an item tofail.),可译为“故障”。 Error的定义:计算、观察或测量值或条件,与真实、规定或理论上正确的值或条件之间的差异(Discr
分类:
其他好文 时间:
2016-03-09 23:50:34
阅读次数:
489
Fault的定义:可能导致系统或功能失效的异常条件(Abnormal condition that can cause an element or an item tofail.),可译为“故障”。 Error的定义:计算、观察或测量值或条件,与真实、规定或理论上正确的值或条件之间的差异(Discr
分类:
其他好文 时间:
2016-03-09 23:50:33
阅读次数:
154
1, findLast() (1) The fault is that the state of the loop should be: for(int i = x.length-1;i >= 0;i--) Because if the expected index is in x[0], when
分类:
其他好文 时间:
2016-03-09 12:24:36
阅读次数:
173
知识点内容回顾: 主要介绍了三个概念之间的区别 首先说最根本问题 Fault,什么事falut呢,代码中存在的问题,也就是和运行环境啊什么的没关系,你的代码就是有问题的,换句话说,你的实现是有问题的,但是这个问题不一定会被触发也不一定会导致error,但是无论是否导致了error都是有fault的。
分类:
其他好文 时间:
2016-03-09 01:42:49
阅读次数:
153
Code 1 1.fault是迭代的条件应该是 i >= 0 而不是 i > 0 2.当测试用例是 [3,2,1],1 时。 3.当测试用例是 [2,3,4],1 。 4.当测试用例是 [2],1 。 Code 2 1.fault是应该逆序迭代,正确为for(int i = x.length-1;i
分类:
其他好文 时间:
2016-03-08 23:51:37
阅读次数:
154
观察两段代码并回答下列问题: (1) 发现错误代码; (2) 试着编写测试用例,不执行fault部分; (3) 执行fault部分,但不出现error情况; (4) 出现error情况,但不发生failure。 代码一: public int findLast (int[] x, int y) {
分类:
其他好文 时间:
2016-03-08 23:41:59
阅读次数:
164