-
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ignore-filename-regex for tests/examples/benches
- Loading branch information
Showing
7 changed files
with
149 additions
and
115 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
54 changes: 29 additions & 25 deletions
54
tests/fixtures/coverage-reports/real1/all.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,38 +1,42 @@ | ||
member1/member2/src/lib.rs: | ||
1| 1|pub fn func(x: u32) {pub fn func(x: u32) { | ||
2| 1| match x { | ||
3| 1| 0 => {} | ||
1| 2|pub fn func(x: u32) {pub fn func(x: u32) { | ||
^1 | ||
2| 2| match x { | ||
3| 2| 0 => {} | ||
4| 0| 1 => {} | ||
5| 0| 2 => {} | ||
6| 0| _ => {} | ||
7| | } | ||
8| 1|} | ||
8| 2|} | ||
|
||
member1/src/lib.rs: | ||
1| 1|pub fn func(x: u32) {pub fn func(x: u32) { | ||
2| 1| match x { | ||
3| 1| 0 => {} | ||
4| 0| 1 => {} | ||
5| 0| 2 => {} | ||
6| 0| _ => {} | ||
7| | } | ||
8| 1|} | ||
|
||
src/lib.rs: | ||
1| 2|pub fn func(x: u32) {pub fn func(x: u32) { | ||
^1 | ||
2| 2| match x { | ||
3| 0| 0 => {} | ||
4| 1| 1 => {} | ||
3| 2| 0 => {} | ||
4| 0| 1 => {} | ||
5| 0| 2 => {} | ||
6| 1| _ => {} | ||
6| 0| _ => {} | ||
7| | } | ||
8| 2|} | ||
9| | | ||
10| 1|#[test] | ||
11| 1|fn test() { | ||
12| 1| func(1); | ||
13| 1| func(3); | ||
14| 1| member1::func(0); | ||
15| 1| member2::func(0); | ||
16| 1|} | ||
|
||
src/lib.rs: | ||
1| 1|#[cfg(test)]#[cfg(test)] | ||
2| |mod tests; | ||
3| | | ||
4| 4|pub fn func(x: u32) { | ||
5| 4| match x { | ||
6| 0| 0 => {} | ||
7| 2| 1 => {} | ||
8| 0| 2 => {} | ||
9| 2| _ => {} | ||
10| | } | ||
11| 4|} | ||
12| | | ||
13| 1|#[test] | ||
14| 1|fn test() { | ||
15| 1| func(1); | ||
16| 1| func(3); | ||
17| 1| member1::func(0); | ||
18| 1| member2::func(0); | ||
19| 1|} |
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,64 +1,68 @@ | ||
member1/member2/src/lib.rs: | ||
1| 1|pub fn func(x: u32) {pub fn func(x: u32) { | ||
2| 1| match x { | ||
3| 1| 0 => {} | ||
1| 2|pub fn func(x: u32) {pub fn func(x: u32) { | ||
^1 | ||
2| 2| match x { | ||
3| 2| 0 => {} | ||
4| 0| 1 => {} | ||
5| 0| 2 => {} | ||
6| 0| _ => {} | ||
7| | } | ||
8| 1|} | ||
8| 2|} | ||
------------------ | ||
| member2::func: | ||
| 1| 1|pub fn func(x: u32) { | ||
| 2| 1| match x { | ||
| 3| 1| 0 => {} | ||
| 1| 2|pub fn func(x: u32) { | ||
| 2| 2| match x { | ||
| 3| 2| 0 => {} | ||
| 4| 0| 1 => {} | ||
| 5| 0| 2 => {} | ||
| 6| 0| _ => {} | ||
| 7| | } | ||
| 8| 1|} | ||
| 8| 2|} | ||
------------------ | ||
| Unexecuted instantiation: member2::func | ||
------------------ | ||
|
||
member1/src/lib.rs: | ||
1| 1|pub fn func(x: u32) {pub fn func(x: u32) { | ||
2| 1| match x { | ||
3| 1| 0 => {} | ||
1| 2|pub fn func(x: u32) {pub fn func(x: u32) { | ||
^1 | ||
2| 2| match x { | ||
3| 2| 0 => {} | ||
4| 0| 1 => {} | ||
5| 0| 2 => {} | ||
6| 0| _ => {} | ||
7| | } | ||
8| 1|} | ||
8| 2|} | ||
------------------ | ||
| member1::func: | ||
| 1| 1|pub fn func(x: u32) { | ||
| 2| 1| match x { | ||
| 3| 1| 0 => {} | ||
| 1| 2|pub fn func(x: u32) { | ||
| 2| 2| match x { | ||
| 3| 2| 0 => {} | ||
| 4| 0| 1 => {} | ||
| 5| 0| 2 => {} | ||
| 6| 0| _ => {} | ||
| 7| | } | ||
| 8| 1|} | ||
| 8| 2|} | ||
------------------ | ||
| Unexecuted instantiation: member1::func | ||
------------------ | ||
|
||
src/lib.rs: | ||
1| 2|pub fn func(x: u32) {pub fn func(x: u32) { | ||
^1 | ||
2| 2| match x { | ||
3| 0| 0 => {} | ||
4| 1| 1 => {} | ||
5| 0| 2 => {} | ||
6| 1| _ => {} | ||
7| | } | ||
8| 2|} | ||
9| | | ||
10| 1|#[test] | ||
11| 1|fn test() { | ||
12| 1| func(1); | ||
13| 1| func(3); | ||
14| 1| member1::func(0); | ||
15| 1| member2::func(0); | ||
16| 1|} | ||
1| 1|#[cfg(test)]#[cfg(test)] | ||
2| |mod tests; | ||
3| | | ||
4| 4|pub fn func(x: u32) { | ||
5| 4| match x { | ||
6| 0| 0 => {} | ||
7| 2| 1 => {} | ||
8| 0| 2 => {} | ||
9| 2| _ => {} | ||
10| | } | ||
11| 4|} | ||
12| | | ||
13| 1|#[test] | ||
14| 1|fn test() { | ||
15| 1| func(1); | ||
16| 1| func(3); | ||
17| 1| member1::func(0); | ||
18| 1| member2::func(0); | ||
19| 1|} |
52 changes: 27 additions & 25 deletions
52
tests/fixtures/coverage-reports/real1/workspace_root.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,38 +1,40 @@ | ||
member1/member2/src/lib.rs: | ||
1| 1|pub fn func(x: u32) { | ||
2| 1| match x { | ||
3| 1| 0 => {} | ||
1| 2|pub fn func(x: u32) { | ||
2| 2| match x { | ||
3| 2| 0 => {} | ||
4| 0| 1 => {} | ||
5| 0| 2 => {} | ||
6| 0| _ => {} | ||
7| | } | ||
8| 1|} | ||
8| 2|} | ||
|
||
member1/src/lib.rs: | ||
1| 1|pub fn func(x: u32) { | ||
2| 1| match x { | ||
3| 1| 0 => {} | ||
1| 2|pub fn func(x: u32) { | ||
2| 2| match x { | ||
3| 2| 0 => {} | ||
4| 0| 1 => {} | ||
5| 0| 2 => {} | ||
6| 0| _ => {} | ||
7| | } | ||
8| 1|} | ||
8| 2|} | ||
|
||
src/lib.rs: | ||
1| 2|pub fn func(x: u32) {pub fn func(x: u32) { | ||
^1 | ||
2| 2| match x { | ||
3| 0| 0 => {} | ||
4| 1| 1 => {} | ||
5| 0| 2 => {} | ||
6| 1| _ => {} | ||
7| | } | ||
8| 2|} | ||
9| | | ||
10| 1|#[test] | ||
11| 1|fn test() { | ||
12| 1| func(1); | ||
13| 1| func(3); | ||
14| 1| member1::func(0); | ||
15| 1| member2::func(0); | ||
16| 1|} | ||
1| 1|#[cfg(test)]#[cfg(test)] | ||
2| |mod tests; | ||
3| | | ||
4| 4|pub fn func(x: u32) { | ||
5| 4| match x { | ||
6| 0| 0 => {} | ||
7| 2| 1 => {} | ||
8| 0| 2 => {} | ||
9| 2| _ => {} | ||
10| | } | ||
11| 4|} | ||
12| | | ||
13| 1|#[test] | ||
14| 1|fn test() { | ||
15| 1| func(1); | ||
16| 1| func(3); | ||
17| 1| member1::func(0); | ||
18| 1| member2::func(0); | ||
19| 1|} |
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,38 +1,40 @@ | ||
member1/member2/src/lib.rs: | ||
1| 1|pub fn func(x: u32) { | ||
2| 1| match x { | ||
3| 1| 0 => {} | ||
1| 2|pub fn func(x: u32) { | ||
2| 2| match x { | ||
3| 2| 0 => {} | ||
4| 0| 1 => {} | ||
5| 0| 2 => {} | ||
6| 0| _ => {} | ||
7| | } | ||
8| 1|} | ||
8| 2|} | ||
|
||
member1/src/lib.rs: | ||
1| 1|pub fn func(x: u32) { | ||
2| 1| match x { | ||
3| 1| 0 => {} | ||
1| 2|pub fn func(x: u32) { | ||
2| 2| match x { | ||
3| 2| 0 => {} | ||
4| 0| 1 => {} | ||
5| 0| 2 => {} | ||
6| 0| _ => {} | ||
7| | } | ||
8| 1|} | ||
8| 2|} | ||
|
||
src/lib.rs: | ||
1| 2|pub fn func(x: u32) {pub fn func(x: u32) { | ||
^1 | ||
2| 2| match x { | ||
3| 0| 0 => {} | ||
4| 1| 1 => {} | ||
5| 0| 2 => {} | ||
6| 1| _ => {} | ||
7| | } | ||
8| 2|} | ||
9| | | ||
10| 1|#[test] | ||
11| 1|fn test() { | ||
12| 1| func(1); | ||
13| 1| func(3); | ||
14| 1| member1::func(0); | ||
15| 1| member2::func(0); | ||
16| 1|} | ||
1| 1|#[cfg(test)]#[cfg(test)] | ||
2| |mod tests; | ||
3| | | ||
4| 4|pub fn func(x: u32) { | ||
5| 4| match x { | ||
6| 0| 0 => {} | ||
7| 2| 1 => {} | ||
8| 0| 2 => {} | ||
9| 2| _ => {} | ||
10| | } | ||
11| 4|} | ||
12| | | ||
13| 1|#[test] | ||
14| 1|fn test() { | ||
15| 1| func(1); | ||
16| 1| func(3); | ||
17| 1| member1::func(0); | ||
18| 1| member2::func(0); | ||
19| 1|} |
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,3 +1,6 @@ | ||
#[cfg(test)] | ||
mod tests; | ||
|
||
pub fn func(x: u32) { | ||
match x { | ||
0 => {} | ||
|
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// src/tests is a well-known pattern: https://grep.app/search?q=%23%5Btest%5D&filter[path][0]=src/tests/&filter[lang][0]=Rust | ||
// | ||
// Note that to check that this pattern is properly supported, | ||
// you need to run cargo-llvm-cov without --remap-path-prefix flag. | ||
// (Our test suite always enables that flag.) | ||
|
||
use super::*; | ||
|
||
#[test] | ||
fn test() { | ||
func(1); | ||
func(3); | ||
member1::func(0); | ||
member2::func(0); | ||
} |