Skip to content

Commit ad61314

Browse files
author
zhuyunxing
committed
coverage. Fix test typo
1 parent e29d513 commit ad61314

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

tests/coverage/mcdc/condition-limit.cov-map

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Function name: condition_limit::accpet_7_conditions
1+
Function name: condition_limit::accept_7_conditions
22
Raw bytes (232): 0x[01, 01, 2c, 01, 05, 05, 1d, 05, 1d, 7a, 19, 05, 1d, 7a, 19, 05, 1d, 76, 15, 7a, 19, 05, 1d, 76, 15, 7a, 19, 05, 1d, 72, 11, 76, 15, 7a, 19, 05, 1d, 72, 11, 76, 15, 7a, 19, 05, 1d, 6e, 0d, 72, 11, 76, 15, 7a, 19, 05, 1d, 6e, 0d, 72, 11, 76, 15, 7a, 19, 05, 1d, 9f, 01, 02, a3, 01, 1d, a7, 01, 19, ab, 01, 15, af, 01, 11, 09, 0d, 21, 9b, 01, 9f, 01, 02, a3, 01, 1d, a7, 01, 19, ab, 01, 15, af, 01, 11, 09, 0d, 12, 01, 07, 01, 02, 09, 28, 08, 07, 02, 08, 00, 27, 30, 05, 02, 01, 07, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 7a, 1d, 07, 06, 00, 00, 0d, 00, 0e, 7a, 00, 12, 00, 13, 30, 76, 19, 06, 05, 00, 00, 12, 00, 13, 76, 00, 17, 00, 18, 30, 72, 15, 05, 04, 00, 00, 17, 00, 18, 72, 00, 1c, 00, 1d, 30, 6e, 11, 04, 03, 00, 00, 1c, 00, 1d, 6e, 00, 21, 00, 22, 30, 6a, 0d, 03, 02, 00, 00, 21, 00, 22, 6a, 00, 26, 00, 27, 30, 21, 09, 02, 00, 00, 00, 26, 00, 27, 21, 00, 28, 02, 06, 9b, 01, 02, 06, 00, 07, 97, 01, 01, 01, 00, 02]
33
Number of files: 1
44
- file 0 => global file 1

tests/coverage/mcdc/condition-limit.coverage

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
LL| |//@ compile-flags: -Zcoverage-options=mcdc
55
LL| |//@ llvm-cov-flags: --show-branches=count --show-mcdc
66
LL| |
7-
LL| 2|fn accpet_7_conditions(bool_arr: [bool; 7]) {
7+
LL| 2|fn accept_7_conditions(bool_arr: [bool; 7]) {
88
LL| 2| let [a, b, c, d, e, f, g] = bool_arr;
99
LL| 2| if a && b && c && d && e && f && g {
1010
^1 ^1 ^1 ^1 ^1 ^1
@@ -50,7 +50,7 @@
5050
LL| |
5151
LL| |#[coverage(off)]
5252
LL| |fn main() {
53-
LL| | accpet_7_conditions([false; 7]);
54-
LL| | accpet_7_conditions([true; 7]);
53+
LL| | accept_7_conditions([false; 7]);
54+
LL| | accept_7_conditions([true; 7]);
5555
LL| |}
5656

tests/coverage/mcdc/condition-limit.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//@ compile-flags: -Zcoverage-options=mcdc
55
//@ llvm-cov-flags: --show-branches=count --show-mcdc
66

7-
fn accpet_7_conditions(bool_arr: [bool; 7]) {
7+
fn accept_7_conditions(bool_arr: [bool; 7]) {
88
let [a, b, c, d, e, f, g] = bool_arr;
99
if a && b && c && d && e && f && g {
1010
core::hint::black_box("hello");
@@ -13,6 +13,6 @@ fn accpet_7_conditions(bool_arr: [bool; 7]) {
1313

1414
#[coverage(off)]
1515
fn main() {
16-
accpet_7_conditions([false; 7]);
17-
accpet_7_conditions([true; 7]);
16+
accept_7_conditions([false; 7]);
17+
accept_7_conditions([true; 7]);
1818
}

tests/coverage/mcdc/if.coverage

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
LL| |
163163
LL| 4|fn mcdc_check_not_tree_decision(a: bool, b: bool, c: bool) {
164164
LL| 4| // Contradict to `mcdc_check_tree_decision`,
165-
LL| 4| // 100% branch coverage of this expression does not mean indicates 100% mcdc coverage.
165+
LL| 4| // 100% branch coverage of this expression does not indicate 100% mcdc coverage.
166166
LL| 4| if (a || b) && c {
167167
^1
168168
------------------

tests/coverage/mcdc/if.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ fn mcdc_check_tree_decision(a: bool, b: bool, c: bool) {
4848

4949
fn mcdc_check_not_tree_decision(a: bool, b: bool, c: bool) {
5050
// Contradict to `mcdc_check_tree_decision`,
51-
// 100% branch coverage of this expression does not mean indicates 100% mcdc coverage.
51+
// 100% branch coverage of this expression does not indicate 100% mcdc coverage.
5252
if (a || b) && c {
5353
say("pass");
5454
} else {

0 commit comments

Comments
 (0)