test homework2 ~ faulty program
Program1:
The fault is : for(int i=x.length-1;i>0;i--) border question
We should change i>0 into i>=0
identify a test case that does not execute the fault:x=null throw exception
identify a test case that executes the fault, but does not result in an error state: x[3]={2,3,5} y=5
identify a test case that results in an error, but not a failure: x[3]={2,3,5} y=6
program2:
The fault is : for(int i=0;i<x.length;i++) it is a logic error, searching order is wrong
We should change it into for(int i=x.length-1; i>=0;i--)
identify a test case that does not execute the fault: x=null throw exception
identify a test case that executes the fault, but does not result in an error state: x[1]={0}
identify a test case that results in an error, but not a failure: x[3]={2,3,5}
test homework2 ~ faulty program的更多相关文章
- Reading List on Automated Program Repair
Some resources: https://www.monperrus.net/martin/automatic-software-repair 2017 [ ] DeepFix: Fixing ...
- 【BFS】Tester Program
[poj1024]Tester Program Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 2760 Accepted ...
- URAL 2081 Faulty dial
题目: Faulty dial Pavel has not played ACM for ages, nor does he train teams, nor prepare problems. Th ...
- [project euler] program 4
上一次接触 project euler 还是2011年的事情,做了前三道题,后来被第四题卡住了,前面几题的代码也没有保留下来. 今天试着暴力破解了一下,代码如下: (我大概是第 172,719 个解出 ...
- Solved: “Cannot execute a program. The command being executed was \roslyn\csc.exe”
When you publish your ASP.NET project to a hosting account such as GoDaddy, you may run into the iss ...
- 关于The C compiler "arm-none-eabi-gcc" is not able to compile a simple test program. 的错误自省...
在 GCC ARM Embedded https://launchpad.net/gcc-arm-embedded/ 上面下载了个arm-none-eabi-gcc 用cmake 编译时 #指定C交叉 ...
- c中使用gets() 提示warning: this program uses gets(), which is unsafe.
今天在C代码中使用gets()时提示“warning: this program uses gets(), which is unsafe.”,然后这个程序还能运行,无聊的我开始查阅资料,为啥gets ...
- Unable to load R3 module D:\Program Files\Oracle\VirtualBox/VBoxDD.DLL (VBoxDD): GetLastError=1790 (VERR_UNRESOLVED_ERROR).
Unable to load R3 module D:\Program Files\Oracle\VirtualBox/VBoxDD.DLL (VBoxDD): GetLastError=1790 ( ...
- Git for Windows - The Program can't start because libiconv2.dll is missing
今天在新装的win10 预览版上面,发现git不能启动了,提示信息主要是: The Program can't start because libiconv2.dll is missing 于是我在网 ...
随机推荐
- js的高级知识---词法分析
词法分析 词法分析方法: js运行前有一个类似编译的过程即词法分析,词法分析主要有三个步骤: 分析参数 再分析变量的声明 分析函数说明 具体步骤如下: 函数在运行的瞬间,生成一个活动对象(Active ...
- ASP.NET Core – 2300% More Requests Served Per Second
http://www.ageofascent.com/asp-net-core-exeeds-1-15-million-requests-12-6-gbps/ ASP.NET Core – Excee ...
- Rational Rose2007下载安装教程以及问题处理
Rational Rose2007详细安装步骤 学习了UML,那么Rational rose画图软件当然就是必不可少的了.我的电脑是win7 64位的系统.下面的链接是安装软件以及破解方法.该软件是B ...
- android 案例二 登录界面
效果图: 运行图: 总结: 编写这个简单的用户登录界面,主要用到了以下的知识: java基础中的IO流的操作 用以读取.显示用户的信息 Android布局 线性布局和相对布局 数据的存储选在包 ...
- SQLServer2008R2企业版密匙
SQLServer2008R2企业版密匙: R88PF-GMCFT-KM2KR-4R7GB-43K4B
- final阶段团队贡献分分配
小组名称:nice! 小组成员:李权 于淼 刘芳芳 韩媛媛 宫丽君 项目内容:约跑app 代码git的地址:https://git.coding.net/muziliquan/niceGroup.gi ...
- Centos 6.5安装bugzilla 5.0.2
1. 下载bugzilla 下载地址:https://ftp.mozilla.org/pub/webtools/ 因为我在github上搜了一下“bugzilla cn”提示有中文语言包就下了5.0. ...
- Android USB Host与HID通讯
前端时间捣鼓一个HID的硬件, 需要和android通信, 网上搜索了一圈,收获不小. 比较好的文章是: Android USB Host与HID通讯 Android Service创建US ...
- 用node.js给图片加水印
一.准备工作: 首先,确保你本地已经安装好了node环境.然后,我们进行图像编辑操作需要用到一个Node.js的库:images.这个库的地址是:https://github.com/zhangyua ...
- font-family:“微软雅黑” OR font-family:Microsoft Yahei
sublime对中文编码支持的不好,可以考虑用后者.