1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
1
00:00:00,080 --> 00:00:02,560
To satisfy our first requirements, we need to find an
2
00:00:02,560 --> 00:00:06,300
input that causes the execution of this statement. Because this statement
3
00:00:06,300 --> 00:00:09,080
is executed only when result is greater than zero, our
4
00:00:09,080 --> 00:00:12,815
test requirement is that a plus b must be greater than
5
00:00:12,815 --> 00:00:16,219
0. When this is satisfied, this statement is executed therefore
6
00:00:16,219 --> 00:00:19,960
any test case that implements this specification will cause the execution
7
00:00:19,960 --> 00:00:22,770
of this statement. Similarly if we want to cover this statement
8
00:00:22,770 --> 00:00:25,220
which is our second requirement we need to have a result
9
00:00:25,220 --> 00:00:27,370
that is less than 0. Again, the result is equal
10
00:00:27,370 --> 00:00:29,490
to a plus b, so all we need to do
11
00:00:29,490 --> 00:00:32,450
is find the test case such that a plus b
12
00:00:32,450 --> 00:00:34,700
is less than 0. So this is pretty straight forward.
|