Problem 1

1. The fault is i > 0, it should be  i >= 0, because if the case is x = [0], y= 0, we expect = 1, but actually, we get -1;

2.  test: x = [], y = 1 does not execute the fault;

3.  test: x = [1,2,3], y = 3 executes the fault, but does not result in an error state;

4.  test: x = [1,2,3], y = 4 results in an error, but not a failure;

Problem 2

1. The fault is for (int i = 0; i < x.length; i++), it should be  for (int i = x.length-1; i >=0; i--), because it just find the fist zero;

2.  test: x = [] does not execute the fault;

3.  test: x = [0] executes the fault, but does not result in an error state;

4.  test: x = [1,2,0] results in an error, but not a failure;

Software Testing Techniques Homework 2的更多相关文章

  1. Software Testing Techniques Homework 3

    1. a.This is the chart b. initial numPrimes = 4, t1 would over the loop. c. t = ( n = 1) d. node cov ...

  2. Software Testing Techniques Homework 1

    I have met some errors in recent years, one of them which impress me most. It happend when I try to ...

  3. Software Testing Techniques LAB 02: Selenium

    1. Installing 1. Install firefox 38.5.1 2. Install SeleniumIDE    After installing, I set the view o ...

  4. Software Testing Techniques LAB 01: test Junit and Eclemma

    1. Installing  1. Install Junit and hamcrest First, I download the Junit-4.12.jar and hamcrest-core- ...

  5. 读书笔记-Software Testing(By Ron Patton)

    Software Testing Part I:The Big Picture 1.Software Testing Background Bug's formal definition 1.The ...

  6. Web Application Penetration Testing Local File Inclusion (LFI) Testing Techniques

    Web Application Penetration Testing Local File Inclusion (LFI) Testing Techniques Jan 04, 2017, Vers ...

  7. 101+ Manual and Automation Software Testing Interview Questions and Answers

    101+ Manual and Automation Software Testing Interview Questions and Answers http://www.softwaretesti ...

  8. Exploratory Software Testing

    最近找到去年上半年看过一本关于测试方面书籍的总结笔记,一直放在我的个人U盘里,当时是用Xmind记录的,现在重新整理下分享给大家了! James A.Whittaker [美] 詹姆斯·惠特克(软件测 ...

  9. 软件测试software testing summarize

    软件测试(英语:software testing),描述一种用来促进鉴定软件的正确性.完整性.安全性和质量的过程.软件测试的经典定义是:在规定的条件下对程序进行操作,以发现程序错误,衡量软件质量,并对 ...

随机推荐

  1. (转)CentOS 7 安装 Docker

    原文:http://www.cnblogs.com/stulzq/p/7743073.html http://www.cnblogs.com/stulzq/p/8629165.html-------- ...

  2. Linux下mysq基础命令(二)

    1. 创建数据库相关命令: mysql> STATUS(\s) - 列出当前mysql的相关状态信息 mysql> SHOW DATABASES; - 显示数据库列表 mysql> ...

  3. Dalvik与JVM区别

    1.Dalvik出现和SDK层面采用java为开发语言的原因 1.1 避免Native作为应用代码导致的因为设备多样化导致App生态了支离破碎,是从Nokia哪里的教训. 1.2 重新实现Dalvik ...

  4. Debugging Ruby in VS Code

    原文  https://dev.to/dnamsons/ruby-debugging-in-vscode-3bkj https://github.com/Microsoft/vscode-recipe ...

  5. 14 线程间协作的两种方式:wait、notify、notifyAll和Condition

    原文链接:http://www.cnblogs.com/dolphin0520/p/3920385.html 在前面我们将了很多关于同步的问题,然而在现实中,需要线程之间的协作.比如说最经典的生产者- ...

  6. JS+Zero Clipboard swf复制到剪贴板 兼容浏览器(bind事件绑定函数)

    转自http://www.ipmtea.net/css_ie_firefox/201107/07_499.html 1.ZeroClipboard其实是国外的一个js类库,源码结构如: var Zer ...

  7. Spring @Transactional踩坑记

    @Transactional踩坑记 总述 ​ Spring在1.2引入@Transactional注解, 该注解的引入使得我们可以简单地通过在方法或者类上添加@Transactional注解,实现事务 ...

  8. xsl 和xml transform方法的调用

    xsl 和xml生成html,兼容多个浏览器 <html> <head> <meta charset="UTF-8"/> </head&g ...

  9. ASP.NET Button控件的UseSubmitBehavior属性引发的血案

    这里先不说标题上的UseSubmitBehavior属性是什么,先说下面这种情况. 通常,在我们写一个表单页面的时候,最下方会有“提交”和“返回”字样的两个按钮.顾名思义,它们的功能大家都知道,但是一 ...

  10. Kinect1驱动 PCL OpenCV ROS 安装

    1. OpenCV安装 1)在终端安装依赖项sudo apt-get install build-essential libgtk2.0-dev libjpeg-dev libtiff4-dev li ...