摘要: 需测试代码如下 (a)Draw the control flow graph for the printPrime() method. (b)Consider test cases t1 = (n = 3) and t2 = ( n = 5). Although these tour the sam 阅读全文
posted @ 2018-03-26 21:18 tjuky 阅读(185) 评论(0) 推荐(0)
摘要: 初学Junit单元测试,流程如下: 1.使用eclipse编写一个Triangle类来判断三角形种类,为了体现测试结果,刻意添加几处bug package mytest; public class Triangle { private static String result; // 储存结果 pu 阅读全文
posted @ 2018-03-25 17:37 tjuky 阅读(108) 评论(0) 推荐(0)
摘要: 代码1: (1)Fault:for循环中i>0会导致无法查到数组的第一位 (2)测试样例:x=【1,2,3】y=3,在第三位退出循环,执行不到第0位 (3)测试样例:x=null,y=1 (4)测试样例:x=【1,2,3,4】y=5,结果为-1,正确结果也为-1,但包含error 代码2: (1)F 阅读全文
posted @ 2018-03-16 00:06 tjuky 阅读(126) 评论(0) 推荐(0)
摘要: 在刚开始接触算法时,解过一道这样的题 Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence from beg 阅读全文
posted @ 2018-03-12 22:42 tjuky 阅读(180) 评论(0) 推荐(0)