Skip to content

Commit e15adef

Browse files
committed
tests(coverage): Bless mcdc_non_control_flow tests
1 parent 6c7c824 commit e15adef

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, 16, 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, 16, 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 + 22, 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, 1b, 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, 1b, 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, 0c, 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, 0c, 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 + 12, 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, 11, 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, 11, 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 + 17, 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 + 37, 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, 29, 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, 29, 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 + 41, 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, 20, 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, 20, 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 + 32, 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
@@ -12,41 +12,101 @@
1212
LL| 3|fn assign_and(a: bool, b: bool) {
1313
LL| 3| let x = a && b;
1414
^2
15+
------------------
16+
|---> MC/DC Decision Region (LL:13) to (LL:19)
17+
|
18+
| Number of Conditions: 2
19+
| Condition C1 --> (LL:13)
20+
| Condition C2 --> (LL:18)
21+
|
22+
| Executed MC/DC Test Vectors:
23+
|
24+
| C1, C2 Result
25+
| 1 { F, - = F }
26+
| 2 { T, F = F }
27+
| 3 { T, T = T }
28+
|
29+
| C1-Pair: covered: (1,3)
30+
| C2-Pair: covered: (2,3)
31+
| MC/DC Coverage for Decision: 100.00%
32+
|
33+
------------------
1534
LL| 3| black_box(x);
1635
LL| 3|}
1736
LL| |
1837
LL| 3|fn assign_or(a: bool, b: bool) {
1938
LL| 3| let x = a || b;
2039
^1
40+
------------------
41+
|---> MC/DC Decision Region (LL:13) to (LL:19)
42+
|
43+
| Number of Conditions: 2
44+
| Condition C1 --> (LL:13)
45+
| Condition C2 --> (LL:18)
46+
|
47+
| Executed MC/DC Test Vectors:
48+
|
49+
| C1, C2 Result
50+
| 1 { F, F = F }
51+
| 2 { T, - = T }
52+
|
53+
| C1-Pair: covered: (1,2)
54+
| C2-Pair: not covered
55+
| MC/DC Coverage for Decision: 50.00%
56+
|
57+
------------------
2158
LL| 3| black_box(x);
2259
LL| 3|}
2360
LL| |
2461
LL| 4|fn assign_3(a: bool, b: bool, c: bool) {
2562
LL| 4| let x = a || b && c;
2663
^2 ^1
64+
------------------
65+
|---> MC/DC Decision Region (LL:13) to (LL:24)
66+
|
67+
| Number of Conditions: 3
68+
| Condition C1 --> (LL:13)
69+
| Condition C2 --> (LL:18)
70+
| Condition C3 --> (LL:23)
71+
|
72+
| Executed MC/DC Test Vectors:
73+
|
74+
| C1, C2, C3 Result
75+
| 1 { F, F, - = F }
76+
| 2 { T, -, - = T }
77+
| 3 { F, T, T = T }
78+
|
79+
| C1-Pair: covered: (1,2)
80+
| C2-Pair: covered: (1,3)
81+
| C3-Pair: not covered
82+
| MC/DC Coverage for Decision: 66.67%
83+
|
84+
------------------
2785
LL| 4| black_box(x);
2886
LL| 4|}
2987
LL| |
3088
LL| 4|fn assign_3_bis(a: bool, b: bool, c: bool) {
3189
LL| 4| let x = a && b || c;
3290
^2 ^3
3391
------------------
34-
|---> MC/DC Decision Region (LL:13) to (LL:19)
92+
|---> MC/DC Decision Region (LL:13) to (LL:24)
3593
|
36-
| Number of Conditions: 2
94+
| Number of Conditions: 3
3795
| Condition C1 --> (LL:13)
3896
| Condition C2 --> (LL:18)
97+
| Condition C3 --> (LL:23)
3998
|
4099
| Executed MC/DC Test Vectors:
41100
|
42-
| C1, C2 Result
43-
| 1 { F, - = F }
44-
| 2 { T, F = F }
45-
| 3 { T, T = T }
101+
| C1, C2, C3 Result
102+
| 1 { T, F, F = F }
103+
| 2 { F, -, T = T }
104+
| 3 { T, T, - = T }
46105
|
47-
| C1-Pair: covered: (1,3)
48-
| C2-Pair: covered: (2,3)
49-
| MC/DC Coverage for Decision: 100.00%
106+
| C1-Pair: not covered
107+
| C2-Pair: covered: (1,3)
108+
| C3-Pair: not covered
109+
| MC/DC Coverage for Decision: 33.33%
50110
|
51111
------------------
52112
LL| 4| black_box(x);
@@ -55,6 +115,31 @@
55115
LL| 3|fn right_comb_tree(a: bool, b: bool, c: bool, d: bool, e: bool) {
56116
LL| 3| let x = a && (b && (c && (d && (e))));
57117
^2 ^1 ^1 ^1
118+
------------------
119+
|---> MC/DC Decision Region (LL:13) to (LL:42)
120+
|
121+
| Number of Conditions: 5
122+
| Condition C1 --> (LL:13)
123+
| Condition C2 --> (LL:19)
124+
| Condition C3 --> (LL:25)
125+
| Condition C4 --> (LL:31)
126+
| Condition C5 --> (LL:36)
127+
|
128+
| Executed MC/DC Test Vectors:
129+
|
130+
| C1, C2, C3, C4, C5 Result
131+
| 1 { F, -, -, -, - = F }
132+
| 2 { T, F, -, -, - = F }
133+
| 3 { T, T, T, T, T = T }
134+
|
135+
| C1-Pair: covered: (1,3)
136+
| C2-Pair: covered: (2,3)
137+
| C3-Pair: not covered
138+
| C4-Pair: not covered
139+
| C5-Pair: not covered
140+
| MC/DC Coverage for Decision: 40.00%
141+
|
142+
------------------
58143
LL| 3| black_box(x);
59144
LL| 3|}
60145
LL| |
@@ -65,6 +150,25 @@
65150
LL| 3|fn func_call(a: bool, b: bool) {
66151
LL| 3| foo(a && b);
67152
^2
153+
------------------
154+
|---> MC/DC Decision Region (LL:9) to (LL:15)
155+
|
156+
| Number of Conditions: 2
157+
| Condition C1 --> (LL:9)
158+
| Condition C2 --> (LL:14)
159+
|
160+
| Executed MC/DC Test Vectors:
161+
|
162+
| C1, C2 Result
163+
| 1 { F, - = F }
164+
| 2 { T, F = F }
165+
| 3 { T, T = T }
166+
|
167+
| C1-Pair: covered: (1,3)
168+
| C2-Pair: covered: (2,3)
169+
| MC/DC Coverage for Decision: 100.00%
170+
|
171+
------------------
68172
LL| 3|}
69173
LL| |
70174
LL| |#[coverage(off)]

0 commit comments

Comments
 (0)