hw3

Posted suruoxun

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了hw3相关的知识,希望对你有一定的参考价值。

技术分享图片

2.将MAXPRIMES的值设为4,t2会发生越界错误,t1不会。

3.令n = 1,此时不满足while语句的判断条件,不执行while循环。

4.

点覆盖:{1,2,3,4,5,6,7,5,6,8,9,10,11,12,13,14,15,16}

 

边覆盖:{(1,2),(2,3),(2,12),(3,4),(4,5),(5,6),(6,7),(6,8),(7,5),(8,9), (5,9),(9,10),(9,11),(10,11),(11,2),(12,13),(13,14),(14,15),(15,13), (13,16)}

 

主路径覆盖:{(1,2,3,4,5,6,7),(1,2,3,4,5,6,8,9,10,11),(1,2,3,4,5,6,8,9,11),(1,2,3,4,5,9,10,11),(1,2,3,4,5,9,11),(1,2,12,13,14,15),(1,2,12,13,16),(3,4,5,6,8,9,10,11,2,12,13,14,15),(3,4,5,6,8,9,11,2,12,13,14,15),(3,4,5,6,8,9,10,11,2,12,13,16),(3,4,5,6,8,9,11,2,12,13,16),(3,4,5,9,10,11,2,12,13,14,15),(3,4,5,9,11,2,12,13,14,15),(3,4,5,9,10,11,2,12,13,16),(3,4,5,9,11,2,12,13,16),(6,7,5,9,10,11,2,12,13,14,15),(6,7,5,9,11,2,12,13,14,15),(6,7,5,9,10,11,2,12,13,16),(6,7,5,9,11,2,12,13,16),(14,15,13,16)}

 

5.测试代码

技术分享图片

 测试结果

技术分享图片技术分享图片

 

以上是关于hw3的主要内容,如果未能解决你的问题,请参考以下文章

软件测试技术 hw3

软测hw3

Software Testing -- HW3

[ST2017] Hw3: Prime Path

hw3

hw3