-
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "coverage_attribute has been stabilized"
- Loading branch information
Showing
12 changed files
with
217 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
tests/fixtures/coverage-reports/no_coverage/no_cfg_coverage.codecov.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"coverage":{"src/lib.rs":{"1":"1/1","2":"1/1","3":"1/1","4":"0/1","5":"0/1","6":"0/1","7":"0/1","9":"1/1","24":"1/1","25":"1/2","26":"0/1","27":"0/1","28":"1/2","29":"1/1"}}} | ||
{"coverage":{"src/lib.rs":{"3":"1/1","4":"1/1","5":"1/1","6":"0/1","7":"0/1","8":"0/1","9":"0/1","11":"1/1","15":"1/1","16":"1/1","17":"1/1","18":"1/2","19":"0/1","20":"1/2","21":"1/1","26":"1/1","27":"1/2","28":"0/1","29":"0/1","30":"1/2","31":"1/1","38":"1/1","39":"1/2","40":"0/1","41":"1/2","42":"1/1"}}} |
84 changes: 43 additions & 41 deletions
84
tests/fixtures/coverage-reports/no_coverage/no_cfg_coverage.hide-instantiations.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,43 @@ | ||
1| 1|fn func(x: i32) { | ||
2| 1| match x { | ||
3| 1| 0 => {} | ||
4| 0| 1 => {} | ||
5| 0| 2 => {} | ||
6| 0| 3 => {} | ||
7| 0| _ => {} | ||
8| | } | ||
9| 1|} | ||
10| | | ||
11| |#[coverage(off)] | ||
12| |#[test] | ||
13| |fn fn_level() { | ||
14| | func(0); | ||
15| | | ||
16| | if false { | ||
17| | func(1); | ||
18| | } | ||
19| |} | ||
20| | | ||
21| |// #[coverage(off)] has no effect on expressions. | ||
22| |// now error by rustc: error[E0788]: attribute should be applied to a function definition or closure | ||
23| |#[test] | ||
24| 1|fn expr_level() { | ||
25| 1| if false { | ||
26| 0| // #[coverage(off)] | ||
27| 0| func(2); | ||
28| 1| } | ||
29| 1|} | ||
30| | | ||
31| |#[coverage(off)] | ||
32| |mod mod_level { | ||
33| | use super::func; | ||
34| | | ||
35| | #[test] | ||
36| | fn mod_level() { | ||
37| | if false { | ||
38| | func(3); | ||
39| | } | ||
40| | } | ||
41| |} | ||
1| |#![cfg_attr(coverage, feature(coverage_attribute))] | ||
2| | | ||
3| 1|fn func(x: i32) { | ||
4| 1| match x { | ||
5| 1| 0 => {} | ||
6| 0| 1 => {} | ||
7| 0| 2 => {} | ||
8| 0| 3 => {} | ||
9| 0| _ => {} | ||
10| | } | ||
11| 1|} | ||
12| | | ||
13| |#[cfg_attr(coverage, coverage(off))] | ||
14| |#[test] | ||
15| 1|fn fn_level() { | ||
16| 1| func(0); | ||
17| 1| | ||
18| 1| if false { | ||
19| 0| func(1); | ||
20| 1| } | ||
21| 1|} | ||
22| | | ||
23| |// #[coverage(off)] has no effect on expressions. | ||
24| |// now error by rustc: error[E0788]: attribute should be applied to a function definition or closure | ||
25| |#[test] | ||
26| 1|fn expr_level() { | ||
27| 1| if false { | ||
28| 0| // #[cfg_attr(coverage, coverage(off))] | ||
29| 0| func(2); | ||
30| 1| } | ||
31| 1|} | ||
32| | | ||
33| |#[cfg_attr(coverage, coverage(off))] | ||
34| |mod mod_level { | ||
35| | use super::func; | ||
36| | | ||
37| | #[test] | ||
38| 1| fn mod_level() { | ||
39| 1| if false { | ||
40| 0| func(3); | ||
41| 1| } | ||
42| 1| } | ||
43| |} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
tests/fixtures/coverage-reports/no_coverage/no_cfg_coverage.lcov.info
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
SF:src/lib.rs | ||
FNF:2 | ||
FNH:2 | ||
FNF:4 | ||
FNH:4 | ||
BRF:0 | ||
BRH:0 | ||
LF:14 | ||
LH:8 | ||
LF:26 | ||
LH:18 | ||
end_of_record |
4 changes: 2 additions & 2 deletions
4
tests/fixtures/coverage-reports/no_coverage/no_cfg_coverage.summary.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Filename Regions Missed Regions Cover Functions Missed Functions Executed Lines Missed Lines Cover Branches Missed Branches Cover | ||
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
src/lib.rs 11 5 54.55% 2 0 100.00% 14 6 57.14% 0 0 - | ||
src/lib.rs 19 7 63.16% 4 0 100.00% 26 8 69.23% 0 0 - | ||
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
TOTAL 11 5 54.55% 2 0 100.00% 14 6 57.14% 0 0 - | ||
TOTAL 19 7 63.16% 4 0 100.00% 26 8 69.23% 0 0 - |
84 changes: 43 additions & 41 deletions
84
tests/fixtures/coverage-reports/no_coverage/no_cfg_coverage.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,43 @@ | ||
1| 1|fn func(x: i32) { | ||
2| 1| match x { | ||
3| 1| 0 => {} | ||
4| 0| 1 => {} | ||
5| 0| 2 => {} | ||
6| 0| 3 => {} | ||
7| 0| _ => {} | ||
8| | } | ||
9| 1|} | ||
10| | | ||
11| |#[coverage(off)] | ||
12| |#[test] | ||
13| |fn fn_level() { | ||
14| | func(0); | ||
15| | | ||
16| | if false { | ||
17| | func(1); | ||
18| | } | ||
19| |} | ||
20| | | ||
21| |// #[coverage(off)] has no effect on expressions. | ||
22| |// now error by rustc: error[E0788]: attribute should be applied to a function definition or closure | ||
23| |#[test] | ||
24| 1|fn expr_level() { | ||
25| 1| if false { | ||
26| 0| // #[coverage(off)] | ||
27| 0| func(2); | ||
28| 1| } | ||
29| 1|} | ||
30| | | ||
31| |#[coverage(off)] | ||
32| |mod mod_level { | ||
33| | use super::func; | ||
34| | | ||
35| | #[test] | ||
36| | fn mod_level() { | ||
37| | if false { | ||
38| | func(3); | ||
39| | } | ||
40| | } | ||
41| |} | ||
1| |#![cfg_attr(coverage, feature(coverage_attribute))] | ||
2| | | ||
3| 1|fn func(x: i32) { | ||
4| 1| match x { | ||
5| 1| 0 => {} | ||
6| 0| 1 => {} | ||
7| 0| 2 => {} | ||
8| 0| 3 => {} | ||
9| 0| _ => {} | ||
10| | } | ||
11| 1|} | ||
12| | | ||
13| |#[cfg_attr(coverage, coverage(off))] | ||
14| |#[test] | ||
15| 1|fn fn_level() { | ||
16| 1| func(0); | ||
17| 1| | ||
18| 1| if false { | ||
19| 0| func(1); | ||
20| 1| } | ||
21| 1|} | ||
22| | | ||
23| |// #[coverage(off)] has no effect on expressions. | ||
24| |// now error by rustc: error[E0788]: attribute should be applied to a function definition or closure | ||
25| |#[test] | ||
26| 1|fn expr_level() { | ||
27| 1| if false { | ||
28| 0| // #[cfg_attr(coverage, coverage(off))] | ||
29| 0| func(2); | ||
30| 1| } | ||
31| 1|} | ||
32| | | ||
33| |#[cfg_attr(coverage, coverage(off))] | ||
34| |mod mod_level { | ||
35| | use super::func; | ||
36| | | ||
37| | #[test] | ||
38| 1| fn mod_level() { | ||
39| 1| if false { | ||
40| 0| func(3); | ||
41| 1| } | ||
42| 1| } | ||
43| |} |
2 changes: 1 addition & 1 deletion
2
tests/fixtures/coverage-reports/no_coverage/no_coverage.codecov.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"coverage":{"src/lib.rs":{"1":"1/1","2":"1/1","3":"1/1","4":"0/1","5":"0/1","6":"0/1","7":"0/1","9":"1/1","24":"1/1","25":"1/2","26":"0/1","27":"0/1","28":"1/2","29":"1/1"}}} | ||
{"coverage":{"src/lib.rs":{"3":"1/1","4":"1/1","5":"1/1","6":"0/1","7":"0/1","8":"0/1","9":"0/1","11":"1/1","26":"1/1","27":"1/2","28":"0/1","29":"0/1","30":"1/2","31":"1/1"}}} |
Oops, something went wrong.