diff options
| author | Zalathar <Zalathar@users.noreply.github.com> | 2023-04-28 21:05:17 +1000 | 
|---|---|---|
| committer | Zalathar <Zalathar@users.noreply.github.com> | 2023-05-01 11:01:12 +1000 | 
| commit | 77af67ab64ffd3daaa255d6afff1f02bb1f5faa2 (patch) | |
| tree | ba8685bf0014b8f9ae10586315f93c3bb1ac276b /tests/run-make/coverage/test_harness.rs | |
| parent | 9ecda8de85ce893cc3fc748ab06be0b8250147a7 (diff) | |
| download | rust-77af67ab64ffd3daaa255d6afff1f02bb1f5faa2.tar.gz rust-77af67ab64ffd3daaa255d6afff1f02bb1f5faa2.zip  | |
Add `#[no_coverage]` to the test harness's `fn main`
Diffstat (limited to 'tests/run-make/coverage/test_harness.rs')
| -rw-r--r-- | tests/run-make/coverage/test_harness.rs | 10 | 
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/run-make/coverage/test_harness.rs b/tests/run-make/coverage/test_harness.rs new file mode 100644 index 00000000000..12a755734c1 --- /dev/null +++ b/tests/run-make/coverage/test_harness.rs @@ -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() {}  | 
