Skip to content

Commit 80c1cbf

Browse files
committed
tests(coverage): Bless mcdc_non_control_flow tests
1 parent 6f39e6f commit 80c1cbf

File tree

2 files changed

+147
-38
lines changed

2 files changed

+147
-38
lines changed

tests/coverage/mcdc_non_control_flow.cov-map

+34-29
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Function name: mcdc_non_control_flow::assign_3
2-
Raw bytes (73): 0x[01, 01, 09, 05, 07, 0b, 11, 09, 0d, 01, 05, 01, 05, 22, 11, 01, 05, 22, 11, 01, 05, 09, 01, 13, 01, 00, 28, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 20, 05, 22, 00, 0d, 00, 0e, 22, 00, 12, 00, 13, 20, 1e, 11, 00, 12, 00, 13, 1e, 00, 17, 00, 18, 20, 09, 0d, 00, 17, 00, 18, 03, 01, 05, 01, 02]
2+
Raw bytes (89): 0x[01, 01, 09, 05, 07, 0b, 11, 09, 0d, 01, 05, 01, 05, 22, 11, 01, 05, 22, 11, 01, 05, 0a, 01, 13, 01, 00, 28, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 00, 03, 00, 0d, 00, 18, 30, 05, 22, 01, 00, 02, 00, 0d, 00, 0e, 22, 00, 12, 00, 13, 30, 1e, 11, 02, 03, 00, 00, 12, 00, 13, 1e, 00, 17, 00, 18, 30, 09, 0d, 03, 00, 00, 00, 17, 00, 18, 03, 01, 05, 01, 02]
33
Number of files: 1
44
- file 0 => global file 1
55
Number of expressions: 9
@@ -12,29 +12,30 @@ Number of expressions: 9
1212
- expression 6 operands: lhs = Counter(0), rhs = Counter(1)
1313
- expression 7 operands: lhs = Expression(8, Sub), rhs = Counter(4)
1414
- expression 8 operands: lhs = Counter(0), rhs = Counter(1)
15-
Number of file 0 mappings: 9
15+
Number of file 0 mappings: 10
1616
- Code(Counter(0)) at (prev + 19, 1) to (start + 0, 40)
1717
- Code(Expression(0, Add)) at (prev + 1, 9) to (start + 0, 10)
1818
= (c1 + ((c2 + c3) + c4))
1919
- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
20-
- Branch { true: Counter(1), false: Expression(8, Sub) } at (prev + 0, 13) to (start + 0, 14)
20+
- MCDCDecision { bitmap_idx: 0, conditions_num: 3 } at (prev + 0, 13) to (start + 0, 24)
21+
- MCDCBranch { true: Counter(1), false: Expression(8, Sub), condition_id: 1, true_next_id: 0, false_next_id: 2 } at (prev + 0, 13) to (start + 0, 14)
2122
true = c1
2223
false = (c0 - c1)
2324
- Code(Expression(8, Sub)) at (prev + 0, 18) to (start + 0, 19)
2425
= (c0 - c1)
25-
- Branch { true: Expression(7, Sub), false: Counter(4) } at (prev + 0, 18) to (start + 0, 19)
26+
- MCDCBranch { true: Expression(7, Sub), false: Counter(4), condition_id: 2, true_next_id: 3, false_next_id: 0 } at (prev + 0, 18) to (start + 0, 19)
2627
true = ((c0 - c1) - c4)
2728
false = c4
2829
- Code(Expression(7, Sub)) at (prev + 0, 23) to (start + 0, 24)
2930
= ((c0 - c1) - c4)
30-
- Branch { true: Counter(2), false: Counter(3) } at (prev + 0, 23) to (start + 0, 24)
31+
- MCDCBranch { true: Counter(2), false: Counter(3), condition_id: 3, true_next_id: 0, false_next_id: 0 } at (prev + 0, 23) to (start + 0, 24)
3132
true = c2
3233
false = c3
3334
- Code(Expression(0, Add)) at (prev + 1, 5) to (start + 1, 2)
3435
= (c1 + ((c2 + c3) + c4))
3536

3637
Function name: mcdc_non_control_flow::assign_3_bis
37-
Raw bytes (82): 0x[01, 01, 07, 07, 11, 09, 0d, 01, 05, 05, 09, 16, 1a, 05, 09, 01, 05, 0a, 01, 18, 01, 00, 2c, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 00, 02, 00, 0d, 00, 13, 30, 05, 1a, 01, 02, 00, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 30, 09, 16, 02, 00, 00, 00, 12, 00, 13, 13, 00, 17, 00, 18, 20, 0d, 11, 00, 17, 00, 18, 03, 01, 05, 01, 02]
38+
Raw bytes (85): 0x[01, 01, 07, 07, 11, 09, 0d, 01, 05, 05, 09, 16, 1a, 05, 09, 01, 05, 0a, 01, 18, 01, 00, 2c, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 00, 03, 00, 0d, 00, 18, 30, 05, 1a, 01, 03, 02, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 30, 09, 16, 03, 00, 02, 00, 12, 00, 13, 13, 00, 17, 00, 18, 30, 0d, 11, 02, 00, 00, 00, 17, 00, 18, 03, 01, 05, 01, 02]
3839
Number of files: 1
3940
- file 0 => global file 1
4041
Number of expressions: 7
@@ -50,66 +51,68 @@ Number of file 0 mappings: 10
5051
- Code(Expression(0, Add)) at (prev + 1, 9) to (start + 0, 10)
5152
= ((c2 + c3) + c4)
5253
- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
53-
- MCDCDecision { bitmap_idx: 0, conditions_num: 2 } at (prev + 0, 13) to (start + 0, 19)
54-
- MCDCBranch { true: Counter(1), false: Expression(6, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
54+
- MCDCDecision { bitmap_idx: 0, conditions_num: 3 } at (prev + 0, 13) to (start + 0, 24)
55+
- MCDCBranch { true: Counter(1), false: Expression(6, Sub), condition_id: 1, true_next_id: 3, false_next_id: 2 } at (prev + 0, 13) to (start + 0, 14)
5556
true = c1
5657
false = (c0 - c1)
5758
- Code(Counter(1)) at (prev + 0, 18) to (start + 0, 19)
58-
- MCDCBranch { true: Counter(2), false: Expression(5, Sub), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 18) to (start + 0, 19)
59+
- MCDCBranch { true: Counter(2), false: Expression(5, Sub), condition_id: 3, true_next_id: 0, false_next_id: 2 } at (prev + 0, 18) to (start + 0, 19)
5960
true = c2
6061
false = (c1 - c2)
6162
- Code(Expression(4, Add)) at (prev + 0, 23) to (start + 0, 24)
6263
= ((c1 - c2) + (c0 - c1))
63-
- Branch { true: Counter(3), false: Counter(4) } at (prev + 0, 23) to (start + 0, 24)
64+
- MCDCBranch { true: Counter(3), false: Counter(4), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 23) to (start + 0, 24)
6465
true = c3
6566
false = c4
6667
- Code(Expression(0, Add)) at (prev + 1, 5) to (start + 1, 2)
6768
= ((c2 + c3) + c4)
6869

6970
Function name: mcdc_non_control_flow::assign_and
70-
Raw bytes (51): 0x[01, 01, 04, 07, 0e, 09, 0d, 01, 05, 01, 05, 07, 01, 09, 01, 00, 21, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 20, 05, 0e, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 20, 09, 0d, 00, 12, 00, 13, 03, 01, 05, 01, 02]
71+
Raw bytes (64): 0x[01, 01, 04, 07, 0e, 09, 0d, 01, 05, 01, 05, 08, 01, 09, 01, 00, 21, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 00, 02, 00, 0d, 00, 13, 30, 05, 0e, 01, 02, 00, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 30, 09, 0d, 02, 00, 00, 00, 12, 00, 13, 03, 01, 05, 01, 02]
7172
Number of files: 1
7273
- file 0 => global file 1
7374
Number of expressions: 4
7475
- expression 0 operands: lhs = Expression(1, Add), rhs = Expression(3, Sub)
7576
- expression 1 operands: lhs = Counter(2), rhs = Counter(3)
7677
- expression 2 operands: lhs = Counter(0), rhs = Counter(1)
7778
- expression 3 operands: lhs = Counter(0), rhs = Counter(1)
78-
Number of file 0 mappings: 7
79+
Number of file 0 mappings: 8
7980
- Code(Counter(0)) at (prev + 9, 1) to (start + 0, 33)
8081
- Code(Expression(0, Add)) at (prev + 1, 9) to (start + 0, 10)
8182
= ((c2 + c3) + (c0 - c1))
8283
- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
83-
- Branch { true: Counter(1), false: Expression(3, Sub) } at (prev + 0, 13) to (start + 0, 14)
84+
- MCDCDecision { bitmap_idx: 0, conditions_num: 2 } at (prev + 0, 13) to (start + 0, 19)
85+
- MCDCBranch { true: Counter(1), false: Expression(3, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
8486
true = c1
8587
false = (c0 - c1)
8688
- Code(Counter(1)) at (prev + 0, 18) to (start + 0, 19)
87-
- Branch { true: Counter(2), false: Counter(3) } at (prev + 0, 18) to (start + 0, 19)
89+
- MCDCBranch { true: Counter(2), false: Counter(3), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 18) to (start + 0, 19)
8890
true = c2
8991
false = c3
9092
- Code(Expression(0, Add)) at (prev + 1, 5) to (start + 1, 2)
9193
= ((c2 + c3) + (c0 - c1))
9294

9395
Function name: mcdc_non_control_flow::assign_or
94-
Raw bytes (51): 0x[01, 01, 04, 07, 0d, 05, 09, 01, 05, 01, 05, 07, 01, 0e, 01, 00, 20, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 20, 05, 0e, 00, 0d, 00, 0e, 0e, 00, 12, 00, 13, 20, 09, 0d, 00, 12, 00, 13, 03, 01, 05, 01, 02]
96+
Raw bytes (64): 0x[01, 01, 04, 07, 0d, 05, 09, 01, 05, 01, 05, 08, 01, 0e, 01, 00, 20, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 00, 02, 00, 0d, 00, 13, 30, 05, 0e, 01, 00, 02, 00, 0d, 00, 0e, 0e, 00, 12, 00, 13, 30, 09, 0d, 02, 00, 00, 00, 12, 00, 13, 03, 01, 05, 01, 02]
9597
Number of files: 1
9698
- file 0 => global file 1
9799
Number of expressions: 4
98100
- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(3)
99101
- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
100102
- expression 2 operands: lhs = Counter(0), rhs = Counter(1)
101103
- expression 3 operands: lhs = Counter(0), rhs = Counter(1)
102-
Number of file 0 mappings: 7
104+
Number of file 0 mappings: 8
103105
- Code(Counter(0)) at (prev + 14, 1) to (start + 0, 32)
104106
- Code(Expression(0, Add)) at (prev + 1, 9) to (start + 0, 10)
105107
= ((c1 + c2) + c3)
106108
- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
107-
- Branch { true: Counter(1), false: Expression(3, Sub) } at (prev + 0, 13) to (start + 0, 14)
109+
- MCDCDecision { bitmap_idx: 0, conditions_num: 2 } at (prev + 0, 13) to (start + 0, 19)
110+
- MCDCBranch { true: Counter(1), false: Expression(3, Sub), condition_id: 1, true_next_id: 0, false_next_id: 2 } at (prev + 0, 13) to (start + 0, 14)
108111
true = c1
109112
false = (c0 - c1)
110113
- Code(Expression(3, Sub)) at (prev + 0, 18) to (start + 0, 19)
111114
= (c0 - c1)
112-
- Branch { true: Counter(2), false: Counter(3) } at (prev + 0, 18) to (start + 0, 19)
115+
- MCDCBranch { true: Counter(2), false: Counter(3), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 18) to (start + 0, 19)
113116
true = c2
114117
false = c3
115118
- Code(Expression(0, Add)) at (prev + 1, 5) to (start + 1, 2)
@@ -124,27 +127,28 @@ Number of file 0 mappings: 1
124127
- Code(Counter(0)) at (prev + 34, 1) to (start + 2, 2)
125128

126129
Function name: mcdc_non_control_flow::func_call
127-
Raw bytes (39): 0x[01, 01, 03, 01, 05, 0b, 02, 09, 0d, 05, 01, 26, 01, 01, 0a, 20, 05, 02, 01, 09, 00, 0a, 05, 00, 0e, 00, 0f, 20, 09, 0d, 00, 0e, 00, 0f, 07, 01, 01, 00, 02]
130+
Raw bytes (52): 0x[01, 01, 03, 01, 05, 0b, 02, 09, 0d, 06, 01, 26, 01, 01, 0a, 28, 00, 02, 01, 09, 00, 0f, 30, 05, 02, 01, 02, 00, 00, 09, 00, 0a, 05, 00, 0e, 00, 0f, 30, 09, 0d, 02, 00, 00, 00, 0e, 00, 0f, 07, 01, 01, 00, 02]
128131
Number of files: 1
129132
- file 0 => global file 1
130133
Number of expressions: 3
131134
- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
132135
- expression 1 operands: lhs = Expression(2, Add), rhs = Expression(0, Sub)
133136
- expression 2 operands: lhs = Counter(2), rhs = Counter(3)
134-
Number of file 0 mappings: 5
137+
Number of file 0 mappings: 6
135138
- Code(Counter(0)) at (prev + 38, 1) to (start + 1, 10)
136-
- Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 1, 9) to (start + 0, 10)
139+
- MCDCDecision { bitmap_idx: 0, conditions_num: 2 } at (prev + 1, 9) to (start + 0, 15)
140+
- MCDCBranch { true: Counter(1), false: Expression(0, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 9) to (start + 0, 10)
137141
true = c1
138142
false = (c0 - c1)
139143
- Code(Counter(1)) at (prev + 0, 14) to (start + 0, 15)
140-
- Branch { true: Counter(2), false: Counter(3) } at (prev + 0, 14) to (start + 0, 15)
144+
- MCDCBranch { true: Counter(2), false: Counter(3), condition_id: 2, true_next_id: 0, false_next_id: 0 } at (prev + 0, 14) to (start + 0, 15)
141145
true = c2
142146
false = c3
143147
- Code(Expression(1, Add)) at (prev + 1, 1) to (start + 0, 2)
144148
= ((c2 + c3) + (c0 - c1))
145149

146150
Function name: mcdc_non_control_flow::right_comb_tree
147-
Raw bytes (117): 0x[01, 01, 13, 07, 1a, 0b, 19, 0f, 15, 13, 11, 09, 0d, 01, 05, 01, 05, 05, 19, 05, 19, 4a, 15, 05, 19, 4a, 15, 05, 19, 46, 11, 4a, 15, 05, 19, 46, 11, 4a, 15, 05, 19, 0d, 01, 1d, 01, 00, 41, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 20, 05, 1a, 00, 0d, 00, 0e, 05, 00, 13, 00, 14, 20, 4a, 19, 00, 13, 00, 14, 4a, 00, 19, 00, 1a, 20, 46, 15, 00, 19, 00, 1a, 46, 00, 1f, 00, 20, 20, 42, 11, 00, 1f, 00, 20, 42, 00, 24, 00, 27, 20, 09, 0d, 00, 24, 00, 27, 03, 01, 05, 01, 02]
151+
Raw bytes (139): 0x[01, 01, 13, 07, 1a, 0b, 19, 0f, 15, 13, 11, 09, 0d, 01, 05, 01, 05, 05, 19, 05, 19, 4a, 15, 05, 19, 4a, 15, 05, 19, 46, 11, 4a, 15, 05, 19, 46, 11, 4a, 15, 05, 19, 0e, 01, 1d, 01, 00, 41, 03, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 00, 05, 00, 0d, 00, 2a, 30, 05, 1a, 01, 02, 00, 00, 0d, 00, 0e, 05, 00, 13, 00, 14, 30, 4a, 19, 02, 03, 00, 00, 13, 00, 14, 4a, 00, 19, 00, 1a, 30, 46, 15, 03, 04, 00, 00, 19, 00, 1a, 46, 00, 1f, 00, 20, 30, 42, 11, 04, 05, 00, 00, 1f, 00, 20, 42, 00, 24, 00, 27, 30, 09, 0d, 05, 00, 00, 00, 24, 00, 27, 03, 01, 05, 01, 02]
148152
Number of files: 1
149153
- file 0 => global file 1
150154
Number of expressions: 19
@@ -167,31 +171,32 @@ Number of expressions: 19
167171
- expression 16 operands: lhs = Expression(17, Sub), rhs = Counter(4)
168172
- expression 17 operands: lhs = Expression(18, Sub), rhs = Counter(5)
169173
- expression 18 operands: lhs = Counter(1), rhs = Counter(6)
170-
Number of file 0 mappings: 13
174+
Number of file 0 mappings: 14
171175
- Code(Counter(0)) at (prev + 29, 1) to (start + 0, 65)
172176
- Code(Expression(0, Add)) at (prev + 1, 9) to (start + 0, 10)
173177
= (((((c2 + c3) + c4) + c5) + c6) + (c0 - c1))
174178
- Code(Counter(0)) at (prev + 0, 13) to (start + 0, 14)
175-
- Branch { true: Counter(1), false: Expression(6, Sub) } at (prev + 0, 13) to (start + 0, 14)
179+
- MCDCDecision { bitmap_idx: 0, conditions_num: 5 } at (prev + 0, 13) to (start + 0, 42)
180+
- MCDCBranch { true: Counter(1), false: Expression(6, Sub), condition_id: 1, true_next_id: 2, false_next_id: 0 } at (prev + 0, 13) to (start + 0, 14)
176181
true = c1
177182
false = (c0 - c1)
178183
- Code(Counter(1)) at (prev + 0, 19) to (start + 0, 20)
179-
- Branch { true: Expression(18, Sub), false: Counter(6) } at (prev + 0, 19) to (start + 0, 20)
184+
- MCDCBranch { true: Expression(18, Sub), false: Counter(6), condition_id: 2, true_next_id: 3, false_next_id: 0 } at (prev + 0, 19) to (start + 0, 20)
180185
true = (c1 - c6)
181186
false = c6
182187
- Code(Expression(18, Sub)) at (prev + 0, 25) to (start + 0, 26)
183188
= (c1 - c6)
184-
- Branch { true: Expression(17, Sub), false: Counter(5) } at (prev + 0, 25) to (start + 0, 26)
189+
- MCDCBranch { true: Expression(17, Sub), false: Counter(5), condition_id: 3, true_next_id: 4, false_next_id: 0 } at (prev + 0, 25) to (start + 0, 26)
185190
true = ((c1 - c6) - c5)
186191
false = c5
187192
- Code(Expression(17, Sub)) at (prev + 0, 31) to (start + 0, 32)
188193
= ((c1 - c6) - c5)
189-
- Branch { true: Expression(16, Sub), false: Counter(4) } at (prev + 0, 31) to (start + 0, 32)
194+
- MCDCBranch { true: Expression(16, Sub), false: Counter(4), condition_id: 4, true_next_id: 5, false_next_id: 0 } at (prev + 0, 31) to (start + 0, 32)
190195
true = (((c1 - c6) - c5) - c4)
191196
false = c4
192197
- Code(Expression(16, Sub)) at (prev + 0, 36) to (start + 0, 39)
193198
= (((c1 - c6) - c5) - c4)
194-
- Branch { true: Counter(2), false: Counter(3) } at (prev + 0, 36) to (start + 0, 39)
199+
- MCDCBranch { true: Counter(2), false: Counter(3), condition_id: 5, true_next_id: 0, false_next_id: 0 } at (prev + 0, 36) to (start + 0, 39)
195200
true = c2
196201
false = c3
197202
- Code(Expression(0, Add)) at (prev + 1, 5) to (start + 1, 2)

tests/coverage/mcdc_non_control_flow.coverage

+113-9
Original file line numberDiff line numberDiff line change
@@ -9,41 +9,101 @@
99
LL| 3|fn assign_and(a: bool, b: bool) {
1010
LL| 3| let x = a && b;
1111
^2
12+
------------------
13+
|---> MC/DC Decision Region (LL:13) to (LL:19)
14+
|
15+
| Number of Conditions: 2
16+
| Condition C1 --> (LL:13)
17+
| Condition C2 --> (LL:18)
18+
|
19+
| Executed MC/DC Test Vectors:
20+
|
21+
| C1, C2 Result
22+
| 1 { F, - = F }
23+
| 2 { T, F = F }
24+
| 3 { T, T = T }
25+
|
26+
| C1-Pair: covered: (1,3)
27+
| C2-Pair: covered: (2,3)
28+
| MC/DC Coverage for Decision: 100.00%
29+
|
30+
------------------
1231
LL| 3| black_box(x);
1332
LL| 3|}
1433
LL| |
1534
LL| 3|fn assign_or(a: bool, b: bool) {
1635
LL| 3| let x = a || b;
1736
^1
37+
------------------
38+
|---> MC/DC Decision Region (LL:13) to (LL:19)
39+
|
40+
| Number of Conditions: 2
41+
| Condition C1 --> (LL:13)
42+
| Condition C2 --> (LL:18)
43+
|
44+
| Executed MC/DC Test Vectors:
45+
|
46+
| C1, C2 Result
47+
| 1 { F, F = F }
48+
| 2 { T, - = T }
49+
|
50+
| C1-Pair: covered: (1,2)
51+
| C2-Pair: not covered
52+
| MC/DC Coverage for Decision: 50.00%
53+
|
54+
------------------
1855
LL| 3| black_box(x);
1956
LL| 3|}
2057
LL| |
2158
LL| 4|fn assign_3(a: bool, b: bool, c: bool) {
2259
LL| 4| let x = a || b && c;
2360
^2 ^1
61+
------------------
62+
|---> MC/DC Decision Region (LL:13) to (LL:24)
63+
|
64+
| Number of Conditions: 3
65+
| Condition C1 --> (LL:13)
66+
| Condition C2 --> (LL:18)
67+
| Condition C3 --> (LL:23)
68+
|
69+
| Executed MC/DC Test Vectors:
70+
|
71+
| C1, C2, C3 Result
72+
| 1 { F, F, - = F }
73+
| 2 { T, -, - = T }
74+
| 3 { F, T, T = T }
75+
|
76+
| C1-Pair: covered: (1,2)
77+
| C2-Pair: covered: (1,3)
78+
| C3-Pair: not covered
79+
| MC/DC Coverage for Decision: 66.67%
80+
|
81+
------------------
2482
LL| 4| black_box(x);
2583
LL| 4|}
2684
LL| |
2785
LL| 4|fn assign_3_bis(a: bool, b: bool, c: bool) {
2886
LL| 4| let x = a && b || c;
2987
^2 ^3
3088
------------------
31-
|---> MC/DC Decision Region (LL:13) to (LL:19)
89+
|---> MC/DC Decision Region (LL:13) to (LL:24)
3290
|
33-
| Number of Conditions: 2
91+
| Number of Conditions: 3
3492
| Condition C1 --> (LL:13)
3593
| Condition C2 --> (LL:18)
94+
| Condition C3 --> (LL:23)
3695
|
3796
| Executed MC/DC Test Vectors:
3897
|
39-
| C1, C2 Result
40-
| 1 { F, - = F }
41-
| 2 { T, F = F }
42-
| 3 { T, T = T }
98+
| C1, C2, C3 Result
99+
| 1 { T, F, F = F }
100+
| 2 { F, -, T = T }
101+
| 3 { T, T, - = T }
43102
|
44-
| C1-Pair: covered: (1,3)
45-
| C2-Pair: covered: (2,3)
46-
| MC/DC Coverage for Decision: 100.00%
103+
| C1-Pair: not covered
104+
| C2-Pair: covered: (1,3)
105+
| C3-Pair: not covered
106+
| MC/DC Coverage for Decision: 33.33%
47107
|
48108
------------------
49109
LL| 4| black_box(x);
@@ -52,6 +112,31 @@
52112
LL| 3|fn right_comb_tree(a: bool, b: bool, c: bool, d: bool, e: bool) {
53113
LL| 3| let x = a && (b && (c && (d && (e))));
54114
^2 ^1 ^1 ^1
115+
------------------
116+
|---> MC/DC Decision Region (LL:13) to (LL:42)
117+
|
118+
| Number of Conditions: 5
119+
| Condition C1 --> (LL:13)
120+
| Condition C2 --> (LL:19)
121+
| Condition C3 --> (LL:25)
122+
| Condition C4 --> (LL:31)
123+
| Condition C5 --> (LL:36)
124+
|
125+
| Executed MC/DC Test Vectors:
126+
|
127+
| C1, C2, C3, C4, C5 Result
128+
| 1 { F, -, -, -, - = F }
129+
| 2 { T, F, -, -, - = F }
130+
| 3 { T, T, T, T, T = T }
131+
|
132+
| C1-Pair: covered: (1,3)
133+
| C2-Pair: covered: (2,3)
134+
| C3-Pair: not covered
135+
| C4-Pair: not covered
136+
| C5-Pair: not covered
137+
| MC/DC Coverage for Decision: 40.00%
138+
|
139+
------------------
55140
LL| 3| black_box(x);
56141
LL| 3|}
57142
LL| |
@@ -62,6 +147,25 @@
62147
LL| 3|fn func_call(a: bool, b: bool) {
63148
LL| 3| foo(a && b);
64149
^2
150+
------------------
151+
|---> MC/DC Decision Region (LL:9) to (LL:15)
152+
|
153+
| Number of Conditions: 2
154+
| Condition C1 --> (LL:9)
155+
| Condition C2 --> (LL:14)
156+
|
157+
| Executed MC/DC Test Vectors:
158+
|
159+
| C1, C2 Result
160+
| 1 { F, - = F }
161+
| 2 { T, F = F }
162+
| 3 { T, T = T }
163+
|
164+
| C1-Pair: covered: (1,3)
165+
| C2-Pair: covered: (2,3)
166+
| MC/DC Coverage for Decision: 100.00%
167+
|
168+
------------------
65169
LL| 3|}
66170
LL| |
67171
LL| |

0 commit comments

Comments
 (0)