软件测试阶段白盒测试,以如下程序为例,画出其中文程序流程图,并给出至少四种逻辑覆盖标准的测试用例。“ int a,b;e double c;e if(a>0 && b>0) c=c/a代 if(a>1/c>1)( c++ c+=b
时间: 2024-03-22 14:37:58 浏览: 77
以下是程序的中文流程图:
```
+---------+
| 开始 |
+---------+
|
|
| a > 0 && b > 0
|
+---------+
| 步骤1 |
+---------+
|
|
| c = c / a
|
+---------+
| 结束 |
+---------+
|
|
|
| a > 1/c > 1
|
+---------+
| 步骤2 |
+---------+
|
|
| c++
|
|
| c += b
|
+---------+
| 结束 |
+---------+
```
四种逻辑覆盖标准的测试用例如下:
1. a > 0 && b > 0,a = 5,b = 7,c = 2.0
2. a > 0 && b > 0,a = -3,b = 2,c = 5.0
3. a <= 0 || b <= 0
4. a > 1/c > 1,a = 2,b = 3,c = 0.5
阅读全文