今天写下午的题
第一题 白盒测试题型
考点1:覆盖语句设计逻辑
1.设计足够的测试用例,使得程序中的每个判定至少都获得一次“真值”或“假值”,或者说使得程序中的每一个取“真”分支和取“假”分支至少经历一次,因此判定覆盖又称分支覆盖
问题1答:
1.month>=1&&month<=12
2.month<1||month>12
3.month==2
4.(month>=1&&month<=12)&&month!=2
5.month==2&&year%4==0
6.month==2&&year%4!=0
7.month==2&&year%4==0&&year%100==0
8.month==2&&year%4==0&&year%100==0&&year%400==0
9.month==2&&year%4==0&&year%100==0&&year%400!=0
10.mo