-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
#[no_coverage]
to the test harness's fn main
- Loading branch information
Showing
4 changed files
with
26 additions
and
2 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
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
11 changes: 11 additions & 0 deletions
11
tests/run-make/coverage-reports/expected_show_coverage.test_harness.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
1| |// Verify that the entry point injected by the test harness doesn't cause | ||
2| |// weird artifacts in the coverage report (e.g. issue #10749). | ||
3| | | ||
4| |// compile-flags: --test | ||
5| | | ||
6| |#[allow(dead_code)] | ||
7| 0|fn unused() {} | ||
8| | | ||
9| 1|#[test] | ||
10| 1|fn my_test() {} | ||
|
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,10 @@ | ||
// Verify that the entry point injected by the test harness doesn't cause | ||
// weird artifacts in the coverage report (e.g. issue #10749). | ||
|
||
// compile-flags: --test | ||
|
||
#[allow(dead_code)] | ||
fn unused() {} | ||
|
||
#[test] | ||
fn my_test() {} |