diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:48 +0000 |
commit | ef24de24a82fe681581cc130f342363c47c0969a (patch) | |
tree | 0d494f7e1a38b95c92426f58fe6eaa877303a86c /tests/coverage | |
parent | Releasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip |
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/coverage-map/README.md | 13 | ||||
-rw-r--r-- | tests/coverage-map/if.cov-map | 15 | ||||
-rw-r--r-- | tests/coverage-map/if.rs | 9 | ||||
-rw-r--r-- | tests/coverage-map/status-quo/closure.cov-map | 324 | ||||
-rw-r--r-- | tests/coverage-map/status-quo/closure_bug.cov-map | 148 | ||||
-rw-r--r-- | tests/coverage-map/status-quo/closure_macro.cov-map | 40 | ||||
-rw-r--r-- | tests/coverage-map/status-quo/closure_macro_async.cov-map | 48 | ||||
-rw-r--r-- | tests/coverage-map/status-quo/conditions.cov-map | 261 | ||||
-rw-r--r-- | tests/coverage-map/status-quo/continue.cov-map | 85 | ||||
-rw-r--r-- | tests/coverage-map/status-quo/generator.cov-map | 58 | ||||
-rw-r--r-- | tests/coverage-map/status-quo/generator.rs | 30 | ||||
-rw-r--r-- | tests/coverage-map/status-quo/inline-dead.cov-map | 45 | ||||
-rw-r--r-- | tests/coverage-map/status-quo/inline.cov-map | 82 | ||||
-rw-r--r-- | tests/coverage-map/status-quo/issue-93054.cov-map | 24 | ||||
-rw-r--r-- | tests/coverage-map/status-quo/lazy_boolean.cov-map | 223 | ||||
-rw-r--r-- | tests/coverage-map/status-quo/loops_branches.cov-map | 185 | ||||
-rw-r--r-- | tests/coverage-map/status-quo/overflow.rs | 63 | ||||
-rw-r--r-- | tests/coverage-map/status-quo/simple_loop.cov-map | 28 | ||||
-rw-r--r-- | tests/coverage-map/status-quo/simple_match.cov-map | 36 | ||||
-rw-r--r-- | tests/coverage-map/status-quo/sort_groups.rs | 23 | ||||
-rw-r--r-- | tests/coverage-map/status-quo/tight_inf_loop.cov-map | 12 | ||||
-rw-r--r-- | tests/coverage-map/status-quo/try_error_result.cov-map | 226 | ||||
-rw-r--r-- | tests/coverage-map/status-quo/while.cov-map | 15 | ||||
-rw-r--r-- | tests/coverage-map/status-quo/yield.cov-map | 72 | ||||
-rw-r--r-- | tests/coverage-map/status-quo/yield.rs | 37 | ||||
-rw-r--r-- | tests/coverage-run-rustdoc/auxiliary/doctest_crate.rs (renamed from tests/run-coverage-rustdoc/auxiliary/doctest_crate.rs) | 0 | ||||
-rw-r--r-- | tests/coverage-run-rustdoc/doctest.coverage (renamed from tests/run-coverage-rustdoc/doctest.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage-run-rustdoc/doctest.rs (renamed from tests/run-coverage-rustdoc/doctest.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/README.md | 16 | ||||
-rw-r--r-- | tests/coverage/abort.cov-map (renamed from tests/coverage-map/status-quo/abort.cov-map) | 0 | ||||
-rw-r--r-- | tests/coverage/abort.coverage (renamed from tests/run-coverage/abort.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/abort.rs (renamed from tests/coverage-map/status-quo/abort.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/assert.cov-map (renamed from tests/coverage-map/status-quo/assert.cov-map) | 0 | ||||
-rw-r--r-- | tests/coverage/assert.coverage (renamed from tests/run-coverage/assert.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/assert.rs (renamed from tests/coverage-map/status-quo/assert.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/async.cov-map (renamed from tests/coverage-map/status-quo/async.cov-map) | 90 | ||||
-rw-r--r-- | tests/coverage/async.coverage (renamed from tests/run-coverage/async.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/async.rs (renamed from tests/coverage-map/status-quo/async.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/async2.cov-map (renamed from tests/coverage-map/status-quo/async2.cov-map) | 28 | ||||
-rw-r--r-- | tests/coverage/async2.coverage (renamed from tests/run-coverage/async2.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/async2.rs (renamed from tests/coverage-map/status-quo/async2.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/auxiliary/inline_always_with_dead_code.rs (renamed from tests/run-coverage/auxiliary/inline_always_with_dead_code.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/auxiliary/macro_name_span_helper.rs (renamed from tests/run-coverage/auxiliary/macro_name_span_helper.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/auxiliary/unused_mod_helper.rs (renamed from tests/run-coverage/auxiliary/unused_mod_helper.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/auxiliary/used_crate.rs (renamed from tests/run-coverage/auxiliary/used_crate.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/auxiliary/used_inline_crate.rs (renamed from tests/run-coverage/auxiliary/used_inline_crate.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/bad_counter_ids.cov-map | 98 | ||||
-rw-r--r-- | tests/coverage/bad_counter_ids.coverage | 69 | ||||
-rw-r--r-- | tests/coverage/bad_counter_ids.rs | 66 | ||||
-rw-r--r-- | tests/coverage/closure.cov-map | 275 | ||||
-rw-r--r-- | tests/coverage/closure.coverage (renamed from tests/run-coverage/closure.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/closure.rs (renamed from tests/coverage-map/status-quo/closure.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/closure_bug.cov-map | 133 | ||||
-rw-r--r-- | tests/coverage/closure_bug.coverage (renamed from tests/run-coverage/closure_bug.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/closure_bug.rs (renamed from tests/coverage-map/status-quo/closure_bug.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/closure_macro.cov-map | 36 | ||||
-rw-r--r-- | tests/coverage/closure_macro.coverage (renamed from tests/run-coverage/closure_macro.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/closure_macro.rs (renamed from tests/coverage-map/status-quo/closure_macro.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/closure_macro_async.cov-map | 44 | ||||
-rw-r--r-- | tests/coverage/closure_macro_async.coverage (renamed from tests/run-coverage/closure_macro_async.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/closure_macro_async.rs (renamed from tests/coverage-map/status-quo/closure_macro_async.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/conditions.cov-map | 259 | ||||
-rw-r--r-- | tests/coverage/conditions.coverage (renamed from tests/run-coverage/conditions.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/conditions.rs (renamed from tests/coverage-map/status-quo/conditions.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/continue.cov-map | 79 | ||||
-rw-r--r-- | tests/coverage/continue.coverage (renamed from tests/run-coverage/continue.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/continue.rs (renamed from tests/coverage-map/status-quo/continue.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/coroutine.cov-map | 53 | ||||
-rw-r--r-- | tests/coverage/coroutine.coverage | 32 | ||||
-rw-r--r-- | tests/coverage/coroutine.rs | 30 | ||||
-rw-r--r-- | tests/coverage/dead_code.cov-map (renamed from tests/coverage-map/status-quo/dead_code.cov-map) | 8 | ||||
-rw-r--r-- | tests/coverage/dead_code.coverage (renamed from tests/run-coverage/dead_code.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/dead_code.rs (renamed from tests/coverage-map/status-quo/dead_code.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/drop_trait.cov-map (renamed from tests/coverage-map/status-quo/drop_trait.cov-map) | 0 | ||||
-rw-r--r-- | tests/coverage/drop_trait.coverage (renamed from tests/run-coverage/drop_trait.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/drop_trait.rs (renamed from tests/coverage-map/status-quo/drop_trait.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/fn_sig_into_try.cov-map | 53 | ||||
-rw-r--r-- | tests/coverage/fn_sig_into_try.coverage | 45 | ||||
-rw-r--r-- | tests/coverage/fn_sig_into_try.rs | 41 | ||||
-rw-r--r-- | tests/coverage/generics.cov-map (renamed from tests/coverage-map/status-quo/generics.cov-map) | 0 | ||||
-rw-r--r-- | tests/coverage/generics.coverage (renamed from tests/run-coverage/generics.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/generics.rs (renamed from tests/coverage-map/status-quo/generics.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/if.cov-map (renamed from tests/coverage-map/status-quo/if.cov-map) | 0 | ||||
-rw-r--r-- | tests/coverage/if.coverage (renamed from tests/run-coverage/if.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/if.rs (renamed from tests/coverage-map/status-quo/if.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/if_else.cov-map (renamed from tests/coverage-map/status-quo/if_else.cov-map) | 0 | ||||
-rw-r--r-- | tests/coverage/if_else.coverage (renamed from tests/run-coverage/if_else.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/if_else.rs (renamed from tests/coverage-map/status-quo/if_else.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/inline-dead.cov-map | 45 | ||||
-rw-r--r-- | tests/coverage/inline-dead.coverage (renamed from tests/run-coverage/inline-dead.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/inline-dead.rs (renamed from tests/coverage-map/status-quo/inline-dead.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/inline.cov-map | 78 | ||||
-rw-r--r-- | tests/coverage/inline.coverage (renamed from tests/run-coverage/inline.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/inline.rs (renamed from tests/coverage-map/status-quo/inline.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/inner_items.cov-map (renamed from tests/coverage-map/status-quo/inner_items.cov-map) | 0 | ||||
-rw-r--r-- | tests/coverage/inner_items.coverage (renamed from tests/run-coverage/inner_items.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/inner_items.rs (renamed from tests/coverage-map/status-quo/inner_items.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/issue-83601.cov-map (renamed from tests/coverage-map/status-quo/issue-83601.cov-map) | 0 | ||||
-rw-r--r-- | tests/coverage/issue-83601.coverage (renamed from tests/run-coverage/issue-83601.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/issue-83601.rs (renamed from tests/coverage-map/status-quo/issue-83601.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/issue-84561.cov-map (renamed from tests/coverage-map/status-quo/issue-84561.cov-map) | 67 | ||||
-rw-r--r-- | tests/coverage/issue-84561.coverage (renamed from tests/run-coverage/issue-84561.coverage) | 2 | ||||
-rw-r--r-- | tests/coverage/issue-84561.rs (renamed from tests/coverage-map/status-quo/issue-84561.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/issue-85461.cov-map | 8 | ||||
-rw-r--r-- | tests/coverage/issue-85461.coverage (renamed from tests/run-coverage/issue-85461.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/issue-85461.rs (renamed from tests/run-coverage/issue-85461.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/issue-93054.cov-map | 24 | ||||
-rw-r--r-- | tests/coverage/issue-93054.coverage (renamed from tests/run-coverage/issue-93054.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/issue-93054.rs (renamed from tests/coverage-map/status-quo/issue-93054.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/lazy_boolean.cov-map | 219 | ||||
-rw-r--r-- | tests/coverage/lazy_boolean.coverage (renamed from tests/run-coverage/lazy_boolean.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/lazy_boolean.rs (renamed from tests/coverage-map/status-quo/lazy_boolean.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/long_and_wide.cov-map (renamed from tests/coverage-map/long_and_wide.cov-map) | 0 | ||||
-rw-r--r-- | tests/coverage/long_and_wide.coverage | 151 | ||||
-rw-r--r-- | tests/coverage/long_and_wide.rs (renamed from tests/coverage-map/long_and_wide.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/loop_break_value.cov-map (renamed from tests/coverage-map/status-quo/loop_break_value.cov-map) | 0 | ||||
-rw-r--r-- | tests/coverage/loop_break_value.coverage (renamed from tests/run-coverage/loop_break_value.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/loop_break_value.rs (renamed from tests/coverage-map/status-quo/loop_break_value.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/loops_branches.cov-map | 183 | ||||
-rw-r--r-- | tests/coverage/loops_branches.coverage (renamed from tests/run-coverage/loops_branches.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/loops_branches.rs (renamed from tests/coverage-map/status-quo/loops_branches.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/macro_name_span.cov-map | 16 | ||||
-rw-r--r-- | tests/coverage/macro_name_span.coverage (renamed from tests/run-coverage/macro_name_span.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/macro_name_span.rs (renamed from tests/run-coverage/macro_name_span.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/match_or_pattern.cov-map (renamed from tests/coverage-map/status-quo/match_or_pattern.cov-map) | 0 | ||||
-rw-r--r-- | tests/coverage/match_or_pattern.coverage (renamed from tests/run-coverage/match_or_pattern.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/match_or_pattern.rs (renamed from tests/coverage-map/status-quo/match_or_pattern.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/nested_loops.cov-map (renamed from tests/coverage-map/status-quo/nested_loops.cov-map) | 0 | ||||
-rw-r--r-- | tests/coverage/nested_loops.coverage (renamed from tests/run-coverage/nested_loops.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/nested_loops.rs (renamed from tests/coverage-map/status-quo/nested_loops.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/no_cov_crate.cov-map (renamed from tests/coverage-map/status-quo/no_cov_crate.cov-map) | 4 | ||||
-rw-r--r-- | tests/coverage/no_cov_crate.coverage (renamed from tests/run-coverage/no_cov_crate.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/no_cov_crate.rs (renamed from tests/coverage-map/status-quo/no_cov_crate.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/overflow.cov-map (renamed from tests/coverage-map/status-quo/overflow.cov-map) | 8 | ||||
-rw-r--r-- | tests/coverage/overflow.coverage (renamed from tests/run-coverage/overflow.coverage) | 1 | ||||
-rw-r--r-- | tests/coverage/overflow.rs | 64 | ||||
-rw-r--r-- | tests/coverage/panic_unwind.cov-map (renamed from tests/coverage-map/status-quo/panic_unwind.cov-map) | 0 | ||||
-rw-r--r-- | tests/coverage/panic_unwind.coverage (renamed from tests/run-coverage/panic_unwind.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/panic_unwind.rs (renamed from tests/coverage-map/status-quo/panic_unwind.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/partial_eq.cov-map (renamed from tests/coverage-map/status-quo/partial_eq.cov-map) | 12 | ||||
-rw-r--r-- | tests/coverage/partial_eq.coverage (renamed from tests/run-coverage/partial_eq.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/partial_eq.rs (renamed from tests/coverage-map/status-quo/partial_eq.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/simple_loop.cov-map | 27 | ||||
-rw-r--r-- | tests/coverage/simple_loop.coverage (renamed from tests/run-coverage/simple_loop.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/simple_loop.rs (renamed from tests/coverage-map/status-quo/simple_loop.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/simple_match.cov-map | 33 | ||||
-rw-r--r-- | tests/coverage/simple_match.coverage (renamed from tests/run-coverage/simple_match.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/simple_match.rs (renamed from tests/coverage-map/status-quo/simple_match.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/sort_groups.cov-map (renamed from tests/coverage-map/status-quo/sort_groups.cov-map) | 21 | ||||
-rw-r--r-- | tests/coverage/sort_groups.coverage (renamed from tests/run-coverage/sort_groups.coverage) | 2 | ||||
-rw-r--r-- | tests/coverage/sort_groups.rs | 23 | ||||
-rw-r--r-- | tests/coverage/test_harness.cov-map (renamed from tests/coverage-map/status-quo/test_harness.cov-map) | 4 | ||||
-rw-r--r-- | tests/coverage/test_harness.coverage (renamed from tests/run-coverage/test_harness.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/test_harness.rs (renamed from tests/coverage-map/status-quo/test_harness.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/tight_inf_loop.cov-map | 12 | ||||
-rw-r--r-- | tests/coverage/tight_inf_loop.coverage (renamed from tests/run-coverage/tight_inf_loop.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/tight_inf_loop.rs (renamed from tests/coverage-map/status-quo/tight_inf_loop.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/trivial.cov-map (renamed from tests/coverage-map/trivial.cov-map) | 0 | ||||
-rw-r--r-- | tests/coverage/trivial.coverage | 4 | ||||
-rw-r--r-- | tests/coverage/trivial.rs (renamed from tests/coverage-map/trivial.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/try_error_result.cov-map | 220 | ||||
-rw-r--r-- | tests/coverage/try_error_result.coverage (renamed from tests/run-coverage/try_error_result.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/try_error_result.rs (renamed from tests/coverage-map/status-quo/try_error_result.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/unreachable.cov-map | 24 | ||||
-rw-r--r-- | tests/coverage/unreachable.coverage | 38 | ||||
-rw-r--r-- | tests/coverage/unreachable.rs | 37 | ||||
-rw-r--r-- | tests/coverage/unused.cov-map (renamed from tests/coverage-map/status-quo/unused.cov-map) | 16 | ||||
-rw-r--r-- | tests/coverage/unused.coverage (renamed from tests/run-coverage/unused.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/unused.rs (renamed from tests/coverage-map/status-quo/unused.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/unused_mod.cov-map | 16 | ||||
-rw-r--r-- | tests/coverage/unused_mod.coverage (renamed from tests/run-coverage/unused_mod.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/unused_mod.rs (renamed from tests/run-coverage/unused_mod.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/uses_crate.cov-map | 40 | ||||
-rw-r--r-- | tests/coverage/uses_crate.coverage (renamed from tests/run-coverage/uses_crate.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/uses_crate.rs (renamed from tests/run-coverage/uses_crate.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/uses_inline_crate.cov-map | 55 | ||||
-rw-r--r-- | tests/coverage/uses_inline_crate.coverage (renamed from tests/run-coverage/uses_inline_crate.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/uses_inline_crate.rs (renamed from tests/run-coverage/uses_inline_crate.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/while.cov-map | 15 | ||||
-rw-r--r-- | tests/coverage/while.coverage (renamed from tests/run-coverage/while.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/while.rs (renamed from tests/coverage-map/status-quo/while.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/while_early_ret.cov-map (renamed from tests/coverage-map/status-quo/while_early_ret.cov-map) | 0 | ||||
-rw-r--r-- | tests/coverage/while_early_ret.coverage (renamed from tests/run-coverage/while_early_ret.coverage) | 0 | ||||
-rw-r--r-- | tests/coverage/while_early_ret.rs (renamed from tests/coverage-map/status-quo/while_early_ret.rs) | 0 | ||||
-rw-r--r-- | tests/coverage/yield.cov-map | 62 | ||||
-rw-r--r-- | tests/coverage/yield.coverage | 38 | ||||
-rw-r--r-- | tests/coverage/yield.rs | 37 |
187 files changed, 2928 insertions, 2235 deletions
diff --git a/tests/coverage-map/README.md b/tests/coverage-map/README.md deleted file mode 100644 index 60d1352cd..000000000 --- a/tests/coverage-map/README.md +++ /dev/null @@ -1,13 +0,0 @@ -The tests in `./status-quo` were copied from `tests/run-coverage` in order to -capture the current behavior of the instrumentor on non-trivial programs. -The actual mappings have not been closely inspected. - -## Maintenance note - -These tests can be sensitive to small changes in MIR spans or MIR control flow, -especially in HIR-to-MIR lowering or MIR optimizations. - -If you haven't touched the coverage code directly, and the `run-coverage` test -suite still works, then it should usually be OK to just `--bless` these -coverage mapping tests as necessary, without worrying too much about the exact -changes. diff --git a/tests/coverage-map/if.cov-map b/tests/coverage-map/if.cov-map deleted file mode 100644 index 3cedb5ffb..000000000 --- a/tests/coverage-map/if.cov-map +++ /dev/null @@ -1,15 +0,0 @@ -Function name: if::main -Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 03, 01, 02, 0c, 05, 02, 0d, 02, 06, 02, 02, 06, 00, 07, 07, 01, 05, 01, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 2 -- expression 0 operands: lhs = Counter(0), rhs = Counter(1) -- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) -Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 3, 1) to (start + 2, 12) -- Code(Counter(1)) at (prev + 2, 13) to (start + 2, 6) -- Code(Expression(0, Sub)) at (prev + 2, 6) to (start + 0, 7) - = (c0 - c1) -- Code(Expression(1, Add)) at (prev + 1, 5) to (start + 1, 2) - = (c1 + (c0 - c1)) - diff --git a/tests/coverage-map/if.rs b/tests/coverage-map/if.rs deleted file mode 100644 index ed3f69bdc..000000000 --- a/tests/coverage-map/if.rs +++ /dev/null @@ -1,9 +0,0 @@ -// compile-flags: --edition=2021 - -fn main() { - let cond = std::env::args().len() == 1; - if cond { - println!("true"); - } - println!("done"); -} diff --git a/tests/coverage-map/status-quo/closure.cov-map b/tests/coverage-map/status-quo/closure.cov-map deleted file mode 100644 index 7dbf6ec83..000000000 --- a/tests/coverage-map/status-quo/closure.cov-map +++ /dev/null @@ -1,324 +0,0 @@ -Function name: closure::main -Raw bytes (170): 0x[01, 01, 17, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 00, 01, 05, 05, 5a, 01, 05, 18, 01, 08, 01, 0f, 0d, 03, 16, 0e, 06, 0a, 07, 10, 05, 13, 0d, 0b, 1a, 0e, 06, 0a, 0f, 10, 05, 0c, 16, 13, 16, 05, 0d, 18, 17, 19, 09, 01, 1e, 1b, 04, 09, 00, 29, 1f, 01, 09, 00, 2d, 23, 01, 09, 00, 24, 27, 05, 09, 00, 24, 2b, 02, 09, 00, 21, 2f, 04, 09, 00, 21, 33, 04, 09, 00, 28, 37, 09, 09, 00, 32, 3b, 04, 09, 00, 33, 3f, 07, 09, 00, 4b, 43, 08, 09, 00, 48, 47, 0a, 09, 00, 47, 4b, 08, 09, 00, 44, 4f, 0a, 08, 00, 10, 05, 00, 11, 04, 06, 5a, 04, 06, 00, 07, 57, 01, 05, 03, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 23 -- expression 0 operands: lhs = Counter(0), rhs = Zero -- expression 1 operands: lhs = Counter(0), rhs = Zero -- expression 2 operands: lhs = Counter(0), rhs = Zero -- expression 3 operands: lhs = Counter(0), rhs = Zero -- expression 4 operands: lhs = Counter(0), rhs = Zero -- expression 5 operands: lhs = Counter(0), rhs = Zero -- expression 6 operands: lhs = Counter(0), rhs = Zero -- expression 7 operands: lhs = Counter(0), rhs = Zero -- expression 8 operands: lhs = Counter(0), rhs = Zero -- expression 9 operands: lhs = Counter(0), rhs = Zero -- expression 10 operands: lhs = Counter(0), rhs = Zero -- expression 11 operands: lhs = Counter(0), rhs = Zero -- expression 12 operands: lhs = Counter(0), rhs = Zero -- expression 13 operands: lhs = Counter(0), rhs = Zero -- expression 14 operands: lhs = Counter(0), rhs = Zero -- expression 15 operands: lhs = Counter(0), rhs = Zero -- expression 16 operands: lhs = Counter(0), rhs = Zero -- expression 17 operands: lhs = Counter(0), rhs = Zero -- expression 18 operands: lhs = Counter(0), rhs = Zero -- expression 19 operands: lhs = Counter(0), rhs = Zero -- expression 20 operands: lhs = Counter(0), rhs = Counter(1) -- expression 21 operands: lhs = Counter(1), rhs = Expression(22, Sub) -- expression 22 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 24 -- Code(Counter(0)) at (prev + 8, 1) to (start + 15, 13) -- Code(Expression(0, Add)) at (prev + 22, 14) to (start + 6, 10) - = (c0 + Zero) -- Code(Expression(1, Add)) at (prev + 16, 5) to (start + 19, 13) - = (c0 + Zero) -- Code(Expression(2, Add)) at (prev + 26, 14) to (start + 6, 10) - = (c0 + Zero) -- Code(Expression(3, Add)) at (prev + 16, 5) to (start + 12, 22) - = (c0 + Zero) -- Code(Expression(4, Add)) at (prev + 22, 5) to (start + 13, 24) - = (c0 + Zero) -- Code(Expression(5, Add)) at (prev + 25, 9) to (start + 1, 30) - = (c0 + Zero) -- Code(Expression(6, Add)) at (prev + 4, 9) to (start + 0, 41) - = (c0 + Zero) -- Code(Expression(7, Add)) at (prev + 1, 9) to (start + 0, 45) - = (c0 + Zero) -- Code(Expression(8, Add)) at (prev + 1, 9) to (start + 0, 36) - = (c0 + Zero) -- Code(Expression(9, Add)) at (prev + 5, 9) to (start + 0, 36) - = (c0 + Zero) -- Code(Expression(10, Add)) at (prev + 2, 9) to (start + 0, 33) - = (c0 + Zero) -- Code(Expression(11, Add)) at (prev + 4, 9) to (start + 0, 33) - = (c0 + Zero) -- Code(Expression(12, Add)) at (prev + 4, 9) to (start + 0, 40) - = (c0 + Zero) -- Code(Expression(13, Add)) at (prev + 9, 9) to (start + 0, 50) - = (c0 + Zero) -- Code(Expression(14, Add)) at (prev + 4, 9) to (start + 0, 51) - = (c0 + Zero) -- Code(Expression(15, Add)) at (prev + 7, 9) to (start + 0, 75) - = (c0 + Zero) -- Code(Expression(16, Add)) at (prev + 8, 9) to (start + 0, 72) - = (c0 + Zero) -- Code(Expression(17, Add)) at (prev + 10, 9) to (start + 0, 71) - = (c0 + Zero) -- Code(Expression(18, Add)) at (prev + 8, 9) to (start + 0, 68) - = (c0 + Zero) -- Code(Expression(19, Add)) at (prev + 10, 8) to (start + 0, 16) - = (c0 + Zero) -- Code(Counter(1)) at (prev + 0, 17) to (start + 4, 6) -- Code(Expression(22, Sub)) at (prev + 4, 6) to (start + 0, 7) - = (c0 - c1) -- Code(Expression(21, Add)) at (prev + 1, 5) to (start + 3, 2) - = (c1 + (c0 - c1)) - -Function name: closure::main::{closure#0} -Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 27, 05, 02, 14, 05, 02, 15, 02, 0a, 02, 02, 0a, 00, 0b, 07, 01, 09, 01, 06] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 2 -- expression 0 operands: lhs = Counter(0), rhs = Counter(1) -- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) -Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 39, 5) to (start + 2, 20) -- Code(Counter(1)) at (prev + 2, 21) to (start + 2, 10) -- Code(Expression(0, Sub)) at (prev + 2, 10) to (start + 0, 11) - = (c0 - c1) -- Code(Expression(1, Add)) at (prev + 1, 9) to (start + 1, 6) - = (c1 + (c0 - c1)) - -Function name: closure::main::{closure#10} (unused) -Raw bytes (10): 0x[01, 01, 00, 01, 01, 9a, 01, 07, 00, 21] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 0 -Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 154, 7) to (start + 0, 33) - -Function name: closure::main::{closure#11} (unused) -Raw bytes (10): 0x[01, 01, 00, 01, 01, 9e, 01, 07, 00, 21] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 0 -Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 158, 7) to (start + 0, 33) - -Function name: closure::main::{closure#12} (unused) -Raw bytes (10): 0x[01, 01, 00, 01, 01, a6, 01, 01, 00, 17] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 0 -Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 166, 1) to (start + 0, 23) - -Function name: closure::main::{closure#13} (unused) -Raw bytes (10): 0x[01, 01, 00, 01, 01, ab, 01, 0d, 02, 0e] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 0 -Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 171, 13) to (start + 2, 14) - -Function name: closure::main::{closure#14} -Raw bytes (38): 0x[01, 01, 04, 05, 0a, 01, 05, 01, 05, 03, 00, 05, 03, b2, 01, 0d, 00, 15, 01, 01, 11, 01, 1b, 05, 01, 1e, 00, 25, 0a, 00, 2f, 00, 33, 0f, 01, 0d, 00, 0e] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 4 -- expression 0 operands: lhs = Counter(1), rhs = Expression(2, Sub) -- expression 1 operands: lhs = Counter(0), rhs = Counter(1) -- expression 2 operands: lhs = Counter(0), rhs = Counter(1) -- expression 3 operands: lhs = Expression(0, Add), rhs = Zero -Number of file 0 mappings: 5 -- Code(Expression(0, Add)) at (prev + 178, 13) to (start + 0, 21) - = (c1 + (c0 - c1)) -- Code(Counter(0)) at (prev + 1, 17) to (start + 1, 27) -- Code(Counter(1)) at (prev + 1, 30) to (start + 0, 37) -- Code(Expression(2, Sub)) at (prev + 0, 47) to (start + 0, 51) - = (c0 - c1) -- Code(Expression(3, Add)) at (prev + 1, 13) to (start + 0, 14) - = ((c1 + (c0 - c1)) + Zero) - -Function name: closure::main::{closure#15} -Raw bytes (45): 0x[01, 01, 05, 05, 0e, 01, 05, 01, 00, 01, 05, 03, 00, 06, 01, ba, 01, 09, 00, 0a, 03, 01, 0d, 00, 15, 0b, 01, 11, 01, 1b, 05, 01, 1e, 00, 25, 0e, 00, 2f, 00, 33, 13, 02, 09, 00, 0a] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 5 -- expression 0 operands: lhs = Counter(1), rhs = Expression(3, Sub) -- expression 1 operands: lhs = Counter(0), rhs = Counter(1) -- expression 2 operands: lhs = Counter(0), rhs = Zero -- expression 3 operands: lhs = Counter(0), rhs = Counter(1) -- expression 4 operands: lhs = Expression(0, Add), rhs = Zero -Number of file 0 mappings: 6 -- Code(Counter(0)) at (prev + 186, 9) to (start + 0, 10) -- Code(Expression(0, Add)) at (prev + 1, 13) to (start + 0, 21) - = (c1 + (c0 - c1)) -- Code(Expression(2, Add)) at (prev + 1, 17) to (start + 1, 27) - = (c0 + Zero) -- Code(Counter(1)) at (prev + 1, 30) to (start + 0, 37) -- Code(Expression(3, Sub)) at (prev + 0, 47) to (start + 0, 51) - = (c0 - c1) -- Code(Expression(4, Add)) at (prev + 2, 9) to (start + 0, 10) - = ((c1 + (c0 - c1)) + Zero) - -Function name: closure::main::{closure#16} -Raw bytes (38): 0x[01, 01, 04, 05, 0a, 01, 05, 01, 05, 03, 00, 05, 03, c4, 01, 0d, 00, 15, 01, 01, 11, 01, 1b, 05, 01, 1e, 00, 25, 0a, 00, 2f, 00, 33, 0f, 01, 0d, 00, 0e] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 4 -- expression 0 operands: lhs = Counter(1), rhs = Expression(2, Sub) -- expression 1 operands: lhs = Counter(0), rhs = Counter(1) -- expression 2 operands: lhs = Counter(0), rhs = Counter(1) -- expression 3 operands: lhs = Expression(0, Add), rhs = Zero -Number of file 0 mappings: 5 -- Code(Expression(0, Add)) at (prev + 196, 13) to (start + 0, 21) - = (c1 + (c0 - c1)) -- Code(Counter(0)) at (prev + 1, 17) to (start + 1, 27) -- Code(Counter(1)) at (prev + 1, 30) to (start + 0, 37) -- Code(Expression(2, Sub)) at (prev + 0, 47) to (start + 0, 51) - = (c0 - c1) -- Code(Expression(3, Add)) at (prev + 1, 13) to (start + 0, 14) - = ((c1 + (c0 - c1)) + Zero) - -Function name: closure::main::{closure#17} -Raw bytes (45): 0x[01, 01, 05, 05, 0e, 01, 05, 01, 00, 01, 05, 03, 00, 06, 01, cc, 01, 09, 00, 0a, 03, 01, 0d, 00, 15, 0b, 01, 11, 01, 1b, 05, 01, 1e, 00, 25, 0e, 00, 2f, 00, 33, 13, 02, 09, 00, 0a] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 5 -- expression 0 operands: lhs = Counter(1), rhs = Expression(3, Sub) -- expression 1 operands: lhs = Counter(0), rhs = Counter(1) -- expression 2 operands: lhs = Counter(0), rhs = Zero -- expression 3 operands: lhs = Counter(0), rhs = Counter(1) -- expression 4 operands: lhs = Expression(0, Add), rhs = Zero -Number of file 0 mappings: 6 -- Code(Counter(0)) at (prev + 204, 9) to (start + 0, 10) -- Code(Expression(0, Add)) at (prev + 1, 13) to (start + 0, 21) - = (c1 + (c0 - c1)) -- Code(Expression(2, Add)) at (prev + 1, 17) to (start + 1, 27) - = (c0 + Zero) -- Code(Counter(1)) at (prev + 1, 30) to (start + 0, 37) -- Code(Expression(3, Sub)) at (prev + 0, 47) to (start + 0, 51) - = (c0 - c1) -- Code(Expression(4, Add)) at (prev + 2, 9) to (start + 0, 10) - = ((c1 + (c0 - c1)) + Zero) - -Function name: closure::main::{closure#18} -Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 18, 0d, 02, 1c, 05, 02, 1d, 02, 12, 02, 02, 12, 00, 13, 07, 01, 11, 01, 0e] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 2 -- expression 0 operands: lhs = Counter(0), rhs = Counter(1) -- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) -Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 24, 13) to (start + 2, 28) -- Code(Counter(1)) at (prev + 2, 29) to (start + 2, 18) -- Code(Expression(0, Sub)) at (prev + 2, 18) to (start + 0, 19) - = (c0 - c1) -- Code(Expression(1, Add)) at (prev + 1, 17) to (start + 1, 14) - = (c1 + (c0 - c1)) - -Function name: closure::main::{closure#19} -Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 42, 0d, 02, 1c, 05, 02, 1d, 02, 12, 02, 02, 12, 00, 13, 07, 01, 11, 01, 0e] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 2 -- expression 0 operands: lhs = Counter(0), rhs = Counter(1) -- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) -Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 66, 13) to (start + 2, 28) -- Code(Counter(1)) at (prev + 2, 29) to (start + 2, 18) -- Code(Expression(0, Sub)) at (prev + 2, 18) to (start + 0, 19) - = (c0 - c1) -- Code(Expression(1, Add)) at (prev + 1, 17) to (start + 1, 14) - = (c1 + (c0 - c1)) - -Function name: closure::main::{closure#1} -Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 51, 05, 02, 14, 05, 02, 15, 02, 0a, 02, 02, 0a, 00, 0b, 07, 01, 09, 01, 06] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 2 -- expression 0 operands: lhs = Counter(0), rhs = Counter(1) -- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) -Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 81, 5) to (start + 2, 20) -- Code(Counter(1)) at (prev + 2, 21) to (start + 2, 10) -- Code(Expression(0, Sub)) at (prev + 2, 10) to (start + 0, 11) - = (c0 - c1) -- Code(Expression(1, Add)) at (prev + 1, 9) to (start + 1, 6) - = (c1 + (c0 - c1)) - -Function name: closure::main::{closure#2} -Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 67, 05, 02, 14, 05, 02, 15, 02, 0a, 02, 02, 0a, 00, 0b, 07, 01, 09, 01, 06] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 2 -- expression 0 operands: lhs = Counter(0), rhs = Counter(1) -- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) -Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 103, 5) to (start + 2, 20) -- Code(Counter(1)) at (prev + 2, 21) to (start + 2, 10) -- Code(Expression(0, Sub)) at (prev + 2, 10) to (start + 0, 11) - = (c0 - c1) -- Code(Expression(1, Add)) at (prev + 1, 9) to (start + 1, 6) - = (c1 + (c0 - c1)) - -Function name: closure::main::{closure#3} (unused) -Raw bytes (25): 0x[01, 01, 00, 04, 01, 80, 01, 05, 01, 14, 00, 01, 15, 02, 0a, 00, 02, 0a, 00, 0b, 00, 01, 09, 01, 06] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 0 -Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 128, 5) to (start + 1, 20) -- Code(Zero) at (prev + 1, 21) to (start + 2, 10) -- Code(Zero) at (prev + 2, 10) to (start + 0, 11) -- Code(Zero) at (prev + 1, 9) to (start + 1, 6) - -Function name: closure::main::{closure#4} (unused) -Raw bytes (10): 0x[01, 01, 00, 01, 01, 88, 01, 35, 00, 43] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 0 -Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 136, 53) to (start + 0, 67) - -Function name: closure::main::{closure#5} -Raw bytes (10): 0x[01, 01, 00, 01, 01, 8b, 01, 3d, 00, 4f] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 0 -Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 139, 61) to (start + 0, 79) - -Function name: closure::main::{closure#6} -Raw bytes (10): 0x[01, 01, 00, 01, 01, 8c, 01, 41, 00, 57] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 0 -Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 140, 65) to (start + 0, 87) - -Function name: closure::main::{closure#7} (unused) -Raw bytes (10): 0x[01, 01, 00, 01, 01, 8d, 01, 3b, 00, 51] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 0 -Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 141, 59) to (start + 0, 81) - -Function name: closure::main::{closure#8} (unused) -Raw bytes (10): 0x[01, 01, 00, 01, 01, 92, 01, 3b, 00, 55] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 0 -Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 146, 59) to (start + 0, 85) - -Function name: closure::main::{closure#9} (unused) -Raw bytes (10): 0x[01, 01, 00, 01, 01, 94, 01, 38, 02, 06] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 0 -Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 148, 56) to (start + 2, 6) - diff --git a/tests/coverage-map/status-quo/closure_bug.cov-map b/tests/coverage-map/status-quo/closure_bug.cov-map deleted file mode 100644 index 4fe2e5ad2..000000000 --- a/tests/coverage-map/status-quo/closure_bug.cov-map +++ /dev/null @@ -1,148 +0,0 @@ -Function name: closure_bug::main -Raw bytes (241): 0x[01, 01, 34, 01, 00, 01, 05, 05, ce, 01, 01, 05, cb, 01, 00, 05, ce, 01, 01, 05, cb, 01, 09, 05, ce, 01, 01, 05, 09, c6, 01, cb, 01, 09, 05, ce, 01, 01, 05, c3, 01, 00, 09, c6, 01, cb, 01, 09, 05, ce, 01, 01, 05, c3, 01, 0d, 09, c6, 01, cb, 01, 09, 05, ce, 01, 01, 05, 0d, be, 01, c3, 01, 0d, 09, c6, 01, cb, 01, 09, 05, ce, 01, 01, 05, bb, 01, 00, 0d, be, 01, c3, 01, 0d, 09, c6, 01, cb, 01, 09, 05, ce, 01, 01, 05, bb, 01, 11, 0d, be, 01, c3, 01, 0d, 09, c6, 01, cb, 01, 09, 05, ce, 01, 01, 05, 11, b6, 01, bb, 01, 11, 0d, be, 01, c3, 01, 0d, 09, c6, 01, cb, 01, 09, 05, ce, 01, 01, 05, 11, 01, 06, 01, 03, 0a, 03, 09, 05, 01, 0e, 05, 01, 0f, 00, 17, ce, 01, 00, 17, 00, 18, cb, 01, 02, 09, 00, 0a, 13, 06, 05, 01, 0e, 09, 01, 0f, 00, 17, c6, 01, 00, 17, 00, 18, c3, 01, 02, 09, 00, 0a, 3b, 06, 05, 01, 0e, 0d, 01, 0f, 00, 17, be, 01, 00, 17, 00, 18, bb, 01, 02, 09, 00, 0a, 7b, 06, 05, 01, 0e, 11, 01, 0f, 00, 17, b6, 01, 00, 17, 00, 18, b3, 01, 01, 01, 00, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 52 -- expression 0 operands: lhs = Counter(0), rhs = Zero -- expression 1 operands: lhs = Counter(0), rhs = Counter(1) -- expression 2 operands: lhs = Counter(1), rhs = Expression(51, Sub) -- expression 3 operands: lhs = Counter(0), rhs = Counter(1) -- expression 4 operands: lhs = Expression(50, Add), rhs = Zero -- expression 5 operands: lhs = Counter(1), rhs = Expression(51, Sub) -- expression 6 operands: lhs = Counter(0), rhs = Counter(1) -- expression 7 operands: lhs = Expression(50, Add), rhs = Counter(2) -- expression 8 operands: lhs = Counter(1), rhs = Expression(51, Sub) -- expression 9 operands: lhs = Counter(0), rhs = Counter(1) -- expression 10 operands: lhs = Counter(2), rhs = Expression(49, Sub) -- expression 11 operands: lhs = Expression(50, Add), rhs = Counter(2) -- expression 12 operands: lhs = Counter(1), rhs = Expression(51, Sub) -- expression 13 operands: lhs = Counter(0), rhs = Counter(1) -- expression 14 operands: lhs = Expression(48, Add), rhs = Zero -- expression 15 operands: lhs = Counter(2), rhs = Expression(49, Sub) -- expression 16 operands: lhs = Expression(50, Add), rhs = Counter(2) -- expression 17 operands: lhs = Counter(1), rhs = Expression(51, Sub) -- expression 18 operands: lhs = Counter(0), rhs = Counter(1) -- expression 19 operands: lhs = Expression(48, Add), rhs = Counter(3) -- expression 20 operands: lhs = Counter(2), rhs = Expression(49, Sub) -- expression 21 operands: lhs = Expression(50, Add), rhs = Counter(2) -- expression 22 operands: lhs = Counter(1), rhs = Expression(51, Sub) -- expression 23 operands: lhs = Counter(0), rhs = Counter(1) -- expression 24 operands: lhs = Counter(3), rhs = Expression(47, Sub) -- expression 25 operands: lhs = Expression(48, Add), rhs = Counter(3) -- expression 26 operands: lhs = Counter(2), rhs = Expression(49, Sub) -- expression 27 operands: lhs = Expression(50, Add), rhs = Counter(2) -- expression 28 operands: lhs = Counter(1), rhs = Expression(51, Sub) -- expression 29 operands: lhs = Counter(0), rhs = Counter(1) -- expression 30 operands: lhs = Expression(46, Add), rhs = Zero -- expression 31 operands: lhs = Counter(3), rhs = Expression(47, Sub) -- expression 32 operands: lhs = Expression(48, Add), rhs = Counter(3) -- expression 33 operands: lhs = Counter(2), rhs = Expression(49, Sub) -- expression 34 operands: lhs = Expression(50, Add), rhs = Counter(2) -- expression 35 operands: lhs = Counter(1), rhs = Expression(51, Sub) -- expression 36 operands: lhs = Counter(0), rhs = Counter(1) -- expression 37 operands: lhs = Expression(46, Add), rhs = Counter(4) -- expression 38 operands: lhs = Counter(3), rhs = Expression(47, Sub) -- expression 39 operands: lhs = Expression(48, Add), rhs = Counter(3) -- expression 40 operands: lhs = Counter(2), rhs = Expression(49, Sub) -- expression 41 operands: lhs = Expression(50, Add), rhs = Counter(2) -- expression 42 operands: lhs = Counter(1), rhs = Expression(51, Sub) -- expression 43 operands: lhs = Counter(0), rhs = Counter(1) -- expression 44 operands: lhs = Counter(4), rhs = Expression(45, Sub) -- expression 45 operands: lhs = Expression(46, Add), rhs = Counter(4) -- expression 46 operands: lhs = Counter(3), rhs = Expression(47, Sub) -- expression 47 operands: lhs = Expression(48, Add), rhs = Counter(3) -- expression 48 operands: lhs = Counter(2), rhs = Expression(49, Sub) -- expression 49 operands: lhs = Expression(50, Add), rhs = Counter(2) -- expression 50 operands: lhs = Counter(1), rhs = Expression(51, Sub) -- expression 51 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 17 -- Code(Counter(0)) at (prev + 6, 1) to (start + 3, 10) -- Code(Expression(0, Add)) at (prev + 9, 5) to (start + 1, 14) - = (c0 + Zero) -- Code(Counter(1)) at (prev + 1, 15) to (start + 0, 23) -- Code(Expression(51, Sub)) at (prev + 0, 23) to (start + 0, 24) - = (c0 - c1) -- Code(Expression(50, Add)) at (prev + 2, 9) to (start + 0, 10) - = (c1 + (c0 - c1)) -- Code(Expression(4, Add)) at (prev + 6, 5) to (start + 1, 14) - = ((c1 + (c0 - c1)) + Zero) -- Code(Counter(2)) at (prev + 1, 15) to (start + 0, 23) -- Code(Expression(49, Sub)) at (prev + 0, 23) to (start + 0, 24) - = ((c1 + (c0 - c1)) - c2) -- Code(Expression(48, Add)) at (prev + 2, 9) to (start + 0, 10) - = (c2 + ((c1 + (c0 - c1)) - c2)) -- Code(Expression(14, Add)) at (prev + 6, 5) to (start + 1, 14) - = ((c2 + ((c1 + (c0 - c1)) - c2)) + Zero) -- Code(Counter(3)) at (prev + 1, 15) to (start + 0, 23) -- Code(Expression(47, Sub)) at (prev + 0, 23) to (start + 0, 24) - = ((c2 + ((c1 + (c0 - c1)) - c2)) - c3) -- Code(Expression(46, Add)) at (prev + 2, 9) to (start + 0, 10) - = (c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) -- Code(Expression(30, Add)) at (prev + 6, 5) to (start + 1, 14) - = ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) + Zero) -- Code(Counter(4)) at (prev + 1, 15) to (start + 0, 23) -- Code(Expression(45, Sub)) at (prev + 0, 23) to (start + 0, 24) - = ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4) -- Code(Expression(44, Add)) at (prev + 1, 1) to (start + 0, 2) - = (c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4)) - -Function name: closure_bug::main::{closure#0} -Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 0d, 09, 00, 12, 05, 00, 15, 00, 19, 02, 00, 23, 00, 28, 07, 00, 29, 00, 2a] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 2 -- expression 0 operands: lhs = Counter(0), rhs = Counter(1) -- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) -Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 13, 9) to (start + 0, 18) -- Code(Counter(1)) at (prev + 0, 21) to (start + 0, 25) -- Code(Expression(0, Sub)) at (prev + 0, 35) to (start + 0, 40) - = (c0 - c1) -- Code(Expression(1, Add)) at (prev + 0, 41) to (start + 0, 42) - = (c1 + (c0 - c1)) - -Function name: closure_bug::main::{closure#1} -Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 16, 09, 00, 12, 05, 00, 15, 00, 19, 02, 00, 23, 00, 28, 07, 00, 29, 00, 2a] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 2 -- expression 0 operands: lhs = Counter(0), rhs = Counter(1) -- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) -Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 22, 9) to (start + 0, 18) -- Code(Counter(1)) at (prev + 0, 21) to (start + 0, 25) -- Code(Expression(0, Sub)) at (prev + 0, 35) to (start + 0, 40) - = (c0 - c1) -- Code(Expression(1, Add)) at (prev + 0, 41) to (start + 0, 42) - = (c1 + (c0 - c1)) - -Function name: closure_bug::main::{closure#2} -Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 1f, 09, 00, 12, 05, 00, 15, 00, 19, 02, 00, 23, 00, 28, 07, 00, 29, 00, 2a] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 2 -- expression 0 operands: lhs = Counter(0), rhs = Counter(1) -- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) -Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 31, 9) to (start + 0, 18) -- Code(Counter(1)) at (prev + 0, 21) to (start + 0, 25) -- Code(Expression(0, Sub)) at (prev + 0, 35) to (start + 0, 40) - = (c0 - c1) -- Code(Expression(1, Add)) at (prev + 0, 41) to (start + 0, 42) - = (c1 + (c0 - c1)) - -Function name: closure_bug::main::{closure#3} -Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 28, 09, 00, 12, 05, 00, 15, 00, 19, 02, 00, 23, 00, 28, 07, 00, 29, 00, 2a] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 2 -- expression 0 operands: lhs = Counter(0), rhs = Counter(1) -- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) -Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 40, 9) to (start + 0, 18) -- Code(Counter(1)) at (prev + 0, 21) to (start + 0, 25) -- Code(Expression(0, Sub)) at (prev + 0, 35) to (start + 0, 40) - = (c0 - c1) -- Code(Expression(1, Add)) at (prev + 0, 41) to (start + 0, 42) - = (c1 + (c0 - c1)) - diff --git a/tests/coverage-map/status-quo/closure_macro.cov-map b/tests/coverage-map/status-quo/closure_macro.cov-map deleted file mode 100644 index ac017eb44..000000000 --- a/tests/coverage-map/status-quo/closure_macro.cov-map +++ /dev/null @@ -1,40 +0,0 @@ -Function name: closure_macro::load_configuration_files -Raw bytes (9): 0x[01, 01, 00, 01, 01, 1d, 01, 02, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 0 -Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 29, 1) to (start + 2, 2) - -Function name: closure_macro::main -Raw bytes (49): 0x[01, 01, 05, 01, 05, 02, 00, 05, 00, 02, 00, 05, 02, 07, 01, 21, 01, 01, 21, 02, 02, 09, 00, 0f, 05, 00, 12, 00, 13, 07, 00, 12, 00, 13, 0b, 00, 54, 00, 55, 0f, 02, 09, 02, 0b, 13, 03, 01, 00, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 5 -- expression 0 operands: lhs = Counter(0), rhs = Counter(1) -- expression 1 operands: lhs = Expression(0, Sub), rhs = Zero -- expression 2 operands: lhs = Counter(1), rhs = Zero -- expression 3 operands: lhs = Expression(0, Sub), rhs = Zero -- expression 4 operands: lhs = Counter(1), rhs = Expression(0, Sub) -Number of file 0 mappings: 7 -- Code(Counter(0)) at (prev + 33, 1) to (start + 1, 33) -- Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 15) - = (c0 - c1) -- Code(Counter(1)) at (prev + 0, 18) to (start + 0, 19) -- Code(Expression(1, Add)) at (prev + 0, 18) to (start + 0, 19) - = ((c0 - c1) + Zero) -- Code(Expression(2, Add)) at (prev + 0, 84) to (start + 0, 85) - = (c1 + Zero) -- Code(Expression(3, Add)) at (prev + 2, 9) to (start + 2, 11) - = ((c0 - c1) + Zero) -- Code(Expression(4, Add)) at (prev + 3, 1) to (start + 0, 2) - = (c1 + (c0 - c1)) - -Function name: closure_macro::main::{closure#0} -Raw bytes (9): 0x[01, 01, 00, 01, 01, 23, 12, 00, 54] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 0 -Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 35, 18) to (start + 0, 84) - diff --git a/tests/coverage-map/status-quo/closure_macro_async.cov-map b/tests/coverage-map/status-quo/closure_macro_async.cov-map deleted file mode 100644 index c9a142e5a..000000000 --- a/tests/coverage-map/status-quo/closure_macro_async.cov-map +++ /dev/null @@ -1,48 +0,0 @@ -Function name: closure_macro_async::load_configuration_files -Raw bytes (9): 0x[01, 01, 00, 01, 01, 1d, 01, 02, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 0 -Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 29, 1) to (start + 2, 2) - -Function name: closure_macro_async::test -Raw bytes (9): 0x[01, 01, 00, 01, 01, 21, 01, 00, 2b] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 0 -Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 33, 1) to (start + 0, 43) - -Function name: closure_macro_async::test::{closure#0} -Raw bytes (49): 0x[01, 01, 05, 01, 05, 02, 00, 05, 00, 02, 00, 05, 02, 07, 01, 21, 2b, 01, 21, 02, 02, 09, 00, 0f, 05, 00, 12, 00, 13, 07, 00, 12, 00, 13, 0b, 00, 54, 00, 55, 0f, 02, 09, 02, 0b, 13, 03, 01, 00, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 5 -- expression 0 operands: lhs = Counter(0), rhs = Counter(1) -- expression 1 operands: lhs = Expression(0, Sub), rhs = Zero -- expression 2 operands: lhs = Counter(1), rhs = Zero -- expression 3 operands: lhs = Expression(0, Sub), rhs = Zero -- expression 4 operands: lhs = Counter(1), rhs = Expression(0, Sub) -Number of file 0 mappings: 7 -- Code(Counter(0)) at (prev + 33, 43) to (start + 1, 33) -- Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 15) - = (c0 - c1) -- Code(Counter(1)) at (prev + 0, 18) to (start + 0, 19) -- Code(Expression(1, Add)) at (prev + 0, 18) to (start + 0, 19) - = ((c0 - c1) + Zero) -- Code(Expression(2, Add)) at (prev + 0, 84) to (start + 0, 85) - = (c1 + Zero) -- Code(Expression(3, Add)) at (prev + 2, 9) to (start + 2, 11) - = ((c0 - c1) + Zero) -- Code(Expression(4, Add)) at (prev + 3, 1) to (start + 0, 2) - = (c1 + (c0 - c1)) - -Function name: closure_macro_async::test::{closure#0}::{closure#0} -Raw bytes (9): 0x[01, 01, 00, 01, 01, 23, 12, 00, 54] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 0 -Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 35, 18) to (start + 0, 84) - diff --git a/tests/coverage-map/status-quo/conditions.cov-map b/tests/coverage-map/status-quo/conditions.cov-map deleted file mode 100644 index d82b8389b..000000000 --- a/tests/coverage-map/status-quo/conditions.cov-map +++ /dev/null @@ -1,261 +0,0 @@ -Function name: conditions::main -Raw bytes (793): 0x[01, 01, 90, 01, 09, 33, 37, 41, 3b, 3d, 35, 39, 05, 00, bf, 04, 09, 05, 00, 0d, 35, 26, 39, 0d, 35, 3b, 3d, 35, 39, 37, 41, 3b, 3d, 35, 39, ba, 04, 0d, bf, 04, 09, 05, 00, 03, 00, 45, 00, 87, 01, 49, 45, 00, 82, 01, 31, 87, 01, 49, 45, 00, 7e, 4d, 82, 01, 31, 87, 01, 49, 45, 00, 7a, 51, 7e, 4d, 82, 01, 31, 87, 01, 49, 45, 00, ab, 01, 55, 4d, 51, a7, 01, 59, ab, 01, 55, 4d, 51, 49, a3, 01, a7, 01, 59, ab, 01, 55, 4d, 51, 61, 00, e7, 01, 65, 61, 00, e2, 01, 2d, e7, 01, 65, 61, 00, de, 01, 69, e2, 01, 2d, e7, 01, 65, 61, 00, da, 01, 6d, de, 01, 69, e2, 01, 2d, e7, 01, 65, 61, 00, 8f, 02, 71, 69, 6d, 8b, 02, 75, 8f, 02, 71, 69, 6d, 83, 02, 00, 65, 87, 02, 8b, 02, 75, 8f, 02, 71, 69, 6d, 7d, f3, 03, f7, 03, 8d, 01, fb, 03, 89, 01, 81, 01, 85, 01, 79, 00, db, 02, 7d, 79, 00, d6, 02, 29, db, 02, 7d, 79, 00, d2, 02, 81, 01, d6, 02, 29, db, 02, 7d, 79, 00, ce, 02, 85, 01, d2, 02, 81, 01, d6, 02, 29, db, 02, 7d, 79, 00, fb, 03, 89, 01, 81, 01, 85, 01, f7, 03, 8d, 01, fb, 03, 89, 01, 81, 01, 85, 01, 11, 9b, 04, 9f, 04, 21, a3, 04, 1d, 15, 19, ef, 03, 00, 7d, f3, 03, f7, 03, 8d, 01, fb, 03, 89, 01, 81, 01, 85, 01, ef, 03, 11, 7d, f3, 03, f7, 03, 8d, 01, fb, 03, 89, 01, 81, 01, 85, 01, ea, 03, 25, ef, 03, 11, 7d, f3, 03, f7, 03, 8d, 01, fb, 03, 89, 01, 81, 01, 85, 01, e6, 03, 15, ea, 03, 25, ef, 03, 11, 7d, f3, 03, f7, 03, 8d, 01, fb, 03, 89, 01, 81, 01, 85, 01, e2, 03, 19, e6, 03, 15, ea, 03, 25, ef, 03, 11, 7d, f3, 03, f7, 03, 8d, 01, fb, 03, 89, 01, 81, 01, 85, 01, a3, 04, 1d, 15, 19, 9f, 04, 21, a3, 04, 1d, 15, 19, 97, 04, a7, 04, 11, 9b, 04, 9f, 04, 21, a3, 04, 1d, 15, 19, ab, 04, b6, 04, af, 04, b3, 04, 25, 29, 2d, 31, ba, 04, 0d, bf, 04, 09, 05, 00, 44, 01, 03, 01, 02, 0c, 05, 02, 0d, 02, 06, 00, 02, 06, 00, 07, 03, 03, 09, 00, 0a, bf, 04, 00, 10, 00, 1d, 09, 01, 09, 01, 0a, ba, 04, 02, 0f, 00, 1c, 0d, 01, 0c, 00, 19, 26, 00, 1d, 00, 2a, 22, 00, 2e, 00, 3c, 37, 00, 3d, 02, 0a, 41, 02, 0a, 00, 0b, 33, 01, 09, 01, 12, b6, 04, 03, 09, 00, 0f, 4b, 03, 09, 01, 0c, 45, 01, 0d, 02, 06, 00, 02, 06, 00, 07, 87, 01, 02, 08, 00, 15, 49, 00, 16, 02, 06, 82, 01, 02, 0f, 00, 1c, 7e, 01, 0c, 00, 19, 7a, 00, 1d, 00, 2a, 76, 00, 2e, 00, 3c, a7, 01, 00, 3d, 02, 0a, 59, 02, 0a, 00, 0b, a3, 01, 01, 09, 00, 17, 31, 02, 09, 00, 0f, 9f, 01, 03, 08, 00, 0c, 5d, 01, 0d, 01, 10, 61, 01, 11, 02, 0a, 00, 02, 0a, 00, 0b, e7, 01, 02, 0c, 00, 19, 65, 00, 1a, 02, 0a, e2, 01, 03, 11, 00, 1e, de, 01, 01, 10, 00, 1d, da, 01, 00, 21, 00, 2e, d6, 01, 00, 32, 00, 40, 8b, 02, 00, 41, 02, 0e, 75, 02, 0e, 00, 0f, 87, 02, 01, 0d, 00, 1b, 2d, 02, 0d, 00, 13, 00, 02, 06, 00, 07, ff, 01, 02, 09, 01, 0c, 79, 01, 0d, 02, 06, 00, 02, 06, 00, 07, ef, 03, 02, 09, 00, 0a, db, 02, 00, 10, 00, 1d, 7d, 00, 1e, 02, 06, d6, 02, 02, 0f, 00, 1c, d2, 02, 01, 0c, 00, 19, ce, 02, 00, 1d, 00, 2a, ca, 02, 00, 2e, 00, 3c, f7, 03, 00, 3d, 02, 0a, 8d, 01, 02, 0a, 00, 0b, f3, 03, 01, 09, 00, 17, 29, 02, 0d, 02, 0f, 97, 04, 05, 09, 00, 0a, 83, 03, 00, 10, 00, 1d, 11, 00, 1e, 02, 06, ea, 03, 02, 0f, 00, 1c, e6, 03, 01, 0c, 00, 19, e2, 03, 00, 1d, 00, 2a, de, 03, 00, 2e, 00, 3c, 9f, 04, 00, 3d, 02, 0a, 21, 02, 0a, 00, 0b, 9b, 04, 01, 09, 00, 17, 25, 02, 09, 00, 0f, 93, 04, 02, 01, 00, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 144 -- expression 0 operands: lhs = Counter(2), rhs = Expression(12, Add) -- expression 1 operands: lhs = Expression(13, Add), rhs = Counter(16) -- expression 2 operands: lhs = Expression(14, Add), rhs = Counter(15) -- expression 3 operands: lhs = Counter(13), rhs = Counter(14) -- expression 4 operands: lhs = Counter(1), rhs = Zero -- expression 5 operands: lhs = Expression(143, Add), rhs = Counter(2) -- expression 6 operands: lhs = Counter(1), rhs = Zero -- expression 7 operands: lhs = Counter(3), rhs = Counter(13) -- expression 8 operands: lhs = Expression(9, Sub), rhs = Counter(14) -- expression 9 operands: lhs = Counter(3), rhs = Counter(13) -- expression 10 operands: lhs = Expression(14, Add), rhs = Counter(15) -- expression 11 operands: lhs = Counter(13), rhs = Counter(14) -- expression 12 operands: lhs = Expression(13, Add), rhs = Counter(16) -- expression 13 operands: lhs = Expression(14, Add), rhs = Counter(15) -- expression 14 operands: lhs = Counter(13), rhs = Counter(14) -- expression 15 operands: lhs = Expression(142, Sub), rhs = Counter(3) -- expression 16 operands: lhs = Expression(143, Add), rhs = Counter(2) -- expression 17 operands: lhs = Counter(1), rhs = Zero -- expression 18 operands: lhs = Expression(0, Add), rhs = Zero -- expression 19 operands: lhs = Counter(17), rhs = Zero -- expression 20 operands: lhs = Expression(33, Add), rhs = Counter(18) -- expression 21 operands: lhs = Counter(17), rhs = Zero -- expression 22 operands: lhs = Expression(32, Sub), rhs = Counter(12) -- expression 23 operands: lhs = Expression(33, Add), rhs = Counter(18) -- expression 24 operands: lhs = Counter(17), rhs = Zero -- expression 25 operands: lhs = Expression(31, Sub), rhs = Counter(19) -- expression 26 operands: lhs = Expression(32, Sub), rhs = Counter(12) -- expression 27 operands: lhs = Expression(33, Add), rhs = Counter(18) -- expression 28 operands: lhs = Counter(17), rhs = Zero -- expression 29 operands: lhs = Expression(30, Sub), rhs = Counter(20) -- expression 30 operands: lhs = Expression(31, Sub), rhs = Counter(19) -- expression 31 operands: lhs = Expression(32, Sub), rhs = Counter(12) -- expression 32 operands: lhs = Expression(33, Add), rhs = Counter(18) -- expression 33 operands: lhs = Counter(17), rhs = Zero -- expression 34 operands: lhs = Expression(42, Add), rhs = Counter(21) -- expression 35 operands: lhs = Counter(19), rhs = Counter(20) -- expression 36 operands: lhs = Expression(41, Add), rhs = Counter(22) -- expression 37 operands: lhs = Expression(42, Add), rhs = Counter(21) -- expression 38 operands: lhs = Counter(19), rhs = Counter(20) -- expression 39 operands: lhs = Counter(18), rhs = Expression(40, Add) -- expression 40 operands: lhs = Expression(41, Add), rhs = Counter(22) -- expression 41 operands: lhs = Expression(42, Add), rhs = Counter(21) -- expression 42 operands: lhs = Counter(19), rhs = Counter(20) -- expression 43 operands: lhs = Counter(24), rhs = Zero -- expression 44 operands: lhs = Expression(57, Add), rhs = Counter(25) -- expression 45 operands: lhs = Counter(24), rhs = Zero -- expression 46 operands: lhs = Expression(56, Sub), rhs = Counter(11) -- expression 47 operands: lhs = Expression(57, Add), rhs = Counter(25) -- expression 48 operands: lhs = Counter(24), rhs = Zero -- expression 49 operands: lhs = Expression(55, Sub), rhs = Counter(26) -- expression 50 operands: lhs = Expression(56, Sub), rhs = Counter(11) -- expression 51 operands: lhs = Expression(57, Add), rhs = Counter(25) -- expression 52 operands: lhs = Counter(24), rhs = Zero -- expression 53 operands: lhs = Expression(54, Sub), rhs = Counter(27) -- expression 54 operands: lhs = Expression(55, Sub), rhs = Counter(26) -- expression 55 operands: lhs = Expression(56, Sub), rhs = Counter(11) -- expression 56 operands: lhs = Expression(57, Add), rhs = Counter(25) -- expression 57 operands: lhs = Counter(24), rhs = Zero -- expression 58 operands: lhs = Expression(67, Add), rhs = Counter(28) -- expression 59 operands: lhs = Counter(26), rhs = Counter(27) -- expression 60 operands: lhs = Expression(66, Add), rhs = Counter(29) -- expression 61 operands: lhs = Expression(67, Add), rhs = Counter(28) -- expression 62 operands: lhs = Counter(26), rhs = Counter(27) -- expression 63 operands: lhs = Expression(64, Add), rhs = Zero -- expression 64 operands: lhs = Counter(25), rhs = Expression(65, Add) -- expression 65 operands: lhs = Expression(66, Add), rhs = Counter(29) -- expression 66 operands: lhs = Expression(67, Add), rhs = Counter(28) -- expression 67 operands: lhs = Counter(26), rhs = Counter(27) -- expression 68 operands: lhs = Counter(31), rhs = Expression(124, Add) -- expression 69 operands: lhs = Expression(125, Add), rhs = Counter(35) -- expression 70 operands: lhs = Expression(126, Add), rhs = Counter(34) -- expression 71 operands: lhs = Counter(32), rhs = Counter(33) -- expression 72 operands: lhs = Counter(30), rhs = Zero -- expression 73 operands: lhs = Expression(86, Add), rhs = Counter(31) -- expression 74 operands: lhs = Counter(30), rhs = Zero -- expression 75 operands: lhs = Expression(85, Sub), rhs = Counter(10) -- expression 76 operands: lhs = Expression(86, Add), rhs = Counter(31) -- expression 77 operands: lhs = Counter(30), rhs = Zero -- expression 78 operands: lhs = Expression(84, Sub), rhs = Counter(32) -- expression 79 operands: lhs = Expression(85, Sub), rhs = Counter(10) -- expression 80 operands: lhs = Expression(86, Add), rhs = Counter(31) -- expression 81 operands: lhs = Counter(30), rhs = Zero -- expression 82 operands: lhs = Expression(83, Sub), rhs = Counter(33) -- expression 83 operands: lhs = Expression(84, Sub), rhs = Counter(32) -- expression 84 operands: lhs = Expression(85, Sub), rhs = Counter(10) -- expression 85 operands: lhs = Expression(86, Add), rhs = Counter(31) -- expression 86 operands: lhs = Counter(30), rhs = Zero -- expression 87 operands: lhs = Expression(126, Add), rhs = Counter(34) -- expression 88 operands: lhs = Counter(32), rhs = Counter(33) -- expression 89 operands: lhs = Expression(125, Add), rhs = Counter(35) -- expression 90 operands: lhs = Expression(126, Add), rhs = Counter(34) -- expression 91 operands: lhs = Counter(32), rhs = Counter(33) -- expression 92 operands: lhs = Counter(4), rhs = Expression(134, Add) -- expression 93 operands: lhs = Expression(135, Add), rhs = Counter(8) -- expression 94 operands: lhs = Expression(136, Add), rhs = Counter(7) -- expression 95 operands: lhs = Counter(5), rhs = Counter(6) -- expression 96 operands: lhs = Expression(123, Add), rhs = Zero -- expression 97 operands: lhs = Counter(31), rhs = Expression(124, Add) -- expression 98 operands: lhs = Expression(125, Add), rhs = Counter(35) -- expression 99 operands: lhs = Expression(126, Add), rhs = Counter(34) -- expression 100 operands: lhs = Counter(32), rhs = Counter(33) -- expression 101 operands: lhs = Expression(123, Add), rhs = Counter(4) -- expression 102 operands: lhs = Counter(31), rhs = Expression(124, Add) -- expression 103 operands: lhs = Expression(125, Add), rhs = Counter(35) -- expression 104 operands: lhs = Expression(126, Add), rhs = Counter(34) -- expression 105 operands: lhs = Counter(32), rhs = Counter(33) -- expression 106 operands: lhs = Expression(122, Sub), rhs = Counter(9) -- expression 107 operands: lhs = Expression(123, Add), rhs = Counter(4) -- expression 108 operands: lhs = Counter(31), rhs = Expression(124, Add) -- expression 109 operands: lhs = Expression(125, Add), rhs = Counter(35) -- expression 110 operands: lhs = Expression(126, Add), rhs = Counter(34) -- expression 111 operands: lhs = Counter(32), rhs = Counter(33) -- expression 112 operands: lhs = Expression(121, Sub), rhs = Counter(5) -- expression 113 operands: lhs = Expression(122, Sub), rhs = Counter(9) -- expression 114 operands: lhs = Expression(123, Add), rhs = Counter(4) -- expression 115 operands: lhs = Counter(31), rhs = Expression(124, Add) -- expression 116 operands: lhs = Expression(125, Add), rhs = Counter(35) -- expression 117 operands: lhs = Expression(126, Add), rhs = Counter(34) -- expression 118 operands: lhs = Counter(32), rhs = Counter(33) -- expression 119 operands: lhs = Expression(120, Sub), rhs = Counter(6) -- expression 120 operands: lhs = Expression(121, Sub), rhs = Counter(5) -- expression 121 operands: lhs = Expression(122, Sub), rhs = Counter(9) -- expression 122 operands: lhs = Expression(123, Add), rhs = Counter(4) -- expression 123 operands: lhs = Counter(31), rhs = Expression(124, Add) -- expression 124 operands: lhs = Expression(125, Add), rhs = Counter(35) -- expression 125 operands: lhs = Expression(126, Add), rhs = Counter(34) -- expression 126 operands: lhs = Counter(32), rhs = Counter(33) -- expression 127 operands: lhs = Expression(136, Add), rhs = Counter(7) -- expression 128 operands: lhs = Counter(5), rhs = Counter(6) -- expression 129 operands: lhs = Expression(135, Add), rhs = Counter(8) -- expression 130 operands: lhs = Expression(136, Add), rhs = Counter(7) -- expression 131 operands: lhs = Counter(5), rhs = Counter(6) -- expression 132 operands: lhs = Expression(133, Add), rhs = Expression(137, Add) -- expression 133 operands: lhs = Counter(4), rhs = Expression(134, Add) -- expression 134 operands: lhs = Expression(135, Add), rhs = Counter(8) -- expression 135 operands: lhs = Expression(136, Add), rhs = Counter(7) -- expression 136 operands: lhs = Counter(5), rhs = Counter(6) -- expression 137 operands: lhs = Expression(138, Add), rhs = Expression(141, Sub) -- expression 138 operands: lhs = Expression(139, Add), rhs = Expression(140, Add) -- expression 139 operands: lhs = Counter(9), rhs = Counter(10) -- expression 140 operands: lhs = Counter(11), rhs = Counter(12) -- expression 141 operands: lhs = Expression(142, Sub), rhs = Counter(3) -- expression 142 operands: lhs = Expression(143, Add), rhs = Counter(2) -- expression 143 operands: lhs = Counter(1), rhs = Zero -Number of file 0 mappings: 68 -- Code(Counter(0)) at (prev + 3, 1) to (start + 2, 12) -- Code(Counter(1)) at (prev + 2, 13) to (start + 2, 6) -- Code(Zero) at (prev + 2, 6) to (start + 0, 7) -- Code(Expression(0, Add)) at (prev + 3, 9) to (start + 0, 10) - = (c2 + (((c13 + c14) + c15) + c16)) -- Code(Expression(143, Add)) at (prev + 0, 16) to (start + 0, 29) - = (c1 + Zero) -- Code(Counter(2)) at (prev + 1, 9) to (start + 1, 10) -- Code(Expression(142, Sub)) at (prev + 2, 15) to (start + 0, 28) - = ((c1 + Zero) - c2) -- Code(Counter(3)) at (prev + 1, 12) to (start + 0, 25) -- Code(Expression(9, Sub)) at (prev + 0, 29) to (start + 0, 42) - = (c3 - c13) -- Code(Expression(8, Sub)) at (prev + 0, 46) to (start + 0, 60) - = ((c3 - c13) - c14) -- Code(Expression(13, Add)) at (prev + 0, 61) to (start + 2, 10) - = ((c13 + c14) + c15) -- Code(Counter(16)) at (prev + 2, 10) to (start + 0, 11) -- Code(Expression(12, Add)) at (prev + 1, 9) to (start + 1, 18) - = (((c13 + c14) + c15) + c16) -- Code(Expression(141, Sub)) at (prev + 3, 9) to (start + 0, 15) - = (((c1 + Zero) - c2) - c3) -- Code(Expression(18, Add)) at (prev + 3, 9) to (start + 1, 12) - = ((c2 + (((c13 + c14) + c15) + c16)) + Zero) -- Code(Counter(17)) at (prev + 1, 13) to (start + 2, 6) -- Code(Zero) at (prev + 2, 6) to (start + 0, 7) -- Code(Expression(33, Add)) at (prev + 2, 8) to (start + 0, 21) - = (c17 + Zero) -- Code(Counter(18)) at (prev + 0, 22) to (start + 2, 6) -- Code(Expression(32, Sub)) at (prev + 2, 15) to (start + 0, 28) - = ((c17 + Zero) - c18) -- Code(Expression(31, Sub)) at (prev + 1, 12) to (start + 0, 25) - = (((c17 + Zero) - c18) - c12) -- Code(Expression(30, Sub)) at (prev + 0, 29) to (start + 0, 42) - = ((((c17 + Zero) - c18) - c12) - c19) -- Code(Expression(29, Sub)) at (prev + 0, 46) to (start + 0, 60) - = (((((c17 + Zero) - c18) - c12) - c19) - c20) -- Code(Expression(41, Add)) at (prev + 0, 61) to (start + 2, 10) - = ((c19 + c20) + c21) -- Code(Counter(22)) at (prev + 2, 10) to (start + 0, 11) -- Code(Expression(40, Add)) at (prev + 1, 9) to (start + 0, 23) - = (((c19 + c20) + c21) + c22) -- Code(Counter(12)) at (prev + 2, 9) to (start + 0, 15) -- Code(Expression(39, Add)) at (prev + 3, 8) to (start + 0, 12) - = (c18 + (((c19 + c20) + c21) + c22)) -- Code(Counter(23)) at (prev + 1, 13) to (start + 1, 16) -- Code(Counter(24)) at (prev + 1, 17) to (start + 2, 10) -- Code(Zero) at (prev + 2, 10) to (start + 0, 11) -- Code(Expression(57, Add)) at (prev + 2, 12) to (start + 0, 25) - = (c24 + Zero) -- Code(Counter(25)) at (prev + 0, 26) to (start + 2, 10) -- Code(Expression(56, Sub)) at (prev + 3, 17) to (start + 0, 30) - = ((c24 + Zero) - c25) -- Code(Expression(55, Sub)) at (prev + 1, 16) to (start + 0, 29) - = (((c24 + Zero) - c25) - c11) -- Code(Expression(54, Sub)) at (prev + 0, 33) to (start + 0, 46) - = ((((c24 + Zero) - c25) - c11) - c26) -- Code(Expression(53, Sub)) at (prev + 0, 50) to (start + 0, 64) - = (((((c24 + Zero) - c25) - c11) - c26) - c27) -- Code(Expression(66, Add)) at (prev + 0, 65) to (start + 2, 14) - = ((c26 + c27) + c28) -- Code(Counter(29)) at (prev + 2, 14) to (start + 0, 15) -- Code(Expression(65, Add)) at (prev + 1, 13) to (start + 0, 27) - = (((c26 + c27) + c28) + c29) -- Code(Counter(11)) at (prev + 2, 13) to (start + 0, 19) -- Code(Zero) at (prev + 2, 6) to (start + 0, 7) -- Code(Expression(63, Add)) at (prev + 2, 9) to (start + 1, 12) - = ((c25 + (((c26 + c27) + c28) + c29)) + Zero) -- Code(Counter(30)) at (prev + 1, 13) to (start + 2, 6) -- Code(Zero) at (prev + 2, 6) to (start + 0, 7) -- Code(Expression(123, Add)) at (prev + 2, 9) to (start + 0, 10) - = (c31 + (((c32 + c33) + c34) + c35)) -- Code(Expression(86, Add)) at (prev + 0, 16) to (start + 0, 29) - = (c30 + Zero) -- Code(Counter(31)) at (prev + 0, 30) to (start + 2, 6) -- Code(Expression(85, Sub)) at (prev + 2, 15) to (start + 0, 28) - = ((c30 + Zero) - c31) -- Code(Expression(84, Sub)) at (prev + 1, 12) to (start + 0, 25) - = (((c30 + Zero) - c31) - c10) -- Code(Expression(83, Sub)) at (prev + 0, 29) to (start + 0, 42) - = ((((c30 + Zero) - c31) - c10) - c32) -- Code(Expression(82, Sub)) at (prev + 0, 46) to (start + 0, 60) - = (((((c30 + Zero) - c31) - c10) - c32) - c33) -- Code(Expression(125, Add)) at (prev + 0, 61) to (start + 2, 10) - = ((c32 + c33) + c34) -- Code(Counter(35)) at (prev + 2, 10) to (start + 0, 11) -- Code(Expression(124, Add)) at (prev + 1, 9) to (start + 0, 23) - = (((c32 + c33) + c34) + c35) -- Code(Counter(10)) at (prev + 2, 13) to (start + 2, 15) -- Code(Expression(133, Add)) at (prev + 5, 9) to (start + 0, 10) - = (c4 + (((c5 + c6) + c7) + c8)) -- Code(Expression(96, Add)) at (prev + 0, 16) to (start + 0, 29) - = ((c31 + (((c32 + c33) + c34) + c35)) + Zero) -- Code(Counter(4)) at (prev + 0, 30) to (start + 2, 6) -- Code(Expression(122, Sub)) at (prev + 2, 15) to (start + 0, 28) - = ((c31 + (((c32 + c33) + c34) + c35)) - c4) -- Code(Expression(121, Sub)) at (prev + 1, 12) to (start + 0, 25) - = (((c31 + (((c32 + c33) + c34) + c35)) - c4) - c9) -- Code(Expression(120, Sub)) at (prev + 0, 29) to (start + 0, 42) - = ((((c31 + (((c32 + c33) + c34) + c35)) - c4) - c9) - c5) -- Code(Expression(119, Sub)) at (prev + 0, 46) to (start + 0, 60) - = (((((c31 + (((c32 + c33) + c34) + c35)) - c4) - c9) - c5) - c6) -- Code(Expression(135, Add)) at (prev + 0, 61) to (start + 2, 10) - = ((c5 + c6) + c7) -- Code(Counter(8)) at (prev + 2, 10) to (start + 0, 11) -- Code(Expression(134, Add)) at (prev + 1, 9) to (start + 0, 23) - = (((c5 + c6) + c7) + c8) -- Code(Counter(9)) at (prev + 2, 9) to (start + 0, 15) -- Code(Expression(132, Add)) at (prev + 2, 1) to (start + 0, 2) - = ((c4 + (((c5 + c6) + c7) + c8)) + (((c9 + c10) + (c11 + c12)) + (((c1 + Zero) - c2) - c3))) - diff --git a/tests/coverage-map/status-quo/continue.cov-map b/tests/coverage-map/status-quo/continue.cov-map deleted file mode 100644 index c78cf2930..000000000 --- a/tests/coverage-map/status-quo/continue.cov-map +++ /dev/null @@ -1,85 +0,0 @@ -Function name: continue::main -Raw bytes (216): 0x[01, 01, 1f, 01, 07, 05, 09, 03, 0d, 0d, 1f, 11, 15, 1b, 19, 0d, 1f, 11, 15, 15, 00, 19, 37, 1d, 21, 33, 25, 19, 37, 1d, 21, 1d, 00, 25, 4f, 29, 2d, 4b, 31, 25, 4f, 29, 2d, 31, 67, 35, 39, 5f, 3d, 31, 67, 35, 39, 35, 39, 3d, 41, 73, 45, 3d, 41, 41, 00, 49, 45, 1e, 01, 03, 01, 03, 12, 03, 04, 0e, 00, 13, 0a, 01, 0f, 00, 16, 05, 02, 11, 00, 19, 09, 02, 12, 04, 0e, 1b, 06, 0e, 00, 13, 16, 01, 0f, 00, 16, 15, 01, 16, 02, 0e, 11, 04, 11, 00, 19, 23, 03, 09, 00, 0e, 33, 02, 0e, 00, 13, 2e, 01, 0f, 00, 16, 1d, 01, 15, 02, 0e, 21, 04, 11, 00, 19, 3b, 03, 09, 00, 0e, 4b, 02, 0e, 00, 13, 46, 01, 0c, 00, 13, 29, 01, 0d, 00, 15, 2d, 01, 0a, 01, 0e, 5f, 03, 0e, 00, 13, 5a, 01, 0f, 00, 16, 39, 01, 16, 02, 0e, 35, 03, 12, 02, 0e, 67, 04, 09, 00, 0e, 73, 02, 0e, 00, 13, 6e, 01, 0f, 00, 16, 41, 01, 16, 02, 0e, 49, 04, 11, 00, 16, 77, 03, 09, 00, 0e, 7b, 02, 0d, 01, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 31 -- expression 0 operands: lhs = Counter(0), rhs = Expression(1, Add) -- expression 1 operands: lhs = Counter(1), rhs = Counter(2) -- expression 2 operands: lhs = Expression(0, Add), rhs = Counter(3) -- expression 3 operands: lhs = Counter(3), rhs = Expression(7, Add) -- expression 4 operands: lhs = Counter(4), rhs = Counter(5) -- expression 5 operands: lhs = Expression(6, Add), rhs = Counter(6) -- expression 6 operands: lhs = Counter(3), rhs = Expression(7, Add) -- expression 7 operands: lhs = Counter(4), rhs = Counter(5) -- expression 8 operands: lhs = Counter(5), rhs = Zero -- expression 9 operands: lhs = Counter(6), rhs = Expression(13, Add) -- expression 10 operands: lhs = Counter(7), rhs = Counter(8) -- expression 11 operands: lhs = Expression(12, Add), rhs = Counter(9) -- expression 12 operands: lhs = Counter(6), rhs = Expression(13, Add) -- expression 13 operands: lhs = Counter(7), rhs = Counter(8) -- expression 14 operands: lhs = Counter(7), rhs = Zero -- expression 15 operands: lhs = Counter(9), rhs = Expression(19, Add) -- expression 16 operands: lhs = Counter(10), rhs = Counter(11) -- expression 17 operands: lhs = Expression(18, Add), rhs = Counter(12) -- expression 18 operands: lhs = Counter(9), rhs = Expression(19, Add) -- expression 19 operands: lhs = Counter(10), rhs = Counter(11) -- expression 20 operands: lhs = Counter(12), rhs = Expression(25, Add) -- expression 21 operands: lhs = Counter(13), rhs = Counter(14) -- expression 22 operands: lhs = Expression(23, Add), rhs = Counter(15) -- expression 23 operands: lhs = Counter(12), rhs = Expression(25, Add) -- expression 24 operands: lhs = Counter(13), rhs = Counter(14) -- expression 25 operands: lhs = Counter(13), rhs = Counter(14) -- expression 26 operands: lhs = Counter(15), rhs = Counter(16) -- expression 27 operands: lhs = Expression(28, Add), rhs = Counter(17) -- expression 28 operands: lhs = Counter(15), rhs = Counter(16) -- expression 29 operands: lhs = Counter(16), rhs = Zero -- expression 30 operands: lhs = Counter(18), rhs = Counter(17) -Number of file 0 mappings: 30 -- Code(Counter(0)) at (prev + 3, 1) to (start + 3, 18) -- Code(Expression(0, Add)) at (prev + 4, 14) to (start + 0, 19) - = (c0 + (c1 + c2)) -- Code(Expression(2, Sub)) at (prev + 1, 15) to (start + 0, 22) - = ((c0 + (c1 + c2)) - c3) -- Code(Counter(1)) at (prev + 2, 17) to (start + 0, 25) -- Code(Counter(2)) at (prev + 2, 18) to (start + 4, 14) -- Code(Expression(6, Add)) at (prev + 6, 14) to (start + 0, 19) - = (c3 + (c4 + c5)) -- Code(Expression(5, Sub)) at (prev + 1, 15) to (start + 0, 22) - = ((c3 + (c4 + c5)) - c6) -- Code(Counter(5)) at (prev + 1, 22) to (start + 2, 14) -- Code(Counter(4)) at (prev + 4, 17) to (start + 0, 25) -- Code(Expression(8, Add)) at (prev + 3, 9) to (start + 0, 14) - = (c5 + Zero) -- Code(Expression(12, Add)) at (prev + 2, 14) to (start + 0, 19) - = (c6 + (c7 + c8)) -- Code(Expression(11, Sub)) at (prev + 1, 15) to (start + 0, 22) - = ((c6 + (c7 + c8)) - c9) -- Code(Counter(7)) at (prev + 1, 21) to (start + 2, 14) -- Code(Counter(8)) at (prev + 4, 17) to (start + 0, 25) -- Code(Expression(14, Add)) at (prev + 3, 9) to (start + 0, 14) - = (c7 + Zero) -- Code(Expression(18, Add)) at (prev + 2, 14) to (start + 0, 19) - = (c9 + (c10 + c11)) -- Code(Expression(17, Sub)) at (prev + 1, 12) to (start + 0, 19) - = ((c9 + (c10 + c11)) - c12) -- Code(Counter(10)) at (prev + 1, 13) to (start + 0, 21) -- Code(Counter(11)) at (prev + 1, 10) to (start + 1, 14) -- Code(Expression(23, Add)) at (prev + 3, 14) to (start + 0, 19) - = (c12 + (c13 + c14)) -- Code(Expression(22, Sub)) at (prev + 1, 15) to (start + 0, 22) - = ((c12 + (c13 + c14)) - c15) -- Code(Counter(14)) at (prev + 1, 22) to (start + 2, 14) -- Code(Counter(13)) at (prev + 3, 18) to (start + 2, 14) -- Code(Expression(25, Add)) at (prev + 4, 9) to (start + 0, 14) - = (c13 + c14) -- Code(Expression(28, Add)) at (prev + 2, 14) to (start + 0, 19) - = (c15 + c16) -- Code(Expression(27, Sub)) at (prev + 1, 15) to (start + 0, 22) - = ((c15 + c16) - c17) -- Code(Counter(16)) at (prev + 1, 22) to (start + 2, 14) -- Code(Counter(18)) at (prev + 4, 17) to (start + 0, 22) -- Code(Expression(29, Add)) at (prev + 3, 9) to (start + 0, 14) - = (c16 + Zero) -- Code(Expression(30, Add)) at (prev + 2, 13) to (start + 1, 2) - = (c18 + c17) - diff --git a/tests/coverage-map/status-quo/generator.cov-map b/tests/coverage-map/status-quo/generator.cov-map deleted file mode 100644 index a66c1af30..000000000 --- a/tests/coverage-map/status-quo/generator.cov-map +++ /dev/null @@ -1,58 +0,0 @@ -Function name: generator::get_u32 -Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 0b, 01, 01, 0b, 05, 01, 0e, 00, 13, 02, 00, 1d, 00, 3c, 07, 01, 01, 00, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 2 -- expression 0 operands: lhs = Counter(0), rhs = Counter(1) -- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) -Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 11, 1) to (start + 1, 11) -- Code(Counter(1)) at (prev + 1, 14) to (start + 0, 19) -- Code(Expression(0, Sub)) at (prev + 0, 29) to (start + 0, 60) - = (c0 - c1) -- Code(Expression(1, Add)) at (prev + 1, 1) to (start + 0, 2) - = (c1 + (c0 - c1)) - -Function name: generator::main -Raw bytes (71): 0x[01, 01, 0b, 01, 00, 05, 0b, 09, 0d, 11, 00, 11, 15, 2a, 19, 11, 15, 15, 19, 26, 00, 2a, 19, 11, 15, 09, 01, 0f, 01, 02, 16, 03, 07, 0b, 00, 2e, 11, 01, 2b, 00, 2d, 07, 01, 0e, 00, 35, 0f, 02, 0b, 00, 2e, 2a, 01, 22, 00, 27, 26, 00, 2c, 00, 2e, 1f, 01, 0e, 00, 35, 23, 02, 01, 00, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 11 -- expression 0 operands: lhs = Counter(0), rhs = Zero -- expression 1 operands: lhs = Counter(1), rhs = Expression(2, Add) -- expression 2 operands: lhs = Counter(2), rhs = Counter(3) -- expression 3 operands: lhs = Counter(4), rhs = Zero -- expression 4 operands: lhs = Counter(4), rhs = Counter(5) -- expression 5 operands: lhs = Expression(10, Sub), rhs = Counter(6) -- expression 6 operands: lhs = Counter(4), rhs = Counter(5) -- expression 7 operands: lhs = Counter(5), rhs = Counter(6) -- expression 8 operands: lhs = Expression(9, Sub), rhs = Zero -- expression 9 operands: lhs = Expression(10, Sub), rhs = Counter(6) -- expression 10 operands: lhs = Counter(4), rhs = Counter(5) -Number of file 0 mappings: 9 -- Code(Counter(0)) at (prev + 15, 1) to (start + 2, 22) -- Code(Expression(0, Add)) at (prev + 7, 11) to (start + 0, 46) - = (c0 + Zero) -- Code(Counter(4)) at (prev + 1, 43) to (start + 0, 45) -- Code(Expression(1, Add)) at (prev + 1, 14) to (start + 0, 53) - = (c1 + (c2 + c3)) -- Code(Expression(3, Add)) at (prev + 2, 11) to (start + 0, 46) - = (c4 + Zero) -- Code(Expression(10, Sub)) at (prev + 1, 34) to (start + 0, 39) - = (c4 - c5) -- Code(Expression(9, Sub)) at (prev + 0, 44) to (start + 0, 46) - = ((c4 - c5) - c6) -- Code(Expression(7, Add)) at (prev + 1, 14) to (start + 0, 53) - = (c5 + c6) -- Code(Expression(8, Add)) at (prev + 2, 1) to (start + 0, 2) - = (((c4 - c5) - c6) + Zero) - -Function name: generator::main::{closure#0} -Raw bytes (14): 0x[01, 01, 00, 02, 01, 11, 1c, 01, 1f, 05, 02, 10, 01, 06] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 0 -Number of file 0 mappings: 2 -- Code(Counter(0)) at (prev + 17, 28) to (start + 1, 31) -- Code(Counter(1)) at (prev + 2, 16) to (start + 1, 6) - diff --git a/tests/coverage-map/status-quo/generator.rs b/tests/coverage-map/status-quo/generator.rs deleted file mode 100644 index 431999102..000000000 --- a/tests/coverage-map/status-quo/generator.rs +++ /dev/null @@ -1,30 +0,0 @@ -#![feature(generators, generator_trait)] - -use std::ops::{Generator, GeneratorState}; -use std::pin::Pin; - -// The following implementation of a function called from a `yield` statement -// (apparently requiring the Result and the `String` type or constructor) -// creates conditions where the `generator::StateTransform` MIR transform will -// drop all `Counter` `Coverage` statements from a MIR. `simplify.rs` has logic -// to handle this condition, and still report dead block coverage. -fn get_u32(val: bool) -> Result<u32, String> { - if val { Ok(1) } else { Err(String::from("some error")) } -} - -fn main() { - let is_true = std::env::args().len() == 1; - let mut generator = || { - yield get_u32(is_true); - return "foo"; - }; - - match Pin::new(&mut generator).resume(()) { - GeneratorState::Yielded(Ok(1)) => {} - _ => panic!("unexpected return from resume"), - } - match Pin::new(&mut generator).resume(()) { - GeneratorState::Complete("foo") => {} - _ => panic!("unexpected return from resume"), - } -} diff --git a/tests/coverage-map/status-quo/inline-dead.cov-map b/tests/coverage-map/status-quo/inline-dead.cov-map deleted file mode 100644 index dec43d3e8..000000000 --- a/tests/coverage-map/status-quo/inline-dead.cov-map +++ /dev/null @@ -1,45 +0,0 @@ -Function name: inline_dead::dead (unused) -Raw bytes (9): 0x[01, 01, 00, 01, 01, 19, 01, 02, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 0 -Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 25, 1) to (start + 2, 2) - -Function name: inline_dead::live::<false> -Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 10, 01, 01, 09, 00, 02, 09, 00, 0f, 02, 02, 09, 00, 0a, 07, 02, 01, 00, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 2 -- expression 0 operands: lhs = Counter(0), rhs = Counter(1) -- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) -Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 16, 1) to (start + 1, 9) -- Code(Zero) at (prev + 2, 9) to (start + 0, 15) -- Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 10) - = (c0 - c1) -- Code(Expression(1, Add)) at (prev + 2, 1) to (start + 0, 2) - = (c1 + (c0 - c1)) - -Function name: inline_dead::main -Raw bytes (16): 0x[01, 01, 01, 01, 00, 02, 01, 04, 01, 03, 0d, 03, 07, 06, 02, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 1 -- expression 0 operands: lhs = Counter(0), rhs = Zero -Number of file 0 mappings: 2 -- Code(Counter(0)) at (prev + 4, 1) to (start + 3, 13) -- Code(Expression(0, Add)) at (prev + 7, 6) to (start + 2, 2) - = (c0 + Zero) - -Function name: inline_dead::main::{closure#0} -Raw bytes (16): 0x[01, 01, 01, 01, 05, 02, 00, 09, 0d, 00, 0e, 03, 02, 05, 00, 06] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 1 -- expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 2 -- Code(Zero) at (prev + 9, 13) to (start + 0, 14) -- Code(Expression(0, Add)) at (prev + 2, 5) to (start + 0, 6) - = (c0 + c1) - diff --git a/tests/coverage-map/status-quo/inline.cov-map b/tests/coverage-map/status-quo/inline.cov-map deleted file mode 100644 index 57ae85623..000000000 --- a/tests/coverage-map/status-quo/inline.cov-map +++ /dev/null @@ -1,82 +0,0 @@ -Function name: inline::display::<char> -Raw bytes (35): 0x[01, 01, 03, 01, 05, 05, 00, 03, 05, 05, 01, 29, 01, 00, 22, 05, 01, 09, 00, 0a, 03, 00, 0e, 00, 10, 07, 00, 11, 02, 06, 0a, 03, 05, 01, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 3 -- expression 0 operands: lhs = Counter(0), rhs = Counter(1) -- expression 1 operands: lhs = Counter(1), rhs = Zero -- expression 2 operands: lhs = Expression(0, Add), rhs = Counter(1) -Number of file 0 mappings: 5 -- Code(Counter(0)) at (prev + 41, 1) to (start + 0, 34) -- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 10) -- Code(Expression(0, Add)) at (prev + 0, 14) to (start + 0, 16) - = (c0 + c1) -- Code(Expression(1, Add)) at (prev + 0, 17) to (start + 2, 6) - = (c1 + Zero) -- Code(Expression(2, Sub)) at (prev + 3, 5) to (start + 1, 2) - = ((c0 + c1) - c1) - -Function name: inline::error -Raw bytes (9): 0x[01, 01, 00, 01, 01, 31, 01, 02, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 0 -Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 49, 1) to (start + 2, 2) - -Function name: inline::length::<char> -Raw bytes (9): 0x[01, 01, 00, 01, 01, 1e, 01, 02, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 0 -Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 30, 1) to (start + 2, 2) - -Function name: inline::main -Raw bytes (9): 0x[01, 01, 00, 01, 01, 05, 01, 02, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 0 -Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 5, 1) to (start + 2, 2) - -Function name: inline::permutate::<char> -Raw bytes (54): 0x[01, 01, 05, 01, 05, 02, 0d, 11, 00, 05, 13, 09, 0d, 08, 01, 0f, 01, 02, 0e, 05, 02, 0f, 02, 06, 02, 02, 0f, 00, 14, 11, 01, 0d, 00, 0e, 06, 00, 12, 00, 16, 0b, 00, 17, 04, 0a, 0d, 05, 0c, 02, 06, 0f, 03, 01, 00, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 5 -- expression 0 operands: lhs = Counter(0), rhs = Counter(1) -- expression 1 operands: lhs = Expression(0, Sub), rhs = Counter(3) -- expression 2 operands: lhs = Counter(4), rhs = Zero -- expression 3 operands: lhs = Counter(1), rhs = Expression(4, Add) -- expression 4 operands: lhs = Counter(2), rhs = Counter(3) -Number of file 0 mappings: 8 -- Code(Counter(0)) at (prev + 15, 1) to (start + 2, 14) -- Code(Counter(1)) at (prev + 2, 15) to (start + 2, 6) -- Code(Expression(0, Sub)) at (prev + 2, 15) to (start + 0, 20) - = (c0 - c1) -- Code(Counter(4)) at (prev + 1, 13) to (start + 0, 14) -- Code(Expression(1, Sub)) at (prev + 0, 18) to (start + 0, 22) - = ((c0 - c1) - c3) -- Code(Expression(2, Add)) at (prev + 0, 23) to (start + 4, 10) - = (c4 + Zero) -- Code(Counter(3)) at (prev + 5, 12) to (start + 2, 6) -- Code(Expression(3, Add)) at (prev + 3, 1) to (start + 0, 2) - = (c1 + (c2 + c3)) - -Function name: inline::permutations::<char> -Raw bytes (9): 0x[01, 01, 00, 01, 01, 0a, 01, 03, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 0 -Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 10, 1) to (start + 3, 2) - -Function name: inline::swap::<char> -Raw bytes (9): 0x[01, 01, 00, 01, 01, 23, 01, 04, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 0 -Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 35, 1) to (start + 4, 2) - diff --git a/tests/coverage-map/status-quo/issue-93054.cov-map b/tests/coverage-map/status-quo/issue-93054.cov-map deleted file mode 100644 index 52fe7f58d..000000000 --- a/tests/coverage-map/status-quo/issue-93054.cov-map +++ /dev/null @@ -1,24 +0,0 @@ -Function name: issue_93054::foo2 (unused) -Raw bytes (9): 0x[01, 01, 00, 01, 01, 16, 01, 00, 1d] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 0 -Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 22, 1) to (start + 0, 29) - -Function name: issue_93054::main -Raw bytes (9): 0x[01, 01, 00, 01, 01, 1e, 01, 00, 0d] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 0 -Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 30, 1) to (start + 0, 13) - -Function name: issue_93054::make (unused) -Raw bytes (9): 0x[01, 01, 00, 01, 01, 1a, 01, 02, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 0 -Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 26, 1) to (start + 2, 2) - diff --git a/tests/coverage-map/status-quo/lazy_boolean.cov-map b/tests/coverage-map/status-quo/lazy_boolean.cov-map deleted file mode 100644 index b18a96404..000000000 --- a/tests/coverage-map/status-quo/lazy_boolean.cov-map +++ /dev/null @@ -1,223 +0,0 @@ -Function name: lazy_boolean::main -Raw bytes (646): 0x[01, 01, a8, 01, 01, 05, 09, 9a, 05, 9f, 05, 09, 05, 02, 05, 02, 9f, 05, 09, 05, 02, 0d, 92, 05, 97, 05, 0d, 09, 9a, 05, 9f, 05, 09, 05, 02, 97, 05, 00, 09, 9a, 05, 9f, 05, 09, 05, 02, 97, 05, 0d, 09, 9a, 05, 9f, 05, 09, 05, 02, 11, 8a, 05, 8f, 05, 11, 0d, 92, 05, 97, 05, 0d, 09, 9a, 05, 9f, 05, 09, 05, 02, 8f, 05, 00, 0d, 92, 05, 97, 05, 0d, 09, 9a, 05, 9f, 05, 09, 05, 02, 15, 82, 05, 87, 05, 15, 11, 8a, 05, 8f, 05, 11, 0d, 92, 05, 97, 05, 0d, 09, 9a, 05, 9f, 05, 09, 05, 02, 87, 05, 00, 11, 8a, 05, 8f, 05, 11, 0d, 92, 05, 97, 05, 0d, 09, 9a, 05, 9f, 05, 09, 05, 02, ff, 04, 00, 15, 82, 05, 87, 05, 15, 11, 8a, 05, 8f, 05, 11, 0d, 92, 05, 97, 05, 0d, 09, 9a, 05, 9f, 05, 09, 05, 02, ff, 04, 19, 15, 82, 05, 87, 05, 15, 11, 8a, 05, 8f, 05, 11, 0d, 92, 05, 97, 05, 0d, 09, 9a, 05, 9f, 05, 09, 05, 02, 19, fa, 04, ff, 04, 19, 15, 82, 05, 87, 05, 15, 11, 8a, 05, 8f, 05, 11, 0d, 92, 05, 97, 05, 0d, 09, 9a, 05, 9f, 05, 09, 05, 02, f7, 04, 1d, 19, fa, 04, ff, 04, 19, 15, 82, 05, 87, 05, 15, 11, 8a, 05, 8f, 05, 11, 0d, 92, 05, 97, 05, 0d, 09, 9a, 05, 9f, 05, 09, 05, 02, 1d, f2, 04, f7, 04, 1d, 19, fa, 04, ff, 04, 19, 15, 82, 05, 87, 05, 15, 11, 8a, 05, 8f, 05, 11, 0d, 92, 05, 97, 05, 0d, 09, 9a, 05, 9f, 05, 09, 05, 02, ef, 04, 21, 1d, f2, 04, f7, 04, 1d, 19, fa, 04, ff, 04, 19, 15, 82, 05, 87, 05, 15, 11, 8a, 05, 8f, 05, 11, 0d, 92, 05, 97, 05, 0d, 09, 9a, 05, 9f, 05, 09, 05, 02, 21, ea, 04, ef, 04, 21, 1d, f2, 04, f7, 04, 1d, 19, fa, 04, ff, 04, 19, 15, 82, 05, 87, 05, 15, 11, 8a, 05, 8f, 05, 11, 0d, 92, 05, 97, 05, 0d, 09, 9a, 05, 9f, 05, 09, 05, 02, e7, 04, 25, 21, ea, 04, ef, 04, 21, 1d, f2, 04, f7, 04, 1d, 19, fa, 04, ff, 04, 19, 15, 82, 05, 87, 05, 15, 11, 8a, 05, 8f, 05, 11, 0d, 92, 05, 97, 05, 0d, 09, 9a, 05, 9f, 05, 09, 05, 02, 25, e2, 04, e7, 04, 25, 21, ea, 04, ef, 04, 21, 1d, f2, 04, f7, 04, 1d, 19, fa, 04, ff, 04, 19, 15, 82, 05, 87, 05, 15, 11, 8a, 05, 8f, 05, 11, 0d, 92, 05, 97, 05, 0d, 09, 9a, 05, 9f, 05, 09, 05, 02, 1c, 01, 03, 01, 07, 0f, 05, 07, 10, 04, 06, 02, 04, 06, 00, 07, 97, 05, 02, 09, 00, 11, 9f, 05, 02, 0d, 00, 12, 9a, 05, 02, 0d, 00, 12, 8f, 05, 03, 09, 00, 11, 33, 02, 0d, 00, 12, 92, 05, 02, 0d, 00, 12, 87, 05, 02, 09, 00, 11, 6f, 00, 14, 00, 19, 11, 00, 1d, 00, 22, ff, 04, 01, 09, 00, 11, ab, 01, 00, 14, 00, 19, 15, 00, 1d, 00, 22, cb, 01, 04, 09, 00, 10, fa, 04, 01, 05, 03, 06, 19, 03, 06, 00, 07, f7, 04, 03, 09, 00, 10, 1d, 01, 05, 03, 06, f2, 04, 05, 05, 03, 06, ef, 04, 05, 09, 00, 10, ea, 04, 00, 11, 02, 06, 21, 02, 06, 00, 07, e7, 04, 02, 08, 00, 0f, 25, 00, 10, 02, 06, e2, 04, 02, 0c, 02, 06, df, 04, 03, 01, 00, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 168 -- expression 0 operands: lhs = Counter(0), rhs = Counter(1) -- expression 1 operands: lhs = Counter(2), rhs = Expression(166, Sub) -- expression 2 operands: lhs = Expression(167, Add), rhs = Counter(2) -- expression 3 operands: lhs = Counter(1), rhs = Expression(0, Sub) -- expression 4 operands: lhs = Counter(1), rhs = Expression(0, Sub) -- expression 5 operands: lhs = Expression(167, Add), rhs = Counter(2) -- expression 6 operands: lhs = Counter(1), rhs = Expression(0, Sub) -- expression 7 operands: lhs = Counter(3), rhs = Expression(164, Sub) -- expression 8 operands: lhs = Expression(165, Add), rhs = Counter(3) -- expression 9 operands: lhs = Counter(2), rhs = Expression(166, Sub) -- expression 10 operands: lhs = Expression(167, Add), rhs = Counter(2) -- expression 11 operands: lhs = Counter(1), rhs = Expression(0, Sub) -- expression 12 operands: lhs = Expression(165, Add), rhs = Zero -- expression 13 operands: lhs = Counter(2), rhs = Expression(166, Sub) -- expression 14 operands: lhs = Expression(167, Add), rhs = Counter(2) -- expression 15 operands: lhs = Counter(1), rhs = Expression(0, Sub) -- expression 16 operands: lhs = Expression(165, Add), rhs = Counter(3) -- expression 17 operands: lhs = Counter(2), rhs = Expression(166, Sub) -- expression 18 operands: lhs = Expression(167, Add), rhs = Counter(2) -- expression 19 operands: lhs = Counter(1), rhs = Expression(0, Sub) -- expression 20 operands: lhs = Counter(4), rhs = Expression(162, Sub) -- expression 21 operands: lhs = Expression(163, Add), rhs = Counter(4) -- expression 22 operands: lhs = Counter(3), rhs = Expression(164, Sub) -- expression 23 operands: lhs = Expression(165, Add), rhs = Counter(3) -- expression 24 operands: lhs = Counter(2), rhs = Expression(166, Sub) -- expression 25 operands: lhs = Expression(167, Add), rhs = Counter(2) -- expression 26 operands: lhs = Counter(1), rhs = Expression(0, Sub) -- expression 27 operands: lhs = Expression(163, Add), rhs = Zero -- expression 28 operands: lhs = Counter(3), rhs = Expression(164, Sub) -- expression 29 operands: lhs = Expression(165, Add), rhs = Counter(3) -- expression 30 operands: lhs = Counter(2), rhs = Expression(166, Sub) -- expression 31 operands: lhs = Expression(167, Add), rhs = Counter(2) -- expression 32 operands: lhs = Counter(1), rhs = Expression(0, Sub) -- expression 33 operands: lhs = Counter(5), rhs = Expression(160, Sub) -- expression 34 operands: lhs = Expression(161, Add), rhs = Counter(5) -- expression 35 operands: lhs = Counter(4), rhs = Expression(162, Sub) -- expression 36 operands: lhs = Expression(163, Add), rhs = Counter(4) -- expression 37 operands: lhs = Counter(3), rhs = Expression(164, Sub) -- expression 38 operands: lhs = Expression(165, Add), rhs = Counter(3) -- expression 39 operands: lhs = Counter(2), rhs = Expression(166, Sub) -- expression 40 operands: lhs = Expression(167, Add), rhs = Counter(2) -- expression 41 operands: lhs = Counter(1), rhs = Expression(0, Sub) -- expression 42 operands: lhs = Expression(161, Add), rhs = Zero -- expression 43 operands: lhs = Counter(4), rhs = Expression(162, Sub) -- expression 44 operands: lhs = Expression(163, Add), rhs = Counter(4) -- expression 45 operands: lhs = Counter(3), rhs = Expression(164, Sub) -- expression 46 operands: lhs = Expression(165, Add), rhs = Counter(3) -- expression 47 operands: lhs = Counter(2), rhs = Expression(166, Sub) -- expression 48 operands: lhs = Expression(167, Add), rhs = Counter(2) -- expression 49 operands: lhs = Counter(1), rhs = Expression(0, Sub) -- expression 50 operands: lhs = Expression(159, Add), rhs = Zero -- expression 51 operands: lhs = Counter(5), rhs = Expression(160, Sub) -- expression 52 operands: lhs = Expression(161, Add), rhs = Counter(5) -- expression 53 operands: lhs = Counter(4), rhs = Expression(162, Sub) -- expression 54 operands: lhs = Expression(163, Add), rhs = Counter(4) -- expression 55 operands: lhs = Counter(3), rhs = Expression(164, Sub) -- expression 56 operands: lhs = Expression(165, Add), rhs = Counter(3) -- expression 57 operands: lhs = Counter(2), rhs = Expression(166, Sub) -- expression 58 operands: lhs = Expression(167, Add), rhs = Counter(2) -- expression 59 operands: lhs = Counter(1), rhs = Expression(0, Sub) -- expression 60 operands: lhs = Expression(159, Add), rhs = Counter(6) -- expression 61 operands: lhs = Counter(5), rhs = Expression(160, Sub) -- expression 62 operands: lhs = Expression(161, Add), rhs = Counter(5) -- expression 63 operands: lhs = Counter(4), rhs = Expression(162, Sub) -- expression 64 operands: lhs = Expression(163, Add), rhs = Counter(4) -- expression 65 operands: lhs = Counter(3), rhs = Expression(164, Sub) -- expression 66 operands: lhs = Expression(165, Add), rhs = Counter(3) -- expression 67 operands: lhs = Counter(2), rhs = Expression(166, Sub) -- expression 68 operands: lhs = Expression(167, Add), rhs = Counter(2) -- expression 69 operands: lhs = Counter(1), rhs = Expression(0, Sub) -- expression 70 operands: lhs = Counter(6), rhs = Expression(158, Sub) -- expression 71 operands: lhs = Expression(159, Add), rhs = Counter(6) -- expression 72 operands: lhs = Counter(5), rhs = Expression(160, Sub) -- expression 73 operands: lhs = Expression(161, Add), rhs = Counter(5) -- expression 74 operands: lhs = Counter(4), rhs = Expression(162, Sub) -- expression 75 operands: lhs = Expression(163, Add), rhs = Counter(4) -- expression 76 operands: lhs = Counter(3), rhs = Expression(164, Sub) -- expression 77 operands: lhs = Expression(165, Add), rhs = Counter(3) -- expression 78 operands: lhs = Counter(2), rhs = Expression(166, Sub) -- expression 79 operands: lhs = Expression(167, Add), rhs = Counter(2) -- expression 80 operands: lhs = Counter(1), rhs = Expression(0, Sub) -- expression 81 operands: lhs = Expression(157, Add), rhs = Counter(7) -- expression 82 operands: lhs = Counter(6), rhs = Expression(158, Sub) -- expression 83 operands: lhs = Expression(159, Add), rhs = Counter(6) -- expression 84 operands: lhs = Counter(5), rhs = Expression(160, Sub) -- expression 85 operands: lhs = Expression(161, Add), rhs = Counter(5) -- expression 86 operands: lhs = Counter(4), rhs = Expression(162, Sub) -- expression 87 operands: lhs = Expression(163, Add), rhs = Counter(4) -- expression 88 operands: lhs = Counter(3), rhs = Expression(164, Sub) -- expression 89 operands: lhs = Expression(165, Add), rhs = Counter(3) -- expression 90 operands: lhs = Counter(2), rhs = Expression(166, Sub) -- expression 91 operands: lhs = Expression(167, Add), rhs = Counter(2) -- expression 92 operands: lhs = Counter(1), rhs = Expression(0, Sub) -- expression 93 operands: lhs = Counter(7), rhs = Expression(156, Sub) -- expression 94 operands: lhs = Expression(157, Add), rhs = Counter(7) -- expression 95 operands: lhs = Counter(6), rhs = Expression(158, Sub) -- expression 96 operands: lhs = Expression(159, Add), rhs = Counter(6) -- expression 97 operands: lhs = Counter(5), rhs = Expression(160, Sub) -- expression 98 operands: lhs = Expression(161, Add), rhs = Counter(5) -- expression 99 operands: lhs = Counter(4), rhs = Expression(162, Sub) -- expression 100 operands: lhs = Expression(163, Add), rhs = Counter(4) -- expression 101 operands: lhs = Counter(3), rhs = Expression(164, Sub) -- expression 102 operands: lhs = Expression(165, Add), rhs = Counter(3) -- expression 103 operands: lhs = Counter(2), rhs = Expression(166, Sub) -- expression 104 operands: lhs = Expression(167, Add), rhs = Counter(2) -- expression 105 operands: lhs = Counter(1), rhs = Expression(0, Sub) -- expression 106 operands: lhs = Expression(155, Add), rhs = Counter(8) -- expression 107 operands: lhs = Counter(7), rhs = Expression(156, Sub) -- expression 108 operands: lhs = Expression(157, Add), rhs = Counter(7) -- expression 109 operands: lhs = Counter(6), rhs = Expression(158, Sub) -- expression 110 operands: lhs = Expression(159, Add), rhs = Counter(6) -- expression 111 operands: lhs = Counter(5), rhs = Expression(160, Sub) -- expression 112 operands: lhs = Expression(161, Add), rhs = Counter(5) -- expression 113 operands: lhs = Counter(4), rhs = Expression(162, Sub) -- expression 114 operands: lhs = Expression(163, Add), rhs = Counter(4) -- expression 115 operands: lhs = Counter(3), rhs = Expression(164, Sub) -- expression 116 operands: lhs = Expression(165, Add), rhs = Counter(3) -- expression 117 operands: lhs = Counter(2), rhs = Expression(166, Sub) -- expression 118 operands: lhs = Expression(167, Add), rhs = Counter(2) -- expression 119 operands: lhs = Counter(1), rhs = Expression(0, Sub) -- expression 120 operands: lhs = Counter(8), rhs = Expression(154, Sub) -- expression 121 operands: lhs = Expression(155, Add), rhs = Counter(8) -- expression 122 operands: lhs = Counter(7), rhs = Expression(156, Sub) -- expression 123 operands: lhs = Expression(157, Add), rhs = Counter(7) -- expression 124 operands: lhs = Counter(6), rhs = Expression(158, Sub) -- expression 125 operands: lhs = Expression(159, Add), rhs = Counter(6) -- expression 126 operands: lhs = Counter(5), rhs = Expression(160, Sub) -- expression 127 operands: lhs = Expression(161, Add), rhs = Counter(5) -- expression 128 operands: lhs = Counter(4), rhs = Expression(162, Sub) -- expression 129 operands: lhs = Expression(163, Add), rhs = Counter(4) -- expression 130 operands: lhs = Counter(3), rhs = Expression(164, Sub) -- expression 131 operands: lhs = Expression(165, Add), rhs = Counter(3) -- expression 132 operands: lhs = Counter(2), rhs = Expression(166, Sub) -- expression 133 operands: lhs = Expression(167, Add), rhs = Counter(2) -- expression 134 operands: lhs = Counter(1), rhs = Expression(0, Sub) -- expression 135 operands: lhs = Expression(153, Add), rhs = Counter(9) -- expression 136 operands: lhs = Counter(8), rhs = Expression(154, Sub) -- expression 137 operands: lhs = Expression(155, Add), rhs = Counter(8) -- expression 138 operands: lhs = Counter(7), rhs = Expression(156, Sub) -- expression 139 operands: lhs = Expression(157, Add), rhs = Counter(7) -- expression 140 operands: lhs = Counter(6), rhs = Expression(158, Sub) -- expression 141 operands: lhs = Expression(159, Add), rhs = Counter(6) -- expression 142 operands: lhs = Counter(5), rhs = Expression(160, Sub) -- expression 143 operands: lhs = Expression(161, Add), rhs = Counter(5) -- expression 144 operands: lhs = Counter(4), rhs = Expression(162, Sub) -- expression 145 operands: lhs = Expression(163, Add), rhs = Counter(4) -- expression 146 operands: lhs = Counter(3), rhs = Expression(164, Sub) -- expression 147 operands: lhs = Expression(165, Add), rhs = Counter(3) -- expression 148 operands: lhs = Counter(2), rhs = Expression(166, Sub) -- expression 149 operands: lhs = Expression(167, Add), rhs = Counter(2) -- expression 150 operands: lhs = Counter(1), rhs = Expression(0, Sub) -- expression 151 operands: lhs = Counter(9), rhs = Expression(152, Sub) -- expression 152 operands: lhs = Expression(153, Add), rhs = Counter(9) -- expression 153 operands: lhs = Counter(8), rhs = Expression(154, Sub) -- expression 154 operands: lhs = Expression(155, Add), rhs = Counter(8) -- expression 155 operands: lhs = Counter(7), rhs = Expression(156, Sub) -- expression 156 operands: lhs = Expression(157, Add), rhs = Counter(7) -- expression 157 operands: lhs = Counter(6), rhs = Expression(158, Sub) -- expression 158 operands: lhs = Expression(159, Add), rhs = Counter(6) -- expression 159 operands: lhs = Counter(5), rhs = Expression(160, Sub) -- expression 160 operands: lhs = Expression(161, Add), rhs = Counter(5) -- expression 161 operands: lhs = Counter(4), rhs = Expression(162, Sub) -- expression 162 operands: lhs = Expression(163, Add), rhs = Counter(4) -- expression 163 operands: lhs = Counter(3), rhs = Expression(164, Sub) -- expression 164 operands: lhs = Expression(165, Add), rhs = Counter(3) -- expression 165 operands: lhs = Counter(2), rhs = Expression(166, Sub) -- expression 166 operands: lhs = Expression(167, Add), rhs = Counter(2) -- expression 167 operands: lhs = Counter(1), rhs = Expression(0, Sub) -Number of file 0 mappings: 28 -- Code(Counter(0)) at (prev + 3, 1) to (start + 7, 15) -- Code(Counter(1)) at (prev + 7, 16) to (start + 4, 6) -- Code(Expression(0, Sub)) at (prev + 4, 6) to (start + 0, 7) - = (c0 - c1) -- Code(Expression(165, Add)) at (prev + 2, 9) to (start + 0, 17) - = (c2 + ((c1 + (c0 - c1)) - c2)) -- Code(Expression(167, Add)) at (prev + 2, 13) to (start + 0, 18) - = (c1 + (c0 - c1)) -- Code(Expression(166, Sub)) at (prev + 2, 13) to (start + 0, 18) - = ((c1 + (c0 - c1)) - c2) -- Code(Expression(163, Add)) at (prev + 3, 9) to (start + 0, 17) - = (c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) -- Code(Expression(12, Add)) at (prev + 2, 13) to (start + 0, 18) - = ((c2 + ((c1 + (c0 - c1)) - c2)) + Zero) -- Code(Expression(164, Sub)) at (prev + 2, 13) to (start + 0, 18) - = ((c2 + ((c1 + (c0 - c1)) - c2)) - c3) -- Code(Expression(161, Add)) at (prev + 2, 9) to (start + 0, 17) - = (c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4)) -- Code(Expression(27, Add)) at (prev + 0, 20) to (start + 0, 25) - = ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) + Zero) -- Code(Counter(4)) at (prev + 0, 29) to (start + 0, 34) -- Code(Expression(159, Add)) at (prev + 1, 9) to (start + 0, 17) - = (c5 + ((c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4)) - c5)) -- Code(Expression(42, Add)) at (prev + 0, 20) to (start + 0, 25) - = ((c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4)) + Zero) -- Code(Counter(5)) at (prev + 0, 29) to (start + 0, 34) -- Code(Expression(50, Add)) at (prev + 4, 9) to (start + 0, 16) - = ((c5 + ((c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4)) - c5)) + Zero) -- Code(Expression(158, Sub)) at (prev + 1, 5) to (start + 3, 6) - = ((c5 + ((c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4)) - c5)) - c6) -- Code(Counter(6)) at (prev + 3, 6) to (start + 0, 7) -- Code(Expression(157, Add)) at (prev + 3, 9) to (start + 0, 16) - = (c6 + ((c5 + ((c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4)) - c5)) - c6)) -- Code(Counter(7)) at (prev + 1, 5) to (start + 3, 6) -- Code(Expression(156, Sub)) at (prev + 5, 5) to (start + 3, 6) - = ((c6 + ((c5 + ((c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4)) - c5)) - c6)) - c7) -- Code(Expression(155, Add)) at (prev + 5, 9) to (start + 0, 16) - = (c7 + ((c6 + ((c5 + ((c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4)) - c5)) - c6)) - c7)) -- Code(Expression(154, Sub)) at (prev + 0, 17) to (start + 2, 6) - = ((c7 + ((c6 + ((c5 + ((c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4)) - c5)) - c6)) - c7)) - c8) -- Code(Counter(8)) at (prev + 2, 6) to (start + 0, 7) -- Code(Expression(153, Add)) at (prev + 2, 8) to (start + 0, 15) - = (c8 + ((c7 + ((c6 + ((c5 + ((c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4)) - c5)) - c6)) - c7)) - c8)) -- Code(Counter(9)) at (prev + 0, 16) to (start + 2, 6) -- Code(Expression(152, Sub)) at (prev + 2, 12) to (start + 2, 6) - = ((c8 + ((c7 + ((c6 + ((c5 + ((c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4)) - c5)) - c6)) - c7)) - c8)) - c9) -- Code(Expression(151, Add)) at (prev + 3, 1) to (start + 0, 2) - = (c9 + ((c8 + ((c7 + ((c6 + ((c5 + ((c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4)) - c5)) - c6)) - c7)) - c8)) - c9)) - diff --git a/tests/coverage-map/status-quo/loops_branches.cov-map b/tests/coverage-map/status-quo/loops_branches.cov-map deleted file mode 100644 index 480bbfd97..000000000 --- a/tests/coverage-map/status-quo/loops_branches.cov-map +++ /dev/null @@ -1,185 +0,0 @@ -Function name: <loops_branches::DebugTest as core::fmt::Debug>::fmt -Raw bytes (251): 0x[01, 01, 32, 05, 09, 00, 02, bf, 01, 19, c3, 01, c7, 01, 0d, 00, 11, 15, c3, 01, c7, 01, 0d, 00, 11, 15, ba, 01, 00, bf, 01, 19, c3, 01, c7, 01, 0d, 00, 11, 15, ba, 01, 15, bf, 01, 19, c3, 01, c7, 01, 0d, 00, 11, 15, b6, 01, 1d, ba, 01, 15, bf, 01, 19, c3, 01, c7, 01, 0d, 00, 11, 15, 00, b2, 01, b6, 01, 1d, ba, 01, 15, bf, 01, 19, c3, 01, c7, 01, 0d, 00, 11, 15, af, 01, 11, 00, b2, 01, b6, 01, 1d, ba, 01, 15, bf, 01, 19, c3, 01, c7, 01, 0d, 00, 11, 15, 25, a7, 01, aa, 01, 19, af, 01, 11, 00, b2, 01, b6, 01, 1d, ba, 01, 15, bf, 01, 19, c3, 01, c7, 01, 0d, 00, 11, 15, 14, 01, 09, 05, 01, 10, 05, 02, 10, 00, 15, 00, 01, 17, 00, 1b, 00, 00, 1c, 00, 1e, 02, 01, 0e, 00, 0f, 07, 01, 0d, 00, 1e, 25, 00, 1e, 00, 1f, 00, 01, 10, 01, 0a, ba, 01, 03, 0d, 00, 0e, bf, 01, 00, 12, 00, 17, 27, 01, 10, 00, 14, b6, 01, 01, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, b2, 01, 01, 12, 00, 13, af, 01, 01, 11, 00, 22, aa, 01, 00, 22, 00, 23, 00, 01, 14, 01, 0e, 19, 03, 09, 00, 0f, a3, 01, 01, 05, 00, 06] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 50 -- expression 0 operands: lhs = Counter(1), rhs = Counter(2) -- expression 1 operands: lhs = Zero, rhs = Expression(0, Sub) -- expression 2 operands: lhs = Expression(47, Add), rhs = Counter(6) -- expression 3 operands: lhs = Expression(48, Add), rhs = Expression(49, Add) -- expression 4 operands: lhs = Counter(3), rhs = Zero -- expression 5 operands: lhs = Counter(4), rhs = Counter(5) -- expression 6 operands: lhs = Expression(48, Add), rhs = Expression(49, Add) -- expression 7 operands: lhs = Counter(3), rhs = Zero -- expression 8 operands: lhs = Counter(4), rhs = Counter(5) -- expression 9 operands: lhs = Expression(46, Sub), rhs = Zero -- expression 10 operands: lhs = Expression(47, Add), rhs = Counter(6) -- expression 11 operands: lhs = Expression(48, Add), rhs = Expression(49, Add) -- expression 12 operands: lhs = Counter(3), rhs = Zero -- expression 13 operands: lhs = Counter(4), rhs = Counter(5) -- expression 14 operands: lhs = Expression(46, Sub), rhs = Counter(5) -- expression 15 operands: lhs = Expression(47, Add), rhs = Counter(6) -- expression 16 operands: lhs = Expression(48, Add), rhs = Expression(49, Add) -- expression 17 operands: lhs = Counter(3), rhs = Zero -- expression 18 operands: lhs = Counter(4), rhs = Counter(5) -- expression 19 operands: lhs = Expression(45, Sub), rhs = Counter(7) -- expression 20 operands: lhs = Expression(46, Sub), rhs = Counter(5) -- expression 21 operands: lhs = Expression(47, Add), rhs = Counter(6) -- expression 22 operands: lhs = Expression(48, Add), rhs = Expression(49, Add) -- expression 23 operands: lhs = Counter(3), rhs = Zero -- expression 24 operands: lhs = Counter(4), rhs = Counter(5) -- expression 25 operands: lhs = Zero, rhs = Expression(44, Sub) -- expression 26 operands: lhs = Expression(45, Sub), rhs = Counter(7) -- expression 27 operands: lhs = Expression(46, Sub), rhs = Counter(5) -- expression 28 operands: lhs = Expression(47, Add), rhs = Counter(6) -- expression 29 operands: lhs = Expression(48, Add), rhs = Expression(49, Add) -- expression 30 operands: lhs = Counter(3), rhs = Zero -- expression 31 operands: lhs = Counter(4), rhs = Counter(5) -- expression 32 operands: lhs = Expression(43, Add), rhs = Counter(4) -- expression 33 operands: lhs = Zero, rhs = Expression(44, Sub) -- expression 34 operands: lhs = Expression(45, Sub), rhs = Counter(7) -- expression 35 operands: lhs = Expression(46, Sub), rhs = Counter(5) -- expression 36 operands: lhs = Expression(47, Add), rhs = Counter(6) -- expression 37 operands: lhs = Expression(48, Add), rhs = Expression(49, Add) -- expression 38 operands: lhs = Counter(3), rhs = Zero -- expression 39 operands: lhs = Counter(4), rhs = Counter(5) -- expression 40 operands: lhs = Counter(9), rhs = Expression(41, Add) -- expression 41 operands: lhs = Expression(42, Sub), rhs = Counter(6) -- expression 42 operands: lhs = Expression(43, Add), rhs = Counter(4) -- expression 43 operands: lhs = Zero, rhs = Expression(44, Sub) -- expression 44 operands: lhs = Expression(45, Sub), rhs = Counter(7) -- expression 45 operands: lhs = Expression(46, Sub), rhs = Counter(5) -- expression 46 operands: lhs = Expression(47, Add), rhs = Counter(6) -- expression 47 operands: lhs = Expression(48, Add), rhs = Expression(49, Add) -- expression 48 operands: lhs = Counter(3), rhs = Zero -- expression 49 operands: lhs = Counter(4), rhs = Counter(5) -Number of file 0 mappings: 20 -- Code(Counter(0)) at (prev + 9, 5) to (start + 1, 16) -- Code(Counter(1)) at (prev + 2, 16) to (start + 0, 21) -- Code(Zero) at (prev + 1, 23) to (start + 0, 27) -- Code(Zero) at (prev + 0, 28) to (start + 0, 30) -- Code(Expression(0, Sub)) at (prev + 1, 14) to (start + 0, 15) - = (c1 - c2) -- Code(Expression(1, Add)) at (prev + 1, 13) to (start + 0, 30) - = (Zero + (c1 - c2)) -- Code(Counter(9)) at (prev + 0, 30) to (start + 0, 31) -- Code(Zero) at (prev + 1, 16) to (start + 1, 10) -- Code(Expression(46, Sub)) at (prev + 3, 13) to (start + 0, 14) - = (((c3 + Zero) + (c4 + c5)) - c6) -- Code(Expression(47, Add)) at (prev + 0, 18) to (start + 0, 23) - = ((c3 + Zero) + (c4 + c5)) -- Code(Expression(9, Add)) at (prev + 1, 16) to (start + 0, 20) - = ((((c3 + Zero) + (c4 + c5)) - c6) + Zero) -- Code(Expression(45, Sub)) at (prev + 1, 20) to (start + 0, 25) - = ((((c3 + Zero) + (c4 + c5)) - c6) - c5) -- Code(Zero) at (prev + 1, 27) to (start + 0, 31) -- Code(Zero) at (prev + 0, 32) to (start + 0, 34) -- Code(Expression(44, Sub)) at (prev + 1, 18) to (start + 0, 19) - = (((((c3 + Zero) + (c4 + c5)) - c6) - c5) - c7) -- Code(Expression(43, Add)) at (prev + 1, 17) to (start + 0, 34) - = (Zero + (((((c3 + Zero) + (c4 + c5)) - c6) - c5) - c7)) -- Code(Expression(42, Sub)) at (prev + 0, 34) to (start + 0, 35) - = ((Zero + (((((c3 + Zero) + (c4 + c5)) - c6) - c5) - c7)) - c4) -- Code(Zero) at (prev + 1, 20) to (start + 1, 14) -- Code(Counter(6)) at (prev + 3, 9) to (start + 0, 15) -- Code(Expression(40, Add)) at (prev + 1, 5) to (start + 0, 6) - = (c9 + (((Zero + (((((c3 + Zero) + (c4 + c5)) - c6) - c5) - c7)) - c4) + c6)) - -Function name: <loops_branches::DisplayTest as core::fmt::Display>::fmt -Raw bytes (255): 0x[01, 01, 34, 01, 05, 02, 09, 00, 0e, 02, 09, c3, 01, 19, c7, 01, cb, 01, 05, 0d, 11, 15, c7, 01, cb, 01, 05, 0d, 11, 15, be, 01, 00, c3, 01, 19, c7, 01, cb, 01, 05, 0d, 11, 15, be, 01, 11, c3, 01, 19, c7, 01, cb, 01, 05, 0d, 11, 15, ba, 01, 1d, be, 01, 11, c3, 01, 19, c7, 01, cb, 01, 05, 0d, 11, 15, 00, b6, 01, ba, 01, 1d, be, 01, 11, c3, 01, 19, c7, 01, cb, 01, 05, 0d, 11, 15, b3, 01, 15, 00, b6, 01, ba, 01, 1d, be, 01, 11, c3, 01, 19, c7, 01, cb, 01, 05, 0d, 11, 15, ae, 01, cf, 01, b3, 01, 15, 00, b6, 01, ba, 01, 1d, be, 01, 11, c3, 01, 19, c7, 01, cb, 01, 05, 0d, 11, 15, 19, 25, 14, 01, 22, 05, 01, 11, 00, 01, 12, 01, 0a, 02, 02, 10, 00, 15, 00, 01, 17, 00, 1b, 00, 00, 1c, 00, 1e, 0e, 01, 0e, 00, 0f, 0b, 01, 0d, 00, 1e, 25, 00, 1e, 00, 1f, be, 01, 02, 0d, 00, 0e, c3, 01, 00, 12, 00, 17, 2f, 01, 10, 00, 15, 00, 00, 16, 01, 0e, ba, 01, 02, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, b6, 01, 01, 12, 00, 13, b3, 01, 01, 11, 00, 22, ae, 01, 00, 22, 00, 23, 19, 03, 09, 00, 0f, ab, 01, 01, 05, 00, 06] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 52 -- expression 0 operands: lhs = Counter(0), rhs = Counter(1) -- expression 1 operands: lhs = Expression(0, Sub), rhs = Counter(2) -- expression 2 operands: lhs = Zero, rhs = Expression(3, Sub) -- expression 3 operands: lhs = Expression(0, Sub), rhs = Counter(2) -- expression 4 operands: lhs = Expression(48, Add), rhs = Counter(6) -- expression 5 operands: lhs = Expression(49, Add), rhs = Expression(50, Add) -- expression 6 operands: lhs = Counter(1), rhs = Counter(3) -- expression 7 operands: lhs = Counter(4), rhs = Counter(5) -- expression 8 operands: lhs = Expression(49, Add), rhs = Expression(50, Add) -- expression 9 operands: lhs = Counter(1), rhs = Counter(3) -- expression 10 operands: lhs = Counter(4), rhs = Counter(5) -- expression 11 operands: lhs = Expression(47, Sub), rhs = Zero -- expression 12 operands: lhs = Expression(48, Add), rhs = Counter(6) -- expression 13 operands: lhs = Expression(49, Add), rhs = Expression(50, Add) -- expression 14 operands: lhs = Counter(1), rhs = Counter(3) -- expression 15 operands: lhs = Counter(4), rhs = Counter(5) -- expression 16 operands: lhs = Expression(47, Sub), rhs = Counter(4) -- expression 17 operands: lhs = Expression(48, Add), rhs = Counter(6) -- expression 18 operands: lhs = Expression(49, Add), rhs = Expression(50, Add) -- expression 19 operands: lhs = Counter(1), rhs = Counter(3) -- expression 20 operands: lhs = Counter(4), rhs = Counter(5) -- expression 21 operands: lhs = Expression(46, Sub), rhs = Counter(7) -- expression 22 operands: lhs = Expression(47, Sub), rhs = Counter(4) -- expression 23 operands: lhs = Expression(48, Add), rhs = Counter(6) -- expression 24 operands: lhs = Expression(49, Add), rhs = Expression(50, Add) -- expression 25 operands: lhs = Counter(1), rhs = Counter(3) -- expression 26 operands: lhs = Counter(4), rhs = Counter(5) -- expression 27 operands: lhs = Zero, rhs = Expression(45, Sub) -- expression 28 operands: lhs = Expression(46, Sub), rhs = Counter(7) -- expression 29 operands: lhs = Expression(47, Sub), rhs = Counter(4) -- expression 30 operands: lhs = Expression(48, Add), rhs = Counter(6) -- expression 31 operands: lhs = Expression(49, Add), rhs = Expression(50, Add) -- expression 32 operands: lhs = Counter(1), rhs = Counter(3) -- expression 33 operands: lhs = Counter(4), rhs = Counter(5) -- expression 34 operands: lhs = Expression(44, Add), rhs = Counter(5) -- expression 35 operands: lhs = Zero, rhs = Expression(45, Sub) -- expression 36 operands: lhs = Expression(46, Sub), rhs = Counter(7) -- expression 37 operands: lhs = Expression(47, Sub), rhs = Counter(4) -- expression 38 operands: lhs = Expression(48, Add), rhs = Counter(6) -- expression 39 operands: lhs = Expression(49, Add), rhs = Expression(50, Add) -- expression 40 operands: lhs = Counter(1), rhs = Counter(3) -- expression 41 operands: lhs = Counter(4), rhs = Counter(5) -- expression 42 operands: lhs = Expression(43, Sub), rhs = Expression(51, Add) -- expression 43 operands: lhs = Expression(44, Add), rhs = Counter(5) -- expression 44 operands: lhs = Zero, rhs = Expression(45, Sub) -- expression 45 operands: lhs = Expression(46, Sub), rhs = Counter(7) -- expression 46 operands: lhs = Expression(47, Sub), rhs = Counter(4) -- expression 47 operands: lhs = Expression(48, Add), rhs = Counter(6) -- expression 48 operands: lhs = Expression(49, Add), rhs = Expression(50, Add) -- expression 49 operands: lhs = Counter(1), rhs = Counter(3) -- expression 50 operands: lhs = Counter(4), rhs = Counter(5) -- expression 51 operands: lhs = Counter(6), rhs = Counter(9) -Number of file 0 mappings: 20 -- Code(Counter(0)) at (prev + 34, 5) to (start + 1, 17) -- Code(Zero) at (prev + 1, 18) to (start + 1, 10) -- Code(Expression(0, Sub)) at (prev + 2, 16) to (start + 0, 21) - = (c0 - c1) -- Code(Zero) at (prev + 1, 23) to (start + 0, 27) -- Code(Zero) at (prev + 0, 28) to (start + 0, 30) -- Code(Expression(3, Sub)) at (prev + 1, 14) to (start + 0, 15) - = ((c0 - c1) - c2) -- Code(Expression(2, Add)) at (prev + 1, 13) to (start + 0, 30) - = (Zero + ((c0 - c1) - c2)) -- Code(Counter(9)) at (prev + 0, 30) to (start + 0, 31) -- Code(Expression(47, Sub)) at (prev + 2, 13) to (start + 0, 14) - = (((c1 + c3) + (c4 + c5)) - c6) -- Code(Expression(48, Add)) at (prev + 0, 18) to (start + 0, 23) - = ((c1 + c3) + (c4 + c5)) -- Code(Expression(11, Add)) at (prev + 1, 16) to (start + 0, 21) - = ((((c1 + c3) + (c4 + c5)) - c6) + Zero) -- Code(Zero) at (prev + 0, 22) to (start + 1, 14) -- Code(Expression(46, Sub)) at (prev + 2, 20) to (start + 0, 25) - = ((((c1 + c3) + (c4 + c5)) - c6) - c4) -- Code(Zero) at (prev + 1, 27) to (start + 0, 31) -- Code(Zero) at (prev + 0, 32) to (start + 0, 34) -- Code(Expression(45, Sub)) at (prev + 1, 18) to (start + 0, 19) - = (((((c1 + c3) + (c4 + c5)) - c6) - c4) - c7) -- Code(Expression(44, Add)) at (prev + 1, 17) to (start + 0, 34) - = (Zero + (((((c1 + c3) + (c4 + c5)) - c6) - c4) - c7)) -- Code(Expression(43, Sub)) at (prev + 0, 34) to (start + 0, 35) - = ((Zero + (((((c1 + c3) + (c4 + c5)) - c6) - c4) - c7)) - c5) -- Code(Counter(6)) at (prev + 3, 9) to (start + 0, 15) -- Code(Expression(42, Add)) at (prev + 1, 5) to (start + 0, 6) - = (((Zero + (((((c1 + c3) + (c4 + c5)) - c6) - c4) - c7)) - c5) + (c6 + c9)) - -Function name: loops_branches::main -Raw bytes (9): 0x[01, 01, 00, 01, 01, 37, 01, 05, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 0 -Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 55, 1) to (start + 5, 2) - diff --git a/tests/coverage-map/status-quo/overflow.rs b/tests/coverage-map/status-quo/overflow.rs deleted file mode 100644 index bbb65c1b3..000000000 --- a/tests/coverage-map/status-quo/overflow.rs +++ /dev/null @@ -1,63 +0,0 @@ -#![allow(unused_assignments)] -// failure-status: 101 - -fn might_overflow(to_add: u32) -> u32 { - if to_add > 5 { - println!("this will probably overflow"); - } - let add_to = u32::MAX - 5; - println!("does {} + {} overflow?", add_to, to_add); - let result = to_add + add_to; - println!("continuing after overflow check"); - result -} - -fn main() -> Result<(), u8> { - let mut countdown = 10; - while countdown > 0 { - if countdown == 1 { - let result = might_overflow(10); - println!("Result: {}", result); - } else if countdown < 5 { - let result = might_overflow(1); - println!("Result: {}", result); - } - countdown -= 1; - } - Ok(()) -} - -// Notes: -// 1. Compare this program and its coverage results to those of the very similar test `assert.rs`, -// and similar tests `panic_unwind.rs`, abort.rs` and `try_error_result.rs`. -// 2. This test confirms the coverage generated when a program passes or fails a -// compiler-generated `TerminatorKind::Assert` (based on an overflow check, in this case). -// 3. Similar to how the coverage instrumentation handles `TerminatorKind::Call`, -// compiler-generated assertion failures are assumed to be a symptom of a program bug, not -// expected behavior. To simplify the coverage graphs and keep instrumented programs as -// small and fast as possible, `Assert` terminators are assumed to always succeed, and -// therefore are considered "non-branching" terminators. So, an `Assert` terminator does not -// get its own coverage counter. -// 4. After an unhandled panic or failed Assert, coverage results may not always be intuitive. -// In this test, the final count for the statements after the `if` block in `might_overflow()` -// is 4, even though the lines after `to_add + add_to` were executed only 3 times. Depending -// on the MIR graph and the structure of the code, this count could have been 3 (which might -// have been valid for the overflowed add `+`, but should have been 4 for the lines before -// the overflow. The reason for this potential uncertainty is, a `CounterKind` is incremented -// via StatementKind::Counter at the end of the block, but (as in the case in this test), -// a CounterKind::Expression is always evaluated. In this case, the expression was based on -// a `Counter` incremented as part of the evaluation of the `if` expression, which was -// executed, and counted, 4 times, before reaching the overflow add. - -// If the program did not overflow, the coverage for `might_overflow()` would look like this: -// -// 4| |fn might_overflow(to_add: u32) -> u32 { -// 5| 4| if to_add > 5 { -// 6| 0| println!("this will probably overflow"); -// 7| 4| } -// 8| 4| let add_to = u32::MAX - 5; -// 9| 4| println!("does {} + {} overflow?", add_to, to_add); -// 10| 4| let result = to_add + add_to; -// 11| 4| println!("continuing after overflow check"); -// 12| 4| result -// 13| 4|} diff --git a/tests/coverage-map/status-quo/simple_loop.cov-map b/tests/coverage-map/status-quo/simple_loop.cov-map deleted file mode 100644 index eb49c2324..000000000 --- a/tests/coverage-map/status-quo/simple_loop.cov-map +++ /dev/null @@ -1,28 +0,0 @@ -Function name: simple_loop::main -Raw bytes (59): 0x[01, 01, 0a, 01, 05, 27, 09, 05, 02, 23, 09, 27, 09, 05, 02, 1e, 00, 23, 09, 27, 09, 05, 02, 07, 01, 03, 01, 09, 10, 05, 0a, 05, 05, 06, 02, 05, 06, 00, 07, 23, 05, 0d, 02, 0e, 1e, 04, 0d, 00, 12, 09, 02, 0a, 03, 0a, 1b, 06, 01, 00, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 10 -- expression 0 operands: lhs = Counter(0), rhs = Counter(1) -- expression 1 operands: lhs = Expression(9, Add), rhs = Counter(2) -- expression 2 operands: lhs = Counter(1), rhs = Expression(0, Sub) -- expression 3 operands: lhs = Expression(8, Add), rhs = Counter(2) -- expression 4 operands: lhs = Expression(9, Add), rhs = Counter(2) -- expression 5 operands: lhs = Counter(1), rhs = Expression(0, Sub) -- expression 6 operands: lhs = Expression(7, Sub), rhs = Zero -- expression 7 operands: lhs = Expression(8, Add), rhs = Counter(2) -- expression 8 operands: lhs = Expression(9, Add), rhs = Counter(2) -- expression 9 operands: lhs = Counter(1), rhs = Expression(0, Sub) -Number of file 0 mappings: 7 -- Code(Counter(0)) at (prev + 3, 1) to (start + 9, 16) -- Code(Counter(1)) at (prev + 10, 5) to (start + 5, 6) -- Code(Expression(0, Sub)) at (prev + 5, 6) to (start + 0, 7) - = (c0 - c1) -- Code(Expression(8, Add)) at (prev + 5, 13) to (start + 2, 14) - = ((c1 + (c0 - c1)) + c2) -- Code(Expression(7, Sub)) at (prev + 4, 13) to (start + 0, 18) - = (((c1 + (c0 - c1)) + c2) - c2) -- Code(Counter(2)) at (prev + 2, 10) to (start + 3, 10) -- Code(Expression(6, Add)) at (prev + 6, 1) to (start + 0, 2) - = ((((c1 + (c0 - c1)) + c2) - c2) + Zero) - diff --git a/tests/coverage-map/status-quo/simple_match.cov-map b/tests/coverage-map/status-quo/simple_match.cov-map deleted file mode 100644 index d5389f04b..000000000 --- a/tests/coverage-map/status-quo/simple_match.cov-map +++ /dev/null @@ -1,36 +0,0 @@ -Function name: simple_match::main -Raw bytes (82): 0x[01, 01, 0e, 01, 05, 2f, 33, 05, 02, 09, 0d, 2b, 11, 2f, 33, 05, 02, 09, 0d, 26, 00, 2b, 11, 2f, 33, 05, 02, 09, 0d, 09, 00, 0a, 01, 03, 01, 07, 0f, 05, 07, 10, 02, 06, 02, 02, 06, 00, 07, 2b, 05, 09, 00, 0d, 26, 05, 0d, 00, 16, 09, 02, 0d, 00, 0e, 23, 02, 11, 02, 12, 37, 04, 0d, 07, 0e, 0d, 0a, 0d, 00, 0f, 11, 03, 01, 00, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 14 -- expression 0 operands: lhs = Counter(0), rhs = Counter(1) -- expression 1 operands: lhs = Expression(11, Add), rhs = Expression(12, Add) -- expression 2 operands: lhs = Counter(1), rhs = Expression(0, Sub) -- expression 3 operands: lhs = Counter(2), rhs = Counter(3) -- expression 4 operands: lhs = Expression(10, Add), rhs = Counter(4) -- expression 5 operands: lhs = Expression(11, Add), rhs = Expression(12, Add) -- expression 6 operands: lhs = Counter(1), rhs = Expression(0, Sub) -- expression 7 operands: lhs = Counter(2), rhs = Counter(3) -- expression 8 operands: lhs = Expression(9, Sub), rhs = Zero -- expression 9 operands: lhs = Expression(10, Add), rhs = Counter(4) -- expression 10 operands: lhs = Expression(11, Add), rhs = Expression(12, Add) -- expression 11 operands: lhs = Counter(1), rhs = Expression(0, Sub) -- expression 12 operands: lhs = Counter(2), rhs = Counter(3) -- expression 13 operands: lhs = Counter(2), rhs = Zero -Number of file 0 mappings: 10 -- Code(Counter(0)) at (prev + 3, 1) to (start + 7, 15) -- Code(Counter(1)) at (prev + 7, 16) to (start + 2, 6) -- Code(Expression(0, Sub)) at (prev + 2, 6) to (start + 0, 7) - = (c0 - c1) -- Code(Expression(10, Add)) at (prev + 5, 9) to (start + 0, 13) - = ((c1 + (c0 - c1)) + (c2 + c3)) -- Code(Expression(9, Sub)) at (prev + 5, 13) to (start + 0, 22) - = (((c1 + (c0 - c1)) + (c2 + c3)) - c4) -- Code(Counter(2)) at (prev + 2, 13) to (start + 0, 14) -- Code(Expression(8, Add)) at (prev + 2, 17) to (start + 2, 18) - = ((((c1 + (c0 - c1)) + (c2 + c3)) - c4) + Zero) -- Code(Expression(13, Add)) at (prev + 4, 13) to (start + 7, 14) - = (c2 + Zero) -- Code(Counter(3)) at (prev + 10, 13) to (start + 0, 15) -- Code(Counter(4)) at (prev + 3, 1) to (start + 0, 2) - diff --git a/tests/coverage-map/status-quo/sort_groups.rs b/tests/coverage-map/status-quo/sort_groups.rs deleted file mode 100644 index f89f9f3ec..000000000 --- a/tests/coverage-map/status-quo/sort_groups.rs +++ /dev/null @@ -1,23 +0,0 @@ -// compile-flags: --edition=2021 - -// Demonstrate that `sort_subviews.py` can sort instantiation groups into a -// predictable order, while preserving their heterogeneous contents. - -fn main() { - let cond = std::env::args().len() > 1; - generic_fn::<()>(cond); - generic_fn::<&'static str>(!cond); - if false { - generic_fn::<char>(cond); - } - generic_fn::<i32>(cond); - other_fn(); -} - -fn generic_fn<T>(cond: bool) { - if cond { - println!("{}", std::any::type_name::<T>()); - } -} - -fn other_fn() {} diff --git a/tests/coverage-map/status-quo/tight_inf_loop.cov-map b/tests/coverage-map/status-quo/tight_inf_loop.cov-map deleted file mode 100644 index 76884212c..000000000 --- a/tests/coverage-map/status-quo/tight_inf_loop.cov-map +++ /dev/null @@ -1,12 +0,0 @@ -Function name: tight_inf_loop::main -Raw bytes (21): 0x[01, 01, 01, 01, 05, 03, 01, 01, 01, 01, 0d, 00, 02, 09, 00, 10, 02, 01, 06, 01, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 1 -- expression 0 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 3 -- Code(Counter(0)) at (prev + 1, 1) to (start + 1, 13) -- Code(Zero) at (prev + 2, 9) to (start + 0, 16) -- Code(Expression(0, Sub)) at (prev + 1, 6) to (start + 1, 2) - = (c0 - c1) - diff --git a/tests/coverage-map/status-quo/try_error_result.cov-map b/tests/coverage-map/status-quo/try_error_result.cov-map deleted file mode 100644 index b52e78d11..000000000 --- a/tests/coverage-map/status-quo/try_error_result.cov-map +++ /dev/null @@ -1,226 +0,0 @@ -Function name: <try_error_result::Thing1>::get_thing_2 -Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 28, 05, 01, 18, 05, 02, 0d, 00, 14, 02, 02, 0d, 00, 1a, 07, 02, 05, 00, 06] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 2 -- expression 0 operands: lhs = Counter(0), rhs = Counter(1) -- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) -Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 40, 5) to (start + 1, 24) -- Code(Counter(1)) at (prev + 2, 13) to (start + 0, 20) -- Code(Expression(0, Sub)) at (prev + 2, 13) to (start + 0, 26) - = (c0 - c1) -- Code(Expression(1, Add)) at (prev + 2, 5) to (start + 0, 6) - = (c1 + (c0 - c1)) - -Function name: <try_error_result::Thing2>::call -Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 33, 05, 01, 18, 05, 02, 0d, 00, 14, 02, 02, 0d, 00, 13, 07, 02, 05, 00, 06] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 2 -- expression 0 operands: lhs = Counter(0), rhs = Counter(1) -- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) -Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 51, 5) to (start + 1, 24) -- Code(Counter(1)) at (prev + 2, 13) to (start + 0, 20) -- Code(Expression(0, Sub)) at (prev + 2, 13) to (start + 0, 19) - = (c0 - c1) -- Code(Expression(1, Add)) at (prev + 2, 5) to (start + 0, 6) - = (c1 + (c0 - c1)) - -Function name: try_error_result::call -Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 04, 01, 01, 14, 05, 02, 09, 00, 10, 02, 02, 09, 00, 0f, 07, 02, 01, 00, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 2 -- expression 0 operands: lhs = Counter(0), rhs = Counter(1) -- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) -Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 4, 1) to (start + 1, 20) -- Code(Counter(1)) at (prev + 2, 9) to (start + 0, 16) -- Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 15) - = (c0 - c1) -- Code(Expression(1, Add)) at (prev + 2, 1) to (start + 0, 2) - = (c1 + (c0 - c1)) - -Function name: try_error_result::main -Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 70, 01, 02, 0c, 05, 03, 05, 00, 06, 02, 02, 05, 00, 0b, 07, 01, 01, 00, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 2 -- expression 0 operands: lhs = Counter(0), rhs = Counter(1) -- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) -Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 112, 1) to (start + 2, 12) -- Code(Counter(1)) at (prev + 3, 5) to (start + 0, 6) -- Code(Expression(0, Sub)) at (prev + 2, 5) to (start + 0, 11) - = (c0 - c1) -- Code(Expression(1, Add)) at (prev + 1, 1) to (start + 0, 2) - = (c1 + (c0 - c1)) - -Function name: try_error_result::test1 -Raw bytes (77): 0x[01, 01, 09, 01, 07, 05, 09, 03, 0d, 1d, 11, 16, 1d, 03, 0d, 1f, 0d, 11, 23, 15, 19, 0b, 01, 0c, 01, 02, 17, 03, 07, 09, 00, 0e, 16, 02, 09, 04, 1a, 1d, 06, 0d, 00, 29, 11, 00, 29, 00, 2a, 0e, 01, 0d, 00, 2a, 15, 00, 2a, 00, 2b, 12, 04, 0d, 00, 2a, 19, 00, 2a, 00, 2b, 0d, 03, 05, 00, 0b, 1b, 01, 01, 00, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 9 -- expression 0 operands: lhs = Counter(0), rhs = Expression(1, Add) -- expression 1 operands: lhs = Counter(1), rhs = Counter(2) -- expression 2 operands: lhs = Expression(0, Add), rhs = Counter(3) -- expression 3 operands: lhs = Counter(7), rhs = Counter(4) -- expression 4 operands: lhs = Expression(5, Sub), rhs = Counter(7) -- expression 5 operands: lhs = Expression(0, Add), rhs = Counter(3) -- expression 6 operands: lhs = Expression(7, Add), rhs = Counter(3) -- expression 7 operands: lhs = Counter(4), rhs = Expression(8, Add) -- expression 8 operands: lhs = Counter(5), rhs = Counter(6) -Number of file 0 mappings: 11 -- Code(Counter(0)) at (prev + 12, 1) to (start + 2, 23) -- Code(Expression(0, Add)) at (prev + 7, 9) to (start + 0, 14) - = (c0 + (c1 + c2)) -- Code(Expression(5, Sub)) at (prev + 2, 9) to (start + 4, 26) - = ((c0 + (c1 + c2)) - c3) -- Code(Counter(7)) at (prev + 6, 13) to (start + 0, 41) -- Code(Counter(4)) at (prev + 0, 41) to (start + 0, 42) -- Code(Expression(3, Sub)) at (prev + 1, 13) to (start + 0, 42) - = (c7 - c4) -- Code(Counter(5)) at (prev + 0, 42) to (start + 0, 43) -- Code(Expression(4, Sub)) at (prev + 4, 13) to (start + 0, 42) - = (((c0 + (c1 + c2)) - c3) - c7) -- Code(Counter(6)) at (prev + 0, 42) to (start + 0, 43) -- Code(Counter(3)) at (prev + 3, 5) to (start + 0, 11) -- Code(Expression(6, Add)) at (prev + 1, 1) to (start + 0, 2) - = ((c4 + (c5 + c6)) + c3) - -Function name: try_error_result::test2 -Raw bytes (373): 0x[01, 01, 41, 01, 07, 05, 09, 03, 0d, 41, 11, 52, 15, 41, 11, 4a, 1d, 4e, 19, 52, 15, 41, 11, 4e, 00, 52, 15, 41, 11, 4e, 19, 52, 15, 41, 11, 46, 00, 4a, 1d, 4e, 19, 52, 15, 41, 11, 6a, 25, 49, 21, 49, 21, 66, 00, 6a, 25, 49, 21, 9a, 01, 2d, 9e, 01, 29, a2, 01, 41, 03, 0d, a2, 01, 41, 03, 0d, 9e, 01, 29, a2, 01, 41, 03, 0d, 96, 01, 00, 9a, 01, 2d, 9e, 01, 29, a2, 01, 41, 03, 0d, ba, 01, 35, 45, 31, 45, 31, b6, 01, 00, ba, 01, 35, 45, 31, d2, 01, 3d, 4d, 39, 4d, 39, ce, 01, 00, d2, 01, 3d, 4d, 39, db, 01, 0d, 11, df, 01, e3, 01, f3, 01, 15, e7, 01, eb, 01, ef, 01, 19, 1d, 21, 25, f7, 01, fb, 01, 29, 2d, ff, 01, 83, 02, 31, 35, 39, 3d, 28, 01, 3c, 01, 03, 17, 03, 08, 09, 00, 0e, a2, 01, 02, 09, 04, 1a, 41, 06, 0d, 00, 2f, 11, 00, 2f, 00, 30, 52, 00, 31, 03, 35, 15, 04, 11, 00, 12, 4e, 02, 11, 04, 12, 46, 05, 11, 00, 14, 2b, 00, 17, 00, 41, 19, 00, 41, 00, 42, 4a, 00, 43, 00, 5f, 1d, 00, 5f, 00, 60, 43, 01, 0d, 00, 20, 66, 01, 11, 00, 14, 49, 00, 17, 00, 41, 21, 00, 41, 00, 42, 6a, 00, 43, 00, 60, 25, 00, 60, 00, 61, 63, 01, 0d, 00, 20, 96, 01, 04, 11, 00, 14, 9e, 01, 00, 17, 00, 42, 29, 00, 42, 00, 43, 9a, 01, 00, 44, 00, 61, 2d, 00, 61, 00, 62, 93, 01, 01, 0d, 00, 20, b6, 01, 01, 11, 00, 14, 45, 00, 17, 01, 36, 31, 01, 36, 00, 37, ba, 01, 01, 12, 00, 2f, 35, 00, 2f, 00, 30, b3, 01, 01, 0d, 00, 20, ce, 01, 01, 11, 00, 14, 4d, 00, 17, 01, 36, 39, 02, 11, 00, 12, d2, 01, 01, 12, 00, 2f, 3d, 01, 11, 00, 12, cb, 01, 02, 0d, 00, 20, 0d, 03, 05, 00, 0b, d7, 01, 01, 01, 00, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 65 -- expression 0 operands: lhs = Counter(0), rhs = Expression(1, Add) -- expression 1 operands: lhs = Counter(1), rhs = Counter(2) -- expression 2 operands: lhs = Expression(0, Add), rhs = Counter(3) -- expression 3 operands: lhs = Counter(16), rhs = Counter(4) -- expression 4 operands: lhs = Expression(20, Sub), rhs = Counter(5) -- expression 5 operands: lhs = Counter(16), rhs = Counter(4) -- expression 6 operands: lhs = Expression(18, Sub), rhs = Counter(7) -- expression 7 operands: lhs = Expression(19, Sub), rhs = Counter(6) -- expression 8 operands: lhs = Expression(20, Sub), rhs = Counter(5) -- expression 9 operands: lhs = Counter(16), rhs = Counter(4) -- expression 10 operands: lhs = Expression(19, Sub), rhs = Zero -- expression 11 operands: lhs = Expression(20, Sub), rhs = Counter(5) -- expression 12 operands: lhs = Counter(16), rhs = Counter(4) -- expression 13 operands: lhs = Expression(19, Sub), rhs = Counter(6) -- expression 14 operands: lhs = Expression(20, Sub), rhs = Counter(5) -- expression 15 operands: lhs = Counter(16), rhs = Counter(4) -- expression 16 operands: lhs = Expression(17, Sub), rhs = Zero -- expression 17 operands: lhs = Expression(18, Sub), rhs = Counter(7) -- expression 18 operands: lhs = Expression(19, Sub), rhs = Counter(6) -- expression 19 operands: lhs = Expression(20, Sub), rhs = Counter(5) -- expression 20 operands: lhs = Counter(16), rhs = Counter(4) -- expression 21 operands: lhs = Expression(26, Sub), rhs = Counter(9) -- expression 22 operands: lhs = Counter(18), rhs = Counter(8) -- expression 23 operands: lhs = Counter(18), rhs = Counter(8) -- expression 24 operands: lhs = Expression(25, Sub), rhs = Zero -- expression 25 operands: lhs = Expression(26, Sub), rhs = Counter(9) -- expression 26 operands: lhs = Counter(18), rhs = Counter(8) -- expression 27 operands: lhs = Expression(38, Sub), rhs = Counter(11) -- expression 28 operands: lhs = Expression(39, Sub), rhs = Counter(10) -- expression 29 operands: lhs = Expression(40, Sub), rhs = Counter(16) -- expression 30 operands: lhs = Expression(0, Add), rhs = Counter(3) -- expression 31 operands: lhs = Expression(40, Sub), rhs = Counter(16) -- expression 32 operands: lhs = Expression(0, Add), rhs = Counter(3) -- expression 33 operands: lhs = Expression(39, Sub), rhs = Counter(10) -- expression 34 operands: lhs = Expression(40, Sub), rhs = Counter(16) -- expression 35 operands: lhs = Expression(0, Add), rhs = Counter(3) -- expression 36 operands: lhs = Expression(37, Sub), rhs = Zero -- expression 37 operands: lhs = Expression(38, Sub), rhs = Counter(11) -- expression 38 operands: lhs = Expression(39, Sub), rhs = Counter(10) -- expression 39 operands: lhs = Expression(40, Sub), rhs = Counter(16) -- expression 40 operands: lhs = Expression(0, Add), rhs = Counter(3) -- expression 41 operands: lhs = Expression(46, Sub), rhs = Counter(13) -- expression 42 operands: lhs = Counter(17), rhs = Counter(12) -- expression 43 operands: lhs = Counter(17), rhs = Counter(12) -- expression 44 operands: lhs = Expression(45, Sub), rhs = Zero -- expression 45 operands: lhs = Expression(46, Sub), rhs = Counter(13) -- expression 46 operands: lhs = Counter(17), rhs = Counter(12) -- expression 47 operands: lhs = Expression(52, Sub), rhs = Counter(15) -- expression 48 operands: lhs = Counter(19), rhs = Counter(14) -- expression 49 operands: lhs = Counter(19), rhs = Counter(14) -- expression 50 operands: lhs = Expression(51, Sub), rhs = Zero -- expression 51 operands: lhs = Expression(52, Sub), rhs = Counter(15) -- expression 52 operands: lhs = Counter(19), rhs = Counter(14) -- expression 53 operands: lhs = Expression(54, Add), rhs = Counter(3) -- expression 54 operands: lhs = Counter(4), rhs = Expression(55, Add) -- expression 55 operands: lhs = Expression(56, Add), rhs = Expression(60, Add) -- expression 56 operands: lhs = Counter(5), rhs = Expression(57, Add) -- expression 57 operands: lhs = Expression(58, Add), rhs = Expression(59, Add) -- expression 58 operands: lhs = Counter(6), rhs = Counter(7) -- expression 59 operands: lhs = Counter(8), rhs = Counter(9) -- expression 60 operands: lhs = Expression(61, Add), rhs = Expression(62, Add) -- expression 61 operands: lhs = Counter(10), rhs = Counter(11) -- expression 62 operands: lhs = Expression(63, Add), rhs = Expression(64, Add) -- expression 63 operands: lhs = Counter(12), rhs = Counter(13) -- expression 64 operands: lhs = Counter(14), rhs = Counter(15) -Number of file 0 mappings: 40 -- Code(Counter(0)) at (prev + 60, 1) to (start + 3, 23) -- Code(Expression(0, Add)) at (prev + 8, 9) to (start + 0, 14) - = (c0 + (c1 + c2)) -- Code(Expression(40, Sub)) at (prev + 2, 9) to (start + 4, 26) - = ((c0 + (c1 + c2)) - c3) -- Code(Counter(16)) at (prev + 6, 13) to (start + 0, 47) -- Code(Counter(4)) at (prev + 0, 47) to (start + 0, 48) -- Code(Expression(20, Sub)) at (prev + 0, 49) to (start + 3, 53) - = (c16 - c4) -- Code(Counter(5)) at (prev + 4, 17) to (start + 0, 18) -- Code(Expression(19, Sub)) at (prev + 2, 17) to (start + 4, 18) - = ((c16 - c4) - c5) -- Code(Expression(17, Sub)) at (prev + 5, 17) to (start + 0, 20) - = ((((c16 - c4) - c5) - c6) - c7) -- Code(Expression(10, Add)) at (prev + 0, 23) to (start + 0, 65) - = (((c16 - c4) - c5) + Zero) -- Code(Counter(6)) at (prev + 0, 65) to (start + 0, 66) -- Code(Expression(18, Sub)) at (prev + 0, 67) to (start + 0, 95) - = (((c16 - c4) - c5) - c6) -- Code(Counter(7)) at (prev + 0, 95) to (start + 0, 96) -- Code(Expression(16, Add)) at (prev + 1, 13) to (start + 0, 32) - = (((((c16 - c4) - c5) - c6) - c7) + Zero) -- Code(Expression(25, Sub)) at (prev + 1, 17) to (start + 0, 20) - = ((c18 - c8) - c9) -- Code(Counter(18)) at (prev + 0, 23) to (start + 0, 65) -- Code(Counter(8)) at (prev + 0, 65) to (start + 0, 66) -- Code(Expression(26, Sub)) at (prev + 0, 67) to (start + 0, 96) - = (c18 - c8) -- Code(Counter(9)) at (prev + 0, 96) to (start + 0, 97) -- Code(Expression(24, Add)) at (prev + 1, 13) to (start + 0, 32) - = (((c18 - c8) - c9) + Zero) -- Code(Expression(37, Sub)) at (prev + 4, 17) to (start + 0, 20) - = (((((c0 + (c1 + c2)) - c3) - c16) - c10) - c11) -- Code(Expression(39, Sub)) at (prev + 0, 23) to (start + 0, 66) - = (((c0 + (c1 + c2)) - c3) - c16) -- Code(Counter(10)) at (prev + 0, 66) to (start + 0, 67) -- Code(Expression(38, Sub)) at (prev + 0, 68) to (start + 0, 97) - = ((((c0 + (c1 + c2)) - c3) - c16) - c10) -- Code(Counter(11)) at (prev + 0, 97) to (start + 0, 98) -- Code(Expression(36, Add)) at (prev + 1, 13) to (start + 0, 32) - = ((((((c0 + (c1 + c2)) - c3) - c16) - c10) - c11) + Zero) -- Code(Expression(45, Sub)) at (prev + 1, 17) to (start + 0, 20) - = ((c17 - c12) - c13) -- Code(Counter(17)) at (prev + 0, 23) to (start + 1, 54) -- Code(Counter(12)) at (prev + 1, 54) to (start + 0, 55) -- Code(Expression(46, Sub)) at (prev + 1, 18) to (start + 0, 47) - = (c17 - c12) -- Code(Counter(13)) at (prev + 0, 47) to (start + 0, 48) -- Code(Expression(44, Add)) at (prev + 1, 13) to (start + 0, 32) - = (((c17 - c12) - c13) + Zero) -- Code(Expression(51, Sub)) at (prev + 1, 17) to (start + 0, 20) - = ((c19 - c14) - c15) -- Code(Counter(19)) at (prev + 0, 23) to (start + 1, 54) -- Code(Counter(14)) at (prev + 2, 17) to (start + 0, 18) -- Code(Expression(52, Sub)) at (prev + 1, 18) to (start + 0, 47) - = (c19 - c14) -- Code(Counter(15)) at (prev + 1, 17) to (start + 0, 18) -- Code(Expression(50, Add)) at (prev + 2, 13) to (start + 0, 32) - = (((c19 - c14) - c15) + Zero) -- Code(Counter(3)) at (prev + 3, 5) to (start + 0, 11) -- Code(Expression(53, Add)) at (prev + 1, 1) to (start + 0, 2) - = ((c4 + ((c5 + ((c6 + c7) + (c8 + c9))) + ((c10 + c11) + ((c12 + c13) + (c14 + c15))))) + c3) - diff --git a/tests/coverage-map/status-quo/while.cov-map b/tests/coverage-map/status-quo/while.cov-map deleted file mode 100644 index cfd2be96a..000000000 --- a/tests/coverage-map/status-quo/while.cov-map +++ /dev/null @@ -1,15 +0,0 @@ -Function name: while::main -Raw bytes (28): 0x[01, 01, 02, 01, 05, 03, 05, 04, 01, 01, 01, 01, 10, 03, 02, 0b, 00, 14, 00, 00, 15, 01, 06, 06, 02, 01, 00, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 2 -- expression 0 operands: lhs = Counter(0), rhs = Counter(1) -- expression 1 operands: lhs = Expression(0, Add), rhs = Counter(1) -Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 1, 1) to (start + 1, 16) -- Code(Expression(0, Add)) at (prev + 2, 11) to (start + 0, 20) - = (c0 + c1) -- Code(Zero) at (prev + 0, 21) to (start + 1, 6) -- Code(Expression(1, Sub)) at (prev + 2, 1) to (start + 0, 2) - = ((c0 + c1) - c1) - diff --git a/tests/coverage-map/status-quo/yield.cov-map b/tests/coverage-map/status-quo/yield.cov-map deleted file mode 100644 index 16caa2db3..000000000 --- a/tests/coverage-map/status-quo/yield.cov-map +++ /dev/null @@ -1,72 +0,0 @@ -Function name: yield::main -Raw bytes (118): 0x[01, 01, 11, 01, 00, 05, 09, 0d, 00, 0d, 11, 32, 15, 0d, 11, 11, 15, 2e, 00, 32, 15, 0d, 11, 2e, 00, 32, 15, 0d, 11, 19, 1d, 21, 00, 25, 29, 2d, 00, 10, 01, 07, 01, 01, 16, 03, 06, 0b, 00, 2e, 0d, 01, 27, 00, 29, 07, 01, 0e, 00, 34, 0b, 02, 0b, 00, 2e, 32, 01, 22, 00, 27, 2e, 00, 2c, 00, 2e, 1b, 01, 0e, 00, 34, 1f, 03, 09, 00, 16, 2b, 07, 0b, 00, 2e, 21, 01, 27, 00, 29, 37, 01, 0e, 00, 34, 3b, 02, 0b, 00, 2e, 2d, 01, 27, 00, 29, 3f, 01, 0e, 00, 34, 43, 02, 01, 00, 02] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 17 -- expression 0 operands: lhs = Counter(0), rhs = Zero -- expression 1 operands: lhs = Counter(1), rhs = Counter(2) -- expression 2 operands: lhs = Counter(3), rhs = Zero -- expression 3 operands: lhs = Counter(3), rhs = Counter(4) -- expression 4 operands: lhs = Expression(12, Sub), rhs = Counter(5) -- expression 5 operands: lhs = Counter(3), rhs = Counter(4) -- expression 6 operands: lhs = Counter(4), rhs = Counter(5) -- expression 7 operands: lhs = Expression(11, Sub), rhs = Zero -- expression 8 operands: lhs = Expression(12, Sub), rhs = Counter(5) -- expression 9 operands: lhs = Counter(3), rhs = Counter(4) -- expression 10 operands: lhs = Expression(11, Sub), rhs = Zero -- expression 11 operands: lhs = Expression(12, Sub), rhs = Counter(5) -- expression 12 operands: lhs = Counter(3), rhs = Counter(4) -- expression 13 operands: lhs = Counter(6), rhs = Counter(7) -- expression 14 operands: lhs = Counter(8), rhs = Zero -- expression 15 operands: lhs = Counter(9), rhs = Counter(10) -- expression 16 operands: lhs = Counter(11), rhs = Zero -Number of file 0 mappings: 16 -- Code(Counter(0)) at (prev + 7, 1) to (start + 1, 22) -- Code(Expression(0, Add)) at (prev + 6, 11) to (start + 0, 46) - = (c0 + Zero) -- Code(Counter(3)) at (prev + 1, 39) to (start + 0, 41) -- Code(Expression(1, Add)) at (prev + 1, 14) to (start + 0, 52) - = (c1 + c2) -- Code(Expression(2, Add)) at (prev + 2, 11) to (start + 0, 46) - = (c3 + Zero) -- Code(Expression(12, Sub)) at (prev + 1, 34) to (start + 0, 39) - = (c3 - c4) -- Code(Expression(11, Sub)) at (prev + 0, 44) to (start + 0, 46) - = ((c3 - c4) - c5) -- Code(Expression(6, Add)) at (prev + 1, 14) to (start + 0, 52) - = (c4 + c5) -- Code(Expression(7, Add)) at (prev + 3, 9) to (start + 0, 22) - = (((c3 - c4) - c5) + Zero) -- Code(Expression(10, Add)) at (prev + 7, 11) to (start + 0, 46) - = (((c3 - c4) - c5) + Zero) -- Code(Counter(8)) at (prev + 1, 39) to (start + 0, 41) -- Code(Expression(13, Add)) at (prev + 1, 14) to (start + 0, 52) - = (c6 + c7) -- Code(Expression(14, Add)) at (prev + 2, 11) to (start + 0, 46) - = (c8 + Zero) -- Code(Counter(11)) at (prev + 1, 39) to (start + 0, 41) -- Code(Expression(15, Add)) at (prev + 1, 14) to (start + 0, 52) - = (c9 + c10) -- Code(Expression(16, Add)) at (prev + 2, 1) to (start + 0, 2) - = (c11 + Zero) - -Function name: yield::main::{closure#0} -Raw bytes (14): 0x[01, 01, 00, 02, 01, 08, 1c, 01, 10, 05, 02, 10, 01, 06] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 0 -Number of file 0 mappings: 2 -- Code(Counter(0)) at (prev + 8, 28) to (start + 1, 16) -- Code(Counter(1)) at (prev + 2, 16) to (start + 1, 6) - -Function name: yield::main::{closure#1} -Raw bytes (24): 0x[01, 01, 00, 04, 01, 16, 1c, 01, 10, 05, 02, 09, 00, 10, 09, 01, 09, 00, 10, 0d, 01, 10, 01, 06] -Number of files: 1 -- file 0 => global file 1 -Number of expressions: 0 -Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 22, 28) to (start + 1, 16) -- Code(Counter(1)) at (prev + 2, 9) to (start + 0, 16) -- Code(Counter(2)) at (prev + 1, 9) to (start + 0, 16) -- Code(Counter(3)) at (prev + 1, 16) to (start + 1, 6) - diff --git a/tests/coverage-map/status-quo/yield.rs b/tests/coverage-map/status-quo/yield.rs deleted file mode 100644 index 361275c92..000000000 --- a/tests/coverage-map/status-quo/yield.rs +++ /dev/null @@ -1,37 +0,0 @@ -#![feature(generators, generator_trait)] -#![allow(unused_assignments)] - -use std::ops::{Generator, GeneratorState}; -use std::pin::Pin; - -fn main() { - let mut generator = || { - yield 1; - return "foo"; - }; - - match Pin::new(&mut generator).resume(()) { - GeneratorState::Yielded(1) => {} - _ => panic!("unexpected value from resume"), - } - match Pin::new(&mut generator).resume(()) { - GeneratorState::Complete("foo") => {} - _ => panic!("unexpected value from resume"), - } - - let mut generator = || { - yield 1; - yield 2; - yield 3; - return "foo"; - }; - - match Pin::new(&mut generator).resume(()) { - GeneratorState::Yielded(1) => {} - _ => panic!("unexpected value from resume"), - } - match Pin::new(&mut generator).resume(()) { - GeneratorState::Yielded(2) => {} - _ => panic!("unexpected value from resume"), - } -} diff --git a/tests/run-coverage-rustdoc/auxiliary/doctest_crate.rs b/tests/coverage-run-rustdoc/auxiliary/doctest_crate.rs index c3210146d..c3210146d 100644 --- a/tests/run-coverage-rustdoc/auxiliary/doctest_crate.rs +++ b/tests/coverage-run-rustdoc/auxiliary/doctest_crate.rs diff --git a/tests/run-coverage-rustdoc/doctest.coverage b/tests/coverage-run-rustdoc/doctest.coverage index 5797784f4..5797784f4 100644 --- a/tests/run-coverage-rustdoc/doctest.coverage +++ b/tests/coverage-run-rustdoc/doctest.coverage diff --git a/tests/run-coverage-rustdoc/doctest.rs b/tests/coverage-run-rustdoc/doctest.rs index 4006d723c..4006d723c 100644 --- a/tests/run-coverage-rustdoc/doctest.rs +++ b/tests/coverage-run-rustdoc/doctest.rs diff --git a/tests/coverage/README.md b/tests/coverage/README.md new file mode 100644 index 000000000..c72aa69c0 --- /dev/null +++ b/tests/coverage/README.md @@ -0,0 +1,16 @@ +The tests in this directory are shared by two different test modes, and can be +run in multiple different ways: + +- `./x.py test coverage-map` (compiles to LLVM IR and checks coverage mappings) +- `./x.py test coverage-run` (runs a test binary and checks its coverage report) +- `./x.py test coverage` (runs both `coverage-map` and `coverage-run`) + +## Maintenance note + +These tests can be sensitive to small changes in MIR spans or MIR control flow, +especially in HIR-to-MIR lowering or MIR optimizations. + +If you haven't touched the coverage code directly, and the tests still pass in +`coverage-run` mode, then it should usually be OK to just re-bless the mappings +as necessary with `./x.py test coverage-map --bless`, without worrying too much +about the exact changes. diff --git a/tests/coverage-map/status-quo/abort.cov-map b/tests/coverage/abort.cov-map index 45d3795ef..45d3795ef 100644 --- a/tests/coverage-map/status-quo/abort.cov-map +++ b/tests/coverage/abort.cov-map diff --git a/tests/run-coverage/abort.coverage b/tests/coverage/abort.coverage index ceef63867..ceef63867 100644 --- a/tests/run-coverage/abort.coverage +++ b/tests/coverage/abort.coverage diff --git a/tests/coverage-map/status-quo/abort.rs b/tests/coverage/abort.rs index 98264bdc1..98264bdc1 100644 --- a/tests/coverage-map/status-quo/abort.rs +++ b/tests/coverage/abort.rs diff --git a/tests/coverage-map/status-quo/assert.cov-map b/tests/coverage/assert.cov-map index dd413123d..dd413123d 100644 --- a/tests/coverage-map/status-quo/assert.cov-map +++ b/tests/coverage/assert.cov-map diff --git a/tests/run-coverage/assert.coverage b/tests/coverage/assert.coverage index 8b997724c..8b997724c 100644 --- a/tests/run-coverage/assert.coverage +++ b/tests/coverage/assert.coverage diff --git a/tests/coverage-map/status-quo/assert.rs b/tests/coverage/assert.rs index 85e6662a6..85e6662a6 100644 --- a/tests/coverage-map/status-quo/assert.rs +++ b/tests/coverage/assert.rs diff --git a/tests/coverage-map/status-quo/async.cov-map b/tests/coverage/async.cov-map index 5f28252ef..598791537 100644 --- a/tests/coverage-map/status-quo/async.cov-map +++ b/tests/coverage/async.cov-map @@ -38,42 +38,40 @@ Number of file 0 mappings: 1 - Code(Counter(0)) at (prev + 13, 20) to (start + 0, 25) Function name: async::e (unused) -Raw bytes (9): 0x[01, 01, 00, 01, 01, 0f, 01, 00, 14] +Raw bytes (9): 0x[01, 01, 00, 01, 00, 0f, 01, 00, 14] Number of files: 1 - file 0 => global file 1 Number of expressions: 0 Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 15, 1) to (start + 0, 20) +- Code(Zero) at (prev + 15, 1) to (start + 0, 20) Function name: async::e::{closure#0} (unused) -Raw bytes (9): 0x[01, 01, 00, 01, 01, 0f, 14, 00, 19] +Raw bytes (9): 0x[01, 01, 00, 01, 00, 0f, 14, 00, 19] Number of files: 1 - file 0 => global file 1 Number of expressions: 0 Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 15, 20) to (start + 0, 25) +- Code(Zero) at (prev + 15, 20) to (start + 0, 25) Function name: async::executor::block_on::<core::pin::Pin<&mut async::i::{closure#0}>> -Raw bytes (44): 0x[01, 01, 05, 0b, 05, 01, 05, 01, 05, 02, 00, 02, 00, 06, 01, 6e, 05, 0a, 36, 02, 0d, 20, 00, 23, 0b, 00, 27, 00, 49, 0f, 01, 17, 00, 1a, 05, 01, 0e, 00, 0f, 13, 02, 05, 00, 06] +Raw bytes (40): 0x[01, 01, 03, 0b, 05, 01, 05, 01, 05, 06, 01, 6e, 05, 0a, 36, 02, 0d, 20, 00, 23, 0b, 00, 27, 00, 49, 02, 01, 17, 00, 1a, 05, 01, 0e, 00, 0f, 02, 02, 05, 00, 06] Number of files: 1 - file 0 => global file 1 -Number of expressions: 5 +Number of expressions: 3 - expression 0 operands: lhs = Expression(2, Add), rhs = Counter(1) - expression 1 operands: lhs = Counter(0), rhs = Counter(1) - expression 2 operands: lhs = Counter(0), rhs = Counter(1) -- expression 3 operands: lhs = Expression(0, Sub), rhs = Zero -- expression 4 operands: lhs = Expression(0, Sub), rhs = Zero Number of file 0 mappings: 6 - Code(Counter(0)) at (prev + 110, 5) to (start + 10, 54) - Code(Expression(0, Sub)) at (prev + 13, 32) to (start + 0, 35) = ((c0 + c1) - c1) - Code(Expression(2, Add)) at (prev + 0, 39) to (start + 0, 73) = (c0 + c1) -- Code(Expression(3, Add)) at (prev + 1, 23) to (start + 0, 26) - = (((c0 + c1) - c1) + Zero) +- Code(Expression(0, Sub)) at (prev + 1, 23) to (start + 0, 26) + = ((c0 + c1) - c1) - Code(Counter(1)) at (prev + 1, 14) to (start + 0, 15) -- Code(Expression(4, Add)) at (prev + 2, 5) to (start + 0, 6) - = (((c0 + c1) - c1) + Zero) +- Code(Expression(0, Sub)) at (prev + 2, 5) to (start + 0, 6) + = ((c0 + c1) - c1) Function name: async::executor::block_on::VTABLE::{closure#0} Raw bytes (9): 0x[01, 01, 00, 01, 01, 72, 11, 00, 33] @@ -124,20 +122,20 @@ Number of file 0 mappings: 1 - Code(Counter(0)) at (prev + 17, 20) to (start + 0, 25) Function name: async::foo (unused) -Raw bytes (9): 0x[01, 01, 00, 01, 01, 13, 01, 00, 1e] +Raw bytes (9): 0x[01, 01, 00, 01, 00, 13, 01, 00, 1e] Number of files: 1 - file 0 => global file 1 Number of expressions: 0 Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 19, 1) to (start + 0, 30) +- Code(Zero) at (prev + 19, 1) to (start + 0, 30) Function name: async::foo::{closure#0} (unused) -Raw bytes (9): 0x[01, 01, 00, 01, 01, 13, 1e, 00, 2d] +Raw bytes (9): 0x[01, 01, 00, 01, 00, 13, 1e, 00, 2d] Number of files: 1 - file 0 => global file 1 Number of expressions: 0 Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 19, 30) to (start + 0, 45) +- Code(Zero) at (prev + 19, 30) to (start + 0, 45) Function name: async::g Raw bytes (9): 0x[01, 01, 00, 01, 01, 15, 01, 00, 17] @@ -148,14 +146,14 @@ Number of file 0 mappings: 1 - Code(Counter(0)) at (prev + 21, 1) to (start + 0, 23) Function name: async::g::{closure#0} (unused) -Raw bytes (69): 0x[01, 01, 00, 0d, 00, 15, 17, 01, 0c, 00, 02, 09, 00, 0a, 01, 00, 0e, 00, 11, 00, 00, 12, 00, 17, 00, 00, 1b, 00, 1c, 00, 00, 20, 00, 22, 00, 01, 09, 00, 0a, 00, 00, 0e, 00, 11, 00, 00, 12, 00, 17, 00, 00, 1b, 00, 1c, 00, 00, 20, 00, 22, 00, 01, 0e, 00, 10, 00, 02, 01, 00, 02] +Raw bytes (69): 0x[01, 01, 00, 0d, 00, 15, 17, 01, 0c, 00, 02, 09, 00, 0a, 00, 00, 0e, 00, 11, 00, 00, 12, 00, 17, 00, 00, 1b, 00, 1c, 00, 00, 20, 00, 22, 00, 01, 09, 00, 0a, 00, 00, 0e, 00, 11, 00, 00, 12, 00, 17, 00, 00, 1b, 00, 1c, 00, 00, 20, 00, 22, 00, 01, 0e, 00, 10, 00, 02, 01, 00, 02] Number of files: 1 - file 0 => global file 1 Number of expressions: 0 Number of file 0 mappings: 13 - Code(Zero) at (prev + 21, 23) to (start + 1, 12) - Code(Zero) at (prev + 2, 9) to (start + 0, 10) -- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 17) +- Code(Zero) at (prev + 0, 14) to (start + 0, 17) - Code(Zero) at (prev + 0, 18) to (start + 0, 23) - Code(Zero) at (prev + 0, 27) to (start + 0, 28) - Code(Zero) at (prev + 0, 32) to (start + 0, 34) @@ -176,14 +174,14 @@ Number of file 0 mappings: 1 - Code(Counter(0)) at (prev + 29, 1) to (start + 0, 22) Function name: async::h::{closure#0} (unused) -Raw bytes (44): 0x[01, 01, 00, 08, 00, 1d, 16, 03, 0c, 00, 04, 09, 00, 0a, 01, 00, 0e, 00, 13, 00, 00, 14, 00, 19, 00, 00, 1a, 00, 1b, 00, 00, 20, 00, 22, 00, 01, 0e, 00, 10, 00, 02, 01, 00, 02] +Raw bytes (44): 0x[01, 01, 00, 08, 00, 1d, 16, 03, 0c, 00, 04, 09, 00, 0a, 00, 00, 0e, 00, 13, 00, 00, 14, 00, 19, 00, 00, 1a, 00, 1b, 00, 00, 20, 00, 22, 00, 01, 0e, 00, 10, 00, 02, 01, 00, 02] Number of files: 1 - file 0 => global file 1 Number of expressions: 0 Number of file 0 mappings: 8 - Code(Zero) at (prev + 29, 22) to (start + 3, 12) - Code(Zero) at (prev + 4, 9) to (start + 0, 10) -- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 19) +- Code(Zero) at (prev + 0, 14) to (start + 0, 19) - Code(Zero) at (prev + 0, 20) to (start + 0, 25) - Code(Zero) at (prev + 0, 26) to (start + 0, 27) - Code(Zero) at (prev + 0, 32) to (start + 0, 34) @@ -199,58 +197,46 @@ Number of file 0 mappings: 1 - Code(Counter(0)) at (prev + 38, 1) to (start + 0, 19) Function name: async::i::{closure#0} -Raw bytes (84): 0x[01, 01, 05, 01, 00, 0d, 00, 1d, 00, 19, 13, 1d, 21, 0e, 01, 26, 13, 04, 0c, 0d, 05, 09, 00, 0a, 03, 00, 0e, 00, 12, 05, 00, 13, 00, 18, 09, 00, 1c, 00, 21, 07, 00, 27, 00, 2a, 15, 00, 2b, 00, 30, 1d, 01, 09, 00, 0a, 11, 00, 0e, 00, 11, 25, 00, 12, 00, 17, 29, 00, 1b, 00, 20, 0b, 00, 24, 00, 26, 21, 01, 0e, 00, 10, 0f, 02, 01, 00, 02] +Raw bytes (78): 0x[01, 01, 02, 19, 07, 1d, 21, 0e, 01, 26, 13, 04, 0c, 0d, 05, 09, 00, 0a, 01, 00, 0e, 00, 12, 05, 00, 13, 00, 18, 09, 00, 1c, 00, 21, 0d, 00, 27, 00, 2a, 15, 00, 2b, 00, 30, 1d, 01, 09, 00, 0a, 11, 00, 0e, 00, 11, 25, 00, 12, 00, 17, 29, 00, 1b, 00, 20, 1d, 00, 24, 00, 26, 21, 01, 0e, 00, 10, 03, 02, 01, 00, 02] Number of files: 1 - file 0 => global file 1 -Number of expressions: 5 -- expression 0 operands: lhs = Counter(0), rhs = Zero -- expression 1 operands: lhs = Counter(3), rhs = Zero -- expression 2 operands: lhs = Counter(7), rhs = Zero -- expression 3 operands: lhs = Counter(6), rhs = Expression(4, Add) -- expression 4 operands: lhs = Counter(7), rhs = Counter(8) +Number of expressions: 2 +- expression 0 operands: lhs = Counter(6), rhs = Expression(1, Add) +- expression 1 operands: lhs = Counter(7), rhs = Counter(8) Number of file 0 mappings: 14 - Code(Counter(0)) at (prev + 38, 19) to (start + 4, 12) - Code(Counter(3)) at (prev + 5, 9) to (start + 0, 10) -- Code(Expression(0, Add)) at (prev + 0, 14) to (start + 0, 18) - = (c0 + Zero) +- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 18) - Code(Counter(1)) at (prev + 0, 19) to (start + 0, 24) - Code(Counter(2)) at (prev + 0, 28) to (start + 0, 33) -- Code(Expression(1, Add)) at (prev + 0, 39) to (start + 0, 42) - = (c3 + Zero) +- Code(Counter(3)) at (prev + 0, 39) to (start + 0, 42) - Code(Counter(5)) at (prev + 0, 43) to (start + 0, 48) - Code(Counter(7)) at (prev + 1, 9) to (start + 0, 10) - Code(Counter(4)) at (prev + 0, 14) to (start + 0, 17) - Code(Counter(9)) at (prev + 0, 18) to (start + 0, 23) - Code(Counter(10)) at (prev + 0, 27) to (start + 0, 32) -- Code(Expression(2, Add)) at (prev + 0, 36) to (start + 0, 38) - = (c7 + Zero) +- Code(Counter(7)) at (prev + 0, 36) to (start + 0, 38) - Code(Counter(8)) at (prev + 1, 14) to (start + 0, 16) -- Code(Expression(3, Add)) at (prev + 2, 1) to (start + 0, 2) +- Code(Expression(0, Add)) at (prev + 2, 1) to (start + 0, 2) = (c6 + (c7 + c8)) Function name: async::j -Raw bytes (59): 0x[01, 01, 05, 01, 00, 05, 00, 09, 00, 05, 13, 09, 0d, 09, 01, 31, 01, 13, 0c, 05, 14, 09, 00, 0a, 03, 00, 0e, 00, 1b, 07, 00, 1f, 00, 27, 09, 01, 09, 00, 0a, 11, 00, 0e, 00, 1a, 0b, 00, 1e, 00, 20, 0d, 01, 0e, 00, 10, 0f, 02, 01, 00, 02] +Raw bytes (53): 0x[01, 01, 02, 05, 07, 09, 0d, 09, 01, 31, 01, 13, 0c, 05, 14, 09, 00, 0a, 01, 00, 0e, 00, 1b, 05, 00, 1f, 00, 27, 09, 01, 09, 00, 0a, 11, 00, 0e, 00, 1a, 09, 00, 1e, 00, 20, 0d, 01, 0e, 00, 10, 03, 02, 01, 00, 02] Number of files: 1 - file 0 => global file 1 -Number of expressions: 5 -- expression 0 operands: lhs = Counter(0), rhs = Zero -- expression 1 operands: lhs = Counter(1), rhs = Zero -- expression 2 operands: lhs = Counter(2), rhs = Zero -- expression 3 operands: lhs = Counter(1), rhs = Expression(4, Add) -- expression 4 operands: lhs = Counter(2), rhs = Counter(3) +Number of expressions: 2 +- expression 0 operands: lhs = Counter(1), rhs = Expression(1, Add) +- expression 1 operands: lhs = Counter(2), rhs = Counter(3) Number of file 0 mappings: 9 - Code(Counter(0)) at (prev + 49, 1) to (start + 19, 12) - Code(Counter(1)) at (prev + 20, 9) to (start + 0, 10) -- Code(Expression(0, Add)) at (prev + 0, 14) to (start + 0, 27) - = (c0 + Zero) -- Code(Expression(1, Add)) at (prev + 0, 31) to (start + 0, 39) - = (c1 + Zero) +- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 27) +- Code(Counter(1)) at (prev + 0, 31) to (start + 0, 39) - Code(Counter(2)) at (prev + 1, 9) to (start + 0, 10) - Code(Counter(4)) at (prev + 0, 14) to (start + 0, 26) -- Code(Expression(2, Add)) at (prev + 0, 30) to (start + 0, 32) - = (c2 + Zero) +- Code(Counter(2)) at (prev + 0, 30) to (start + 0, 32) - Code(Counter(3)) at (prev + 1, 14) to (start + 0, 16) -- Code(Expression(3, Add)) at (prev + 2, 1) to (start + 0, 2) +- Code(Expression(0, Add)) at (prev + 2, 1) to (start + 0, 2) = (c1 + (c2 + c3)) Function name: async::j::c @@ -285,12 +271,12 @@ Number of file 0 mappings: 1 - Code(Counter(0)) at (prev + 67, 5) to (start + 0, 23) Function name: async::k (unused) -Raw bytes (29): 0x[01, 01, 00, 05, 01, 4b, 01, 01, 0c, 00, 02, 0e, 00, 10, 00, 01, 0e, 00, 10, 00, 01, 0e, 00, 10, 00, 02, 01, 00, 02] +Raw bytes (29): 0x[01, 01, 00, 05, 00, 4b, 01, 01, 0c, 00, 02, 0e, 00, 10, 00, 01, 0e, 00, 10, 00, 01, 0e, 00, 10, 00, 02, 01, 00, 02] Number of files: 1 - file 0 => global file 1 Number of expressions: 0 Number of file 0 mappings: 5 -- Code(Counter(0)) at (prev + 75, 1) to (start + 1, 12) +- Code(Zero) at (prev + 75, 1) to (start + 1, 12) - Code(Zero) at (prev + 2, 14) to (start + 0, 16) - Code(Zero) at (prev + 1, 14) to (start + 0, 16) - Code(Zero) at (prev + 1, 14) to (start + 0, 16) @@ -323,12 +309,12 @@ Number of file 0 mappings: 1 - Code(Counter(0)) at (prev + 91, 1) to (start + 0, 25) Function name: async::m::{closure#0} (unused) -Raw bytes (9): 0x[01, 01, 00, 01, 01, 5b, 19, 00, 22] +Raw bytes (9): 0x[01, 01, 00, 01, 00, 5b, 19, 00, 22] Number of files: 1 - file 0 => global file 1 Number of expressions: 0 Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 91, 25) to (start + 0, 34) +- Code(Zero) at (prev + 91, 25) to (start + 0, 34) Function name: async::main Raw bytes (9): 0x[01, 01, 00, 01, 01, 5d, 01, 08, 02] diff --git a/tests/run-coverage/async.coverage b/tests/coverage/async.coverage index 07bc16c2d..07bc16c2d 100644 --- a/tests/run-coverage/async.coverage +++ b/tests/coverage/async.coverage diff --git a/tests/coverage-map/status-quo/async.rs b/tests/coverage/async.rs index efd9e62d6..efd9e62d6 100644 --- a/tests/coverage-map/status-quo/async.rs +++ b/tests/coverage/async.rs diff --git a/tests/coverage-map/status-quo/async2.cov-map b/tests/coverage/async2.cov-map index fe74dcd88..cc7aed9ae 100644 --- a/tests/coverage-map/status-quo/async2.cov-map +++ b/tests/coverage/async2.cov-map @@ -38,48 +38,44 @@ Number of file 0 mappings: 1 - Code(Counter(0)) at (prev + 19, 36) to (start + 2, 2) Function name: async2::executor::block_on::<async2::async_func::{closure#0}> -Raw bytes (44): 0x[01, 01, 05, 0b, 05, 01, 05, 01, 05, 02, 00, 02, 00, 06, 01, 27, 05, 0a, 36, 02, 0d, 20, 00, 23, 0b, 00, 27, 00, 49, 0f, 01, 17, 00, 1a, 05, 01, 0e, 00, 0f, 13, 02, 05, 00, 06] +Raw bytes (40): 0x[01, 01, 03, 0b, 05, 01, 05, 01, 05, 06, 01, 27, 05, 0a, 36, 02, 0d, 20, 00, 23, 0b, 00, 27, 00, 49, 02, 01, 17, 00, 1a, 05, 01, 0e, 00, 0f, 02, 02, 05, 00, 06] Number of files: 1 - file 0 => global file 1 -Number of expressions: 5 +Number of expressions: 3 - expression 0 operands: lhs = Expression(2, Add), rhs = Counter(1) - expression 1 operands: lhs = Counter(0), rhs = Counter(1) - expression 2 operands: lhs = Counter(0), rhs = Counter(1) -- expression 3 operands: lhs = Expression(0, Sub), rhs = Zero -- expression 4 operands: lhs = Expression(0, Sub), rhs = Zero Number of file 0 mappings: 6 - Code(Counter(0)) at (prev + 39, 5) to (start + 10, 54) - Code(Expression(0, Sub)) at (prev + 13, 32) to (start + 0, 35) = ((c0 + c1) - c1) - Code(Expression(2, Add)) at (prev + 0, 39) to (start + 0, 73) = (c0 + c1) -- Code(Expression(3, Add)) at (prev + 1, 23) to (start + 0, 26) - = (((c0 + c1) - c1) + Zero) +- Code(Expression(0, Sub)) at (prev + 1, 23) to (start + 0, 26) + = ((c0 + c1) - c1) - Code(Counter(1)) at (prev + 1, 14) to (start + 0, 15) -- Code(Expression(4, Add)) at (prev + 2, 5) to (start + 0, 6) - = (((c0 + c1) - c1) + Zero) +- Code(Expression(0, Sub)) at (prev + 2, 5) to (start + 0, 6) + = ((c0 + c1) - c1) Function name: async2::executor::block_on::<async2::async_func_just_println::{closure#0}> -Raw bytes (44): 0x[01, 01, 05, 0b, 05, 01, 05, 01, 05, 02, 00, 02, 00, 06, 01, 27, 05, 0a, 36, 02, 0d, 20, 00, 23, 0b, 00, 27, 00, 49, 0f, 01, 17, 00, 1a, 05, 01, 0e, 00, 0f, 13, 02, 05, 00, 06] +Raw bytes (40): 0x[01, 01, 03, 0b, 05, 01, 05, 01, 05, 06, 01, 27, 05, 0a, 36, 02, 0d, 20, 00, 23, 0b, 00, 27, 00, 49, 02, 01, 17, 00, 1a, 05, 01, 0e, 00, 0f, 02, 02, 05, 00, 06] Number of files: 1 - file 0 => global file 1 -Number of expressions: 5 +Number of expressions: 3 - expression 0 operands: lhs = Expression(2, Add), rhs = Counter(1) - expression 1 operands: lhs = Counter(0), rhs = Counter(1) - expression 2 operands: lhs = Counter(0), rhs = Counter(1) -- expression 3 operands: lhs = Expression(0, Sub), rhs = Zero -- expression 4 operands: lhs = Expression(0, Sub), rhs = Zero Number of file 0 mappings: 6 - Code(Counter(0)) at (prev + 39, 5) to (start + 10, 54) - Code(Expression(0, Sub)) at (prev + 13, 32) to (start + 0, 35) = ((c0 + c1) - c1) - Code(Expression(2, Add)) at (prev + 0, 39) to (start + 0, 73) = (c0 + c1) -- Code(Expression(3, Add)) at (prev + 1, 23) to (start + 0, 26) - = (((c0 + c1) - c1) + Zero) +- Code(Expression(0, Sub)) at (prev + 1, 23) to (start + 0, 26) + = ((c0 + c1) - c1) - Code(Counter(1)) at (prev + 1, 14) to (start + 0, 15) -- Code(Expression(4, Add)) at (prev + 2, 5) to (start + 0, 6) - = (((c0 + c1) - c1) + Zero) +- Code(Expression(0, Sub)) at (prev + 2, 5) to (start + 0, 6) + = ((c0 + c1) - c1) Function name: async2::executor::block_on::VTABLE::{closure#0} Raw bytes (9): 0x[01, 01, 00, 01, 01, 2b, 11, 00, 33] diff --git a/tests/run-coverage/async2.coverage b/tests/coverage/async2.coverage index fcb0a3aed..fcb0a3aed 100644 --- a/tests/run-coverage/async2.coverage +++ b/tests/coverage/async2.coverage diff --git a/tests/coverage-map/status-quo/async2.rs b/tests/coverage/async2.rs index 2884ff297..2884ff297 100644 --- a/tests/coverage-map/status-quo/async2.rs +++ b/tests/coverage/async2.rs diff --git a/tests/run-coverage/auxiliary/inline_always_with_dead_code.rs b/tests/coverage/auxiliary/inline_always_with_dead_code.rs index 9dc50dae2..9dc50dae2 100644 --- a/tests/run-coverage/auxiliary/inline_always_with_dead_code.rs +++ b/tests/coverage/auxiliary/inline_always_with_dead_code.rs diff --git a/tests/run-coverage/auxiliary/macro_name_span_helper.rs b/tests/coverage/auxiliary/macro_name_span_helper.rs index 6797c081d..6797c081d 100644 --- a/tests/run-coverage/auxiliary/macro_name_span_helper.rs +++ b/tests/coverage/auxiliary/macro_name_span_helper.rs diff --git a/tests/run-coverage/auxiliary/unused_mod_helper.rs b/tests/coverage/auxiliary/unused_mod_helper.rs index 88c5dac65..88c5dac65 100644 --- a/tests/run-coverage/auxiliary/unused_mod_helper.rs +++ b/tests/coverage/auxiliary/unused_mod_helper.rs diff --git a/tests/run-coverage/auxiliary/used_crate.rs b/tests/coverage/auxiliary/used_crate.rs index c086ef21e..c086ef21e 100644 --- a/tests/run-coverage/auxiliary/used_crate.rs +++ b/tests/coverage/auxiliary/used_crate.rs diff --git a/tests/run-coverage/auxiliary/used_inline_crate.rs b/tests/coverage/auxiliary/used_inline_crate.rs index e8929de6b..e8929de6b 100644 --- a/tests/run-coverage/auxiliary/used_inline_crate.rs +++ b/tests/coverage/auxiliary/used_inline_crate.rs diff --git a/tests/coverage/bad_counter_ids.cov-map b/tests/coverage/bad_counter_ids.cov-map new file mode 100644 index 000000000..0b8081acf --- /dev/null +++ b/tests/coverage/bad_counter_ids.cov-map @@ -0,0 +1,98 @@ +Function name: <bad_counter_ids::Foo as core::cmp::PartialEq>::eq +Raw bytes (9): 0x[01, 01, 00, 01, 01, 0c, 11, 00, 1a] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 12, 17) to (start + 0, 26) + +Function name: <bad_counter_ids::Foo as core::fmt::Debug>::fmt +Raw bytes (9): 0x[01, 01, 00, 01, 01, 0c, 0a, 00, 0f] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 12, 10) to (start + 0, 15) + +Function name: bad_counter_ids::eq_bad +Raw bytes (14): 0x[01, 01, 00, 02, 01, 23, 01, 02, 1f, 00, 03, 01, 00, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 2 +- Code(Counter(0)) at (prev + 35, 1) to (start + 2, 31) +- Code(Zero) at (prev + 3, 1) to (start + 0, 2) + +Function name: bad_counter_ids::eq_bad_message +Raw bytes (21): 0x[01, 01, 01, 01, 00, 03, 01, 28, 01, 02, 0f, 02, 02, 20, 00, 2b, 00, 01, 01, 00, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 1 +- expression 0 operands: lhs = Counter(0), rhs = Zero +Number of file 0 mappings: 3 +- Code(Counter(0)) at (prev + 40, 1) to (start + 2, 15) +- Code(Expression(0, Sub)) at (prev + 2, 32) to (start + 0, 43) + = (c0 - Zero) +- Code(Zero) at (prev + 1, 1) to (start + 0, 2) + +Function name: bad_counter_ids::eq_good +Raw bytes (14): 0x[01, 01, 00, 02, 01, 0f, 01, 02, 1f, 05, 03, 01, 00, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 2 +- Code(Counter(0)) at (prev + 15, 1) to (start + 2, 31) +- Code(Counter(1)) at (prev + 3, 1) to (start + 0, 2) + +Function name: bad_counter_ids::eq_good_message +Raw bytes (19): 0x[01, 01, 00, 03, 01, 14, 01, 02, 0f, 00, 02, 20, 00, 2b, 05, 01, 01, 00, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 3 +- Code(Counter(0)) at (prev + 20, 1) to (start + 2, 15) +- Code(Zero) at (prev + 2, 32) to (start + 0, 43) +- Code(Counter(1)) at (prev + 1, 1) to (start + 0, 2) + +Function name: bad_counter_ids::ne_bad +Raw bytes (14): 0x[01, 01, 00, 02, 01, 2d, 01, 02, 1f, 00, 03, 01, 00, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 2 +- Code(Counter(0)) at (prev + 45, 1) to (start + 2, 31) +- Code(Zero) at (prev + 3, 1) to (start + 0, 2) + +Function name: bad_counter_ids::ne_bad_message +Raw bytes (19): 0x[01, 01, 00, 03, 01, 32, 01, 02, 0f, 05, 02, 20, 00, 2b, 00, 01, 01, 00, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 3 +- Code(Counter(0)) at (prev + 50, 1) to (start + 2, 15) +- Code(Counter(1)) at (prev + 2, 32) to (start + 0, 43) +- Code(Zero) at (prev + 1, 1) to (start + 0, 2) + +Function name: bad_counter_ids::ne_good +Raw bytes (16): 0x[01, 01, 01, 01, 00, 02, 01, 19, 01, 02, 1f, 02, 03, 01, 00, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 1 +- expression 0 operands: lhs = Counter(0), rhs = Zero +Number of file 0 mappings: 2 +- Code(Counter(0)) at (prev + 25, 1) to (start + 2, 31) +- Code(Expression(0, Sub)) at (prev + 3, 1) to (start + 0, 2) + = (c0 - Zero) + +Function name: bad_counter_ids::ne_good_message +Raw bytes (21): 0x[01, 01, 01, 01, 00, 03, 01, 1e, 01, 02, 0f, 00, 02, 20, 00, 2b, 02, 01, 01, 00, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 1 +- expression 0 operands: lhs = Counter(0), rhs = Zero +Number of file 0 mappings: 3 +- Code(Counter(0)) at (prev + 30, 1) to (start + 2, 15) +- Code(Zero) at (prev + 2, 32) to (start + 0, 43) +- Code(Expression(0, Sub)) at (prev + 1, 1) to (start + 0, 2) + = (c0 - Zero) + diff --git a/tests/coverage/bad_counter_ids.coverage b/tests/coverage/bad_counter_ids.coverage new file mode 100644 index 000000000..d69ebf160 --- /dev/null +++ b/tests/coverage/bad_counter_ids.coverage @@ -0,0 +1,69 @@ + LL| |#![feature(coverage_attribute)] + LL| |// compile-flags: --edition=2021 -Copt-level=0 -Zmir-opt-level=3 + LL| | + LL| |// Regression test for <https://github.com/rust-lang/rust/issues/117012>. + LL| |// + LL| |// If some coverage counters were removed by MIR optimizations, we need to take + LL| |// care not to refer to those counter IDs in coverage mappings, and instead + LL| |// replace them with a constant zero value. If we don't, `llvm-cov` might see + LL| |// a too-large counter ID and silently discard the entire function from its + LL| |// coverage reports. + LL| | + LL| 8|#[derive(Debug, PartialEq, Eq)] + LL| |struct Foo(u32); + LL| | + LL| 1|fn eq_good() { + LL| 1| println!("a"); + LL| 1| assert_eq!(Foo(1), Foo(1)); + LL| 1|} + LL| | + LL| 1|fn eq_good_message() { + LL| 1| println!("b"); + LL| 1| assert_eq!(Foo(1), Foo(1), "message b"); + ^0 + LL| 1|} + LL| | + LL| 1|fn ne_good() { + LL| 1| println!("c"); + LL| 1| assert_ne!(Foo(1), Foo(3)); + LL| 1|} + LL| | + LL| 1|fn ne_good_message() { + LL| 1| println!("d"); + LL| 1| assert_ne!(Foo(1), Foo(3), "message d"); + ^0 + LL| 1|} + LL| | + LL| 1|fn eq_bad() { + LL| 1| println!("e"); + LL| 1| assert_eq!(Foo(1), Foo(3)); + LL| 0|} + LL| | + LL| 1|fn eq_bad_message() { + LL| 1| println!("f"); + LL| 1| assert_eq!(Foo(1), Foo(3), "message f"); + LL| 0|} + LL| | + LL| 1|fn ne_bad() { + LL| 1| println!("g"); + LL| 1| assert_ne!(Foo(1), Foo(1)); + LL| 0|} + LL| | + LL| 1|fn ne_bad_message() { + LL| 1| println!("h"); + LL| 1| assert_ne!(Foo(1), Foo(1), "message h"); + LL| 0|} + LL| | + LL| |#[coverage(off)] + LL| |fn main() { + LL| | eq_good(); + LL| | eq_good_message(); + LL| | ne_good(); + LL| | ne_good_message(); + LL| | + LL| | assert!(std::panic::catch_unwind(eq_bad).is_err()); + LL| | assert!(std::panic::catch_unwind(eq_bad_message).is_err()); + LL| | assert!(std::panic::catch_unwind(ne_bad).is_err()); + LL| | assert!(std::panic::catch_unwind(ne_bad_message).is_err()); + LL| |} + diff --git a/tests/coverage/bad_counter_ids.rs b/tests/coverage/bad_counter_ids.rs new file mode 100644 index 000000000..ef5460102 --- /dev/null +++ b/tests/coverage/bad_counter_ids.rs @@ -0,0 +1,66 @@ +#![feature(coverage_attribute)] +// compile-flags: --edition=2021 -Copt-level=0 -Zmir-opt-level=3 + +// Regression test for <https://github.com/rust-lang/rust/issues/117012>. +// +// If some coverage counters were removed by MIR optimizations, we need to take +// care not to refer to those counter IDs in coverage mappings, and instead +// replace them with a constant zero value. If we don't, `llvm-cov` might see +// a too-large counter ID and silently discard the entire function from its +// coverage reports. + +#[derive(Debug, PartialEq, Eq)] +struct Foo(u32); + +fn eq_good() { + println!("a"); + assert_eq!(Foo(1), Foo(1)); +} + +fn eq_good_message() { + println!("b"); + assert_eq!(Foo(1), Foo(1), "message b"); +} + +fn ne_good() { + println!("c"); + assert_ne!(Foo(1), Foo(3)); +} + +fn ne_good_message() { + println!("d"); + assert_ne!(Foo(1), Foo(3), "message d"); +} + +fn eq_bad() { + println!("e"); + assert_eq!(Foo(1), Foo(3)); +} + +fn eq_bad_message() { + println!("f"); + assert_eq!(Foo(1), Foo(3), "message f"); +} + +fn ne_bad() { + println!("g"); + assert_ne!(Foo(1), Foo(1)); +} + +fn ne_bad_message() { + println!("h"); + assert_ne!(Foo(1), Foo(1), "message h"); +} + +#[coverage(off)] +fn main() { + eq_good(); + eq_good_message(); + ne_good(); + ne_good_message(); + + assert!(std::panic::catch_unwind(eq_bad).is_err()); + assert!(std::panic::catch_unwind(eq_bad_message).is_err()); + assert!(std::panic::catch_unwind(ne_bad).is_err()); + assert!(std::panic::catch_unwind(ne_bad_message).is_err()); +} diff --git a/tests/coverage/closure.cov-map b/tests/coverage/closure.cov-map new file mode 100644 index 000000000..522c1e73a --- /dev/null +++ b/tests/coverage/closure.cov-map @@ -0,0 +1,275 @@ +Function name: closure::main +Raw bytes (128): 0x[01, 01, 02, 01, 05, 05, 02, 18, 01, 08, 01, 0f, 0d, 01, 16, 0e, 06, 0a, 01, 10, 05, 13, 0d, 01, 1a, 0e, 06, 0a, 01, 10, 05, 0c, 16, 01, 16, 05, 0d, 18, 01, 19, 09, 01, 1e, 01, 04, 09, 00, 29, 01, 01, 09, 00, 2d, 01, 01, 09, 00, 24, 01, 05, 09, 00, 24, 01, 02, 09, 00, 21, 01, 04, 09, 00, 21, 01, 04, 09, 00, 28, 01, 09, 09, 00, 32, 01, 04, 09, 00, 33, 01, 07, 09, 00, 4b, 01, 08, 09, 00, 48, 01, 0a, 09, 00, 47, 01, 08, 09, 00, 44, 01, 0a, 08, 00, 10, 05, 00, 11, 04, 06, 02, 04, 06, 00, 07, 07, 01, 05, 03, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 2 +- expression 0 operands: lhs = Counter(0), rhs = Counter(1) +- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) +Number of file 0 mappings: 24 +- Code(Counter(0)) at (prev + 8, 1) to (start + 15, 13) +- Code(Counter(0)) at (prev + 22, 14) to (start + 6, 10) +- Code(Counter(0)) at (prev + 16, 5) to (start + 19, 13) +- Code(Counter(0)) at (prev + 26, 14) to (start + 6, 10) +- Code(Counter(0)) at (prev + 16, 5) to (start + 12, 22) +- Code(Counter(0)) at (prev + 22, 5) to (start + 13, 24) +- Code(Counter(0)) at (prev + 25, 9) to (start + 1, 30) +- Code(Counter(0)) at (prev + 4, 9) to (start + 0, 41) +- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 45) +- Code(Counter(0)) at (prev + 1, 9) to (start + 0, 36) +- Code(Counter(0)) at (prev + 5, 9) to (start + 0, 36) +- Code(Counter(0)) at (prev + 2, 9) to (start + 0, 33) +- Code(Counter(0)) at (prev + 4, 9) to (start + 0, 33) +- Code(Counter(0)) at (prev + 4, 9) to (start + 0, 40) +- Code(Counter(0)) at (prev + 9, 9) to (start + 0, 50) +- Code(Counter(0)) at (prev + 4, 9) to (start + 0, 51) +- Code(Counter(0)) at (prev + 7, 9) to (start + 0, 75) +- Code(Counter(0)) at (prev + 8, 9) to (start + 0, 72) +- Code(Counter(0)) at (prev + 10, 9) to (start + 0, 71) +- Code(Counter(0)) at (prev + 8, 9) to (start + 0, 68) +- Code(Counter(0)) at (prev + 10, 8) to (start + 0, 16) +- Code(Counter(1)) at (prev + 0, 17) to (start + 4, 6) +- Code(Expression(0, Sub)) at (prev + 4, 6) to (start + 0, 7) + = (c0 - c1) +- Code(Expression(1, Add)) at (prev + 1, 5) to (start + 3, 2) + = (c1 + (c0 - c1)) + +Function name: closure::main::{closure#0} +Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 27, 05, 02, 14, 05, 02, 15, 02, 0a, 02, 02, 0a, 00, 0b, 07, 01, 09, 01, 06] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 2 +- expression 0 operands: lhs = Counter(0), rhs = Counter(1) +- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) +Number of file 0 mappings: 4 +- Code(Counter(0)) at (prev + 39, 5) to (start + 2, 20) +- Code(Counter(1)) at (prev + 2, 21) to (start + 2, 10) +- Code(Expression(0, Sub)) at (prev + 2, 10) to (start + 0, 11) + = (c0 - c1) +- Code(Expression(1, Add)) at (prev + 1, 9) to (start + 1, 6) + = (c1 + (c0 - c1)) + +Function name: closure::main::{closure#10} (unused) +Raw bytes (10): 0x[01, 01, 00, 01, 00, 9a, 01, 07, 00, 21] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Zero) at (prev + 154, 7) to (start + 0, 33) + +Function name: closure::main::{closure#11} (unused) +Raw bytes (10): 0x[01, 01, 00, 01, 00, 9e, 01, 07, 00, 21] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Zero) at (prev + 158, 7) to (start + 0, 33) + +Function name: closure::main::{closure#12} (unused) +Raw bytes (10): 0x[01, 01, 00, 01, 00, a6, 01, 01, 00, 17] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Zero) at (prev + 166, 1) to (start + 0, 23) + +Function name: closure::main::{closure#13} (unused) +Raw bytes (10): 0x[01, 01, 00, 01, 00, ab, 01, 0d, 02, 0e] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Zero) at (prev + 171, 13) to (start + 2, 14) + +Function name: closure::main::{closure#14} +Raw bytes (36): 0x[01, 01, 03, 05, 0a, 01, 05, 01, 05, 05, 03, b2, 01, 0d, 00, 15, 01, 01, 11, 01, 1b, 05, 01, 1e, 00, 25, 0a, 00, 2f, 00, 33, 03, 01, 0d, 00, 0e] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 3 +- expression 0 operands: lhs = Counter(1), rhs = Expression(2, Sub) +- expression 1 operands: lhs = Counter(0), rhs = Counter(1) +- expression 2 operands: lhs = Counter(0), rhs = Counter(1) +Number of file 0 mappings: 5 +- Code(Expression(0, Add)) at (prev + 178, 13) to (start + 0, 21) + = (c1 + (c0 - c1)) +- Code(Counter(0)) at (prev + 1, 17) to (start + 1, 27) +- Code(Counter(1)) at (prev + 1, 30) to (start + 0, 37) +- Code(Expression(2, Sub)) at (prev + 0, 47) to (start + 0, 51) + = (c0 - c1) +- Code(Expression(0, Add)) at (prev + 1, 13) to (start + 0, 14) + = (c1 + (c0 - c1)) + +Function name: closure::main::{closure#15} +Raw bytes (41): 0x[01, 01, 03, 05, 0a, 01, 05, 01, 05, 06, 01, ba, 01, 09, 00, 0a, 03, 01, 0d, 00, 15, 01, 01, 11, 01, 1b, 05, 01, 1e, 00, 25, 0a, 00, 2f, 00, 33, 03, 02, 09, 00, 0a] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 3 +- expression 0 operands: lhs = Counter(1), rhs = Expression(2, Sub) +- expression 1 operands: lhs = Counter(0), rhs = Counter(1) +- expression 2 operands: lhs = Counter(0), rhs = Counter(1) +Number of file 0 mappings: 6 +- Code(Counter(0)) at (prev + 186, 9) to (start + 0, 10) +- Code(Expression(0, Add)) at (prev + 1, 13) to (start + 0, 21) + = (c1 + (c0 - c1)) +- Code(Counter(0)) at (prev + 1, 17) to (start + 1, 27) +- Code(Counter(1)) at (prev + 1, 30) to (start + 0, 37) +- Code(Expression(2, Sub)) at (prev + 0, 47) to (start + 0, 51) + = (c0 - c1) +- Code(Expression(0, Add)) at (prev + 2, 9) to (start + 0, 10) + = (c1 + (c0 - c1)) + +Function name: closure::main::{closure#16} +Raw bytes (36): 0x[01, 01, 03, 05, 0a, 01, 05, 01, 05, 05, 03, c4, 01, 0d, 00, 15, 01, 01, 11, 01, 1b, 05, 01, 1e, 00, 25, 0a, 00, 2f, 00, 33, 03, 01, 0d, 00, 0e] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 3 +- expression 0 operands: lhs = Counter(1), rhs = Expression(2, Sub) +- expression 1 operands: lhs = Counter(0), rhs = Counter(1) +- expression 2 operands: lhs = Counter(0), rhs = Counter(1) +Number of file 0 mappings: 5 +- Code(Expression(0, Add)) at (prev + 196, 13) to (start + 0, 21) + = (c1 + (c0 - c1)) +- Code(Counter(0)) at (prev + 1, 17) to (start + 1, 27) +- Code(Counter(1)) at (prev + 1, 30) to (start + 0, 37) +- Code(Expression(2, Sub)) at (prev + 0, 47) to (start + 0, 51) + = (c0 - c1) +- Code(Expression(0, Add)) at (prev + 1, 13) to (start + 0, 14) + = (c1 + (c0 - c1)) + +Function name: closure::main::{closure#17} +Raw bytes (41): 0x[01, 01, 03, 05, 0a, 01, 05, 01, 05, 06, 01, cc, 01, 09, 00, 0a, 03, 01, 0d, 00, 15, 01, 01, 11, 01, 1b, 05, 01, 1e, 00, 25, 0a, 00, 2f, 00, 33, 03, 02, 09, 00, 0a] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 3 +- expression 0 operands: lhs = Counter(1), rhs = Expression(2, Sub) +- expression 1 operands: lhs = Counter(0), rhs = Counter(1) +- expression 2 operands: lhs = Counter(0), rhs = Counter(1) +Number of file 0 mappings: 6 +- Code(Counter(0)) at (prev + 204, 9) to (start + 0, 10) +- Code(Expression(0, Add)) at (prev + 1, 13) to (start + 0, 21) + = (c1 + (c0 - c1)) +- Code(Counter(0)) at (prev + 1, 17) to (start + 1, 27) +- Code(Counter(1)) at (prev + 1, 30) to (start + 0, 37) +- Code(Expression(2, Sub)) at (prev + 0, 47) to (start + 0, 51) + = (c0 - c1) +- Code(Expression(0, Add)) at (prev + 2, 9) to (start + 0, 10) + = (c1 + (c0 - c1)) + +Function name: closure::main::{closure#18} +Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 18, 0d, 02, 1c, 05, 02, 1d, 02, 12, 02, 02, 12, 00, 13, 07, 01, 11, 01, 0e] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 2 +- expression 0 operands: lhs = Counter(0), rhs = Counter(1) +- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) +Number of file 0 mappings: 4 +- Code(Counter(0)) at (prev + 24, 13) to (start + 2, 28) +- Code(Counter(1)) at (prev + 2, 29) to (start + 2, 18) +- Code(Expression(0, Sub)) at (prev + 2, 18) to (start + 0, 19) + = (c0 - c1) +- Code(Expression(1, Add)) at (prev + 1, 17) to (start + 1, 14) + = (c1 + (c0 - c1)) + +Function name: closure::main::{closure#19} +Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 42, 0d, 02, 1c, 05, 02, 1d, 02, 12, 02, 02, 12, 00, 13, 07, 01, 11, 01, 0e] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 2 +- expression 0 operands: lhs = Counter(0), rhs = Counter(1) +- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) +Number of file 0 mappings: 4 +- Code(Counter(0)) at (prev + 66, 13) to (start + 2, 28) +- Code(Counter(1)) at (prev + 2, 29) to (start + 2, 18) +- Code(Expression(0, Sub)) at (prev + 2, 18) to (start + 0, 19) + = (c0 - c1) +- Code(Expression(1, Add)) at (prev + 1, 17) to (start + 1, 14) + = (c1 + (c0 - c1)) + +Function name: closure::main::{closure#1} +Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 51, 05, 02, 14, 05, 02, 15, 02, 0a, 02, 02, 0a, 00, 0b, 07, 01, 09, 01, 06] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 2 +- expression 0 operands: lhs = Counter(0), rhs = Counter(1) +- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) +Number of file 0 mappings: 4 +- Code(Counter(0)) at (prev + 81, 5) to (start + 2, 20) +- Code(Counter(1)) at (prev + 2, 21) to (start + 2, 10) +- Code(Expression(0, Sub)) at (prev + 2, 10) to (start + 0, 11) + = (c0 - c1) +- Code(Expression(1, Add)) at (prev + 1, 9) to (start + 1, 6) + = (c1 + (c0 - c1)) + +Function name: closure::main::{closure#2} +Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 67, 05, 02, 14, 05, 02, 15, 02, 0a, 02, 02, 0a, 00, 0b, 07, 01, 09, 01, 06] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 2 +- expression 0 operands: lhs = Counter(0), rhs = Counter(1) +- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) +Number of file 0 mappings: 4 +- Code(Counter(0)) at (prev + 103, 5) to (start + 2, 20) +- Code(Counter(1)) at (prev + 2, 21) to (start + 2, 10) +- Code(Expression(0, Sub)) at (prev + 2, 10) to (start + 0, 11) + = (c0 - c1) +- Code(Expression(1, Add)) at (prev + 1, 9) to (start + 1, 6) + = (c1 + (c0 - c1)) + +Function name: closure::main::{closure#3} (unused) +Raw bytes (25): 0x[01, 01, 00, 04, 00, 80, 01, 05, 01, 14, 00, 01, 15, 02, 0a, 00, 02, 0a, 00, 0b, 00, 01, 09, 01, 06] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 4 +- Code(Zero) at (prev + 128, 5) to (start + 1, 20) +- Code(Zero) at (prev + 1, 21) to (start + 2, 10) +- Code(Zero) at (prev + 2, 10) to (start + 0, 11) +- Code(Zero) at (prev + 1, 9) to (start + 1, 6) + +Function name: closure::main::{closure#4} (unused) +Raw bytes (10): 0x[01, 01, 00, 01, 00, 88, 01, 35, 00, 43] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Zero) at (prev + 136, 53) to (start + 0, 67) + +Function name: closure::main::{closure#5} +Raw bytes (10): 0x[01, 01, 00, 01, 01, 8b, 01, 3d, 00, 4f] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 139, 61) to (start + 0, 79) + +Function name: closure::main::{closure#6} +Raw bytes (10): 0x[01, 01, 00, 01, 01, 8c, 01, 41, 00, 57] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 140, 65) to (start + 0, 87) + +Function name: closure::main::{closure#7} (unused) +Raw bytes (10): 0x[01, 01, 00, 01, 00, 8d, 01, 3b, 00, 51] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Zero) at (prev + 141, 59) to (start + 0, 81) + +Function name: closure::main::{closure#8} (unused) +Raw bytes (10): 0x[01, 01, 00, 01, 00, 92, 01, 3b, 00, 55] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Zero) at (prev + 146, 59) to (start + 0, 85) + +Function name: closure::main::{closure#9} (unused) +Raw bytes (10): 0x[01, 01, 00, 01, 00, 94, 01, 38, 02, 06] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Zero) at (prev + 148, 56) to (start + 2, 6) + diff --git a/tests/run-coverage/closure.coverage b/tests/coverage/closure.coverage index 67014f792..67014f792 100644 --- a/tests/run-coverage/closure.coverage +++ b/tests/coverage/closure.coverage diff --git a/tests/coverage-map/status-quo/closure.rs b/tests/coverage/closure.rs index 16a2c4e33..16a2c4e33 100644 --- a/tests/coverage-map/status-quo/closure.rs +++ b/tests/coverage/closure.rs diff --git a/tests/coverage/closure_bug.cov-map b/tests/coverage/closure_bug.cov-map new file mode 100644 index 000000000..90eeb1a66 --- /dev/null +++ b/tests/coverage/closure_bug.cov-map @@ -0,0 +1,133 @@ +Function name: closure_bug::main +Raw bytes (201): 0x[01, 01, 26, 01, 05, 05, 02, 05, 02, 97, 01, 09, 05, 02, 09, 92, 01, 97, 01, 09, 05, 02, 09, 92, 01, 97, 01, 09, 05, 02, 8f, 01, 0d, 09, 92, 01, 97, 01, 09, 05, 02, 0d, 8a, 01, 8f, 01, 0d, 09, 92, 01, 97, 01, 09, 05, 02, 0d, 8a, 01, 8f, 01, 0d, 09, 92, 01, 97, 01, 09, 05, 02, 87, 01, 11, 0d, 8a, 01, 8f, 01, 0d, 09, 92, 01, 97, 01, 09, 05, 02, 11, 82, 01, 87, 01, 11, 0d, 8a, 01, 8f, 01, 0d, 09, 92, 01, 97, 01, 09, 05, 02, 11, 01, 06, 01, 03, 0a, 01, 09, 05, 01, 0e, 05, 01, 0f, 00, 17, 02, 00, 17, 00, 18, 97, 01, 02, 09, 00, 0a, 97, 01, 06, 05, 01, 0e, 09, 01, 0f, 00, 17, 92, 01, 00, 17, 00, 18, 8f, 01, 02, 09, 00, 0a, 8f, 01, 06, 05, 01, 0e, 0d, 01, 0f, 00, 17, 8a, 01, 00, 17, 00, 18, 87, 01, 02, 09, 00, 0a, 87, 01, 06, 05, 01, 0e, 11, 01, 0f, 00, 17, 82, 01, 00, 17, 00, 18, 7f, 01, 01, 00, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 38 +- expression 0 operands: lhs = Counter(0), rhs = Counter(1) +- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 2 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 3 operands: lhs = Expression(37, Add), rhs = Counter(2) +- expression 4 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 5 operands: lhs = Counter(2), rhs = Expression(36, Sub) +- expression 6 operands: lhs = Expression(37, Add), rhs = Counter(2) +- expression 7 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 8 operands: lhs = Counter(2), rhs = Expression(36, Sub) +- expression 9 operands: lhs = Expression(37, Add), rhs = Counter(2) +- expression 10 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 11 operands: lhs = Expression(35, Add), rhs = Counter(3) +- expression 12 operands: lhs = Counter(2), rhs = Expression(36, Sub) +- expression 13 operands: lhs = Expression(37, Add), rhs = Counter(2) +- expression 14 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 15 operands: lhs = Counter(3), rhs = Expression(34, Sub) +- expression 16 operands: lhs = Expression(35, Add), rhs = Counter(3) +- expression 17 operands: lhs = Counter(2), rhs = Expression(36, Sub) +- expression 18 operands: lhs = Expression(37, Add), rhs = Counter(2) +- expression 19 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 20 operands: lhs = Counter(3), rhs = Expression(34, Sub) +- expression 21 operands: lhs = Expression(35, Add), rhs = Counter(3) +- expression 22 operands: lhs = Counter(2), rhs = Expression(36, Sub) +- expression 23 operands: lhs = Expression(37, Add), rhs = Counter(2) +- expression 24 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 25 operands: lhs = Expression(33, Add), rhs = Counter(4) +- expression 26 operands: lhs = Counter(3), rhs = Expression(34, Sub) +- expression 27 operands: lhs = Expression(35, Add), rhs = Counter(3) +- expression 28 operands: lhs = Counter(2), rhs = Expression(36, Sub) +- expression 29 operands: lhs = Expression(37, Add), rhs = Counter(2) +- expression 30 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 31 operands: lhs = Counter(4), rhs = Expression(32, Sub) +- expression 32 operands: lhs = Expression(33, Add), rhs = Counter(4) +- expression 33 operands: lhs = Counter(3), rhs = Expression(34, Sub) +- expression 34 operands: lhs = Expression(35, Add), rhs = Counter(3) +- expression 35 operands: lhs = Counter(2), rhs = Expression(36, Sub) +- expression 36 operands: lhs = Expression(37, Add), rhs = Counter(2) +- expression 37 operands: lhs = Counter(1), rhs = Expression(0, Sub) +Number of file 0 mappings: 17 +- Code(Counter(0)) at (prev + 6, 1) to (start + 3, 10) +- Code(Counter(0)) at (prev + 9, 5) to (start + 1, 14) +- Code(Counter(1)) at (prev + 1, 15) to (start + 0, 23) +- Code(Expression(0, Sub)) at (prev + 0, 23) to (start + 0, 24) + = (c0 - c1) +- Code(Expression(37, Add)) at (prev + 2, 9) to (start + 0, 10) + = (c1 + (c0 - c1)) +- Code(Expression(37, Add)) at (prev + 6, 5) to (start + 1, 14) + = (c1 + (c0 - c1)) +- Code(Counter(2)) at (prev + 1, 15) to (start + 0, 23) +- Code(Expression(36, Sub)) at (prev + 0, 23) to (start + 0, 24) + = ((c1 + (c0 - c1)) - c2) +- Code(Expression(35, Add)) at (prev + 2, 9) to (start + 0, 10) + = (c2 + ((c1 + (c0 - c1)) - c2)) +- Code(Expression(35, Add)) at (prev + 6, 5) to (start + 1, 14) + = (c2 + ((c1 + (c0 - c1)) - c2)) +- Code(Counter(3)) at (prev + 1, 15) to (start + 0, 23) +- Code(Expression(34, Sub)) at (prev + 0, 23) to (start + 0, 24) + = ((c2 + ((c1 + (c0 - c1)) - c2)) - c3) +- Code(Expression(33, Add)) at (prev + 2, 9) to (start + 0, 10) + = (c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) +- Code(Expression(33, Add)) at (prev + 6, 5) to (start + 1, 14) + = (c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) +- Code(Counter(4)) at (prev + 1, 15) to (start + 0, 23) +- Code(Expression(32, Sub)) at (prev + 0, 23) to (start + 0, 24) + = ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4) +- Code(Expression(31, Add)) at (prev + 1, 1) to (start + 0, 2) + = (c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4)) + +Function name: closure_bug::main::{closure#0} +Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 0d, 09, 00, 12, 05, 00, 15, 00, 19, 02, 00, 23, 00, 28, 07, 00, 29, 00, 2a] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 2 +- expression 0 operands: lhs = Counter(0), rhs = Counter(1) +- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) +Number of file 0 mappings: 4 +- Code(Counter(0)) at (prev + 13, 9) to (start + 0, 18) +- Code(Counter(1)) at (prev + 0, 21) to (start + 0, 25) +- Code(Expression(0, Sub)) at (prev + 0, 35) to (start + 0, 40) + = (c0 - c1) +- Code(Expression(1, Add)) at (prev + 0, 41) to (start + 0, 42) + = (c1 + (c0 - c1)) + +Function name: closure_bug::main::{closure#1} +Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 16, 09, 00, 12, 05, 00, 15, 00, 19, 02, 00, 23, 00, 28, 07, 00, 29, 00, 2a] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 2 +- expression 0 operands: lhs = Counter(0), rhs = Counter(1) +- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) +Number of file 0 mappings: 4 +- Code(Counter(0)) at (prev + 22, 9) to (start + 0, 18) +- Code(Counter(1)) at (prev + 0, 21) to (start + 0, 25) +- Code(Expression(0, Sub)) at (prev + 0, 35) to (start + 0, 40) + = (c0 - c1) +- Code(Expression(1, Add)) at (prev + 0, 41) to (start + 0, 42) + = (c1 + (c0 - c1)) + +Function name: closure_bug::main::{closure#2} +Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 1f, 09, 00, 12, 05, 00, 15, 00, 19, 02, 00, 23, 00, 28, 07, 00, 29, 00, 2a] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 2 +- expression 0 operands: lhs = Counter(0), rhs = Counter(1) +- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) +Number of file 0 mappings: 4 +- Code(Counter(0)) at (prev + 31, 9) to (start + 0, 18) +- Code(Counter(1)) at (prev + 0, 21) to (start + 0, 25) +- Code(Expression(0, Sub)) at (prev + 0, 35) to (start + 0, 40) + = (c0 - c1) +- Code(Expression(1, Add)) at (prev + 0, 41) to (start + 0, 42) + = (c1 + (c0 - c1)) + +Function name: closure_bug::main::{closure#3} +Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 28, 09, 00, 12, 05, 00, 15, 00, 19, 02, 00, 23, 00, 28, 07, 00, 29, 00, 2a] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 2 +- expression 0 operands: lhs = Counter(0), rhs = Counter(1) +- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) +Number of file 0 mappings: 4 +- Code(Counter(0)) at (prev + 40, 9) to (start + 0, 18) +- Code(Counter(1)) at (prev + 0, 21) to (start + 0, 25) +- Code(Expression(0, Sub)) at (prev + 0, 35) to (start + 0, 40) + = (c0 - c1) +- Code(Expression(1, Add)) at (prev + 0, 41) to (start + 0, 42) + = (c1 + (c0 - c1)) + diff --git a/tests/run-coverage/closure_bug.coverage b/tests/coverage/closure_bug.coverage index f3299834b..f3299834b 100644 --- a/tests/run-coverage/closure_bug.coverage +++ b/tests/coverage/closure_bug.coverage diff --git a/tests/coverage-map/status-quo/closure_bug.rs b/tests/coverage/closure_bug.rs index 739bc5f0b..739bc5f0b 100644 --- a/tests/coverage-map/status-quo/closure_bug.rs +++ b/tests/coverage/closure_bug.rs diff --git a/tests/coverage/closure_macro.cov-map b/tests/coverage/closure_macro.cov-map new file mode 100644 index 000000000..b02c7e2e4 --- /dev/null +++ b/tests/coverage/closure_macro.cov-map @@ -0,0 +1,36 @@ +Function name: closure_macro::load_configuration_files +Raw bytes (9): 0x[01, 01, 00, 01, 01, 1d, 01, 02, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 29, 1) to (start + 2, 2) + +Function name: closure_macro::main +Raw bytes (43): 0x[01, 01, 02, 01, 05, 05, 02, 07, 01, 21, 01, 01, 21, 02, 02, 09, 00, 0f, 05, 00, 12, 00, 13, 02, 00, 12, 00, 13, 05, 00, 54, 00, 55, 02, 02, 09, 02, 0b, 07, 03, 01, 00, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 2 +- expression 0 operands: lhs = Counter(0), rhs = Counter(1) +- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) +Number of file 0 mappings: 7 +- Code(Counter(0)) at (prev + 33, 1) to (start + 1, 33) +- Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 15) + = (c0 - c1) +- Code(Counter(1)) at (prev + 0, 18) to (start + 0, 19) +- Code(Expression(0, Sub)) at (prev + 0, 18) to (start + 0, 19) + = (c0 - c1) +- Code(Counter(1)) at (prev + 0, 84) to (start + 0, 85) +- Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 2, 11) + = (c0 - c1) +- Code(Expression(1, Add)) at (prev + 3, 1) to (start + 0, 2) + = (c1 + (c0 - c1)) + +Function name: closure_macro::main::{closure#0} +Raw bytes (9): 0x[01, 01, 00, 01, 01, 23, 12, 00, 54] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 35, 18) to (start + 0, 84) + diff --git a/tests/run-coverage/closure_macro.coverage b/tests/coverage/closure_macro.coverage index 0f2c917e0..0f2c917e0 100644 --- a/tests/run-coverage/closure_macro.coverage +++ b/tests/coverage/closure_macro.coverage diff --git a/tests/coverage-map/status-quo/closure_macro.rs b/tests/coverage/closure_macro.rs index 9b289141c..9b289141c 100644 --- a/tests/coverage-map/status-quo/closure_macro.rs +++ b/tests/coverage/closure_macro.rs diff --git a/tests/coverage/closure_macro_async.cov-map b/tests/coverage/closure_macro_async.cov-map new file mode 100644 index 000000000..7f8666948 --- /dev/null +++ b/tests/coverage/closure_macro_async.cov-map @@ -0,0 +1,44 @@ +Function name: closure_macro_async::load_configuration_files +Raw bytes (9): 0x[01, 01, 00, 01, 01, 1d, 01, 02, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 29, 1) to (start + 2, 2) + +Function name: closure_macro_async::test +Raw bytes (9): 0x[01, 01, 00, 01, 01, 21, 01, 00, 2b] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 33, 1) to (start + 0, 43) + +Function name: closure_macro_async::test::{closure#0} +Raw bytes (43): 0x[01, 01, 02, 01, 05, 05, 02, 07, 01, 21, 2b, 01, 21, 02, 02, 09, 00, 0f, 05, 00, 12, 00, 13, 02, 00, 12, 00, 13, 05, 00, 54, 00, 55, 02, 02, 09, 02, 0b, 07, 03, 01, 00, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 2 +- expression 0 operands: lhs = Counter(0), rhs = Counter(1) +- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) +Number of file 0 mappings: 7 +- Code(Counter(0)) at (prev + 33, 43) to (start + 1, 33) +- Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 15) + = (c0 - c1) +- Code(Counter(1)) at (prev + 0, 18) to (start + 0, 19) +- Code(Expression(0, Sub)) at (prev + 0, 18) to (start + 0, 19) + = (c0 - c1) +- Code(Counter(1)) at (prev + 0, 84) to (start + 0, 85) +- Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 2, 11) + = (c0 - c1) +- Code(Expression(1, Add)) at (prev + 3, 1) to (start + 0, 2) + = (c1 + (c0 - c1)) + +Function name: closure_macro_async::test::{closure#0}::{closure#0} +Raw bytes (9): 0x[01, 01, 00, 01, 01, 23, 12, 00, 54] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 35, 18) to (start + 0, 84) + diff --git a/tests/run-coverage/closure_macro_async.coverage b/tests/coverage/closure_macro_async.coverage index 74247f1bc..74247f1bc 100644 --- a/tests/run-coverage/closure_macro_async.coverage +++ b/tests/coverage/closure_macro_async.coverage diff --git a/tests/coverage-map/status-quo/closure_macro_async.rs b/tests/coverage/closure_macro_async.rs index b4275599e..b4275599e 100644 --- a/tests/coverage-map/status-quo/closure_macro_async.rs +++ b/tests/coverage/closure_macro_async.rs diff --git a/tests/coverage/conditions.cov-map b/tests/coverage/conditions.cov-map new file mode 100644 index 000000000..7600d2d96 --- /dev/null +++ b/tests/coverage/conditions.cov-map @@ -0,0 +1,259 @@ +Function name: conditions::main +Raw bytes (784): 0x[01, 01, 8e, 01, 09, 33, 37, 41, 3b, 3d, 35, 39, 05, 00, b7, 04, 09, 05, 00, 0d, 35, 26, 39, 0d, 35, 3b, 3d, 35, 39, 37, 41, 3b, 3d, 35, 39, b2, 04, 0d, b7, 04, 09, 05, 00, 45, 00, 83, 01, 49, 45, 00, 7e, 31, 83, 01, 49, 45, 00, 7a, 4d, 7e, 31, 83, 01, 49, 45, 00, 76, 51, 7a, 4d, 7e, 31, 83, 01, 49, 45, 00, a7, 01, 55, 4d, 51, a3, 01, 59, a7, 01, 55, 4d, 51, 49, 9f, 01, a3, 01, 59, a7, 01, 55, 4d, 51, 61, 00, e3, 01, 65, 61, 00, de, 01, 2d, e3, 01, 65, 61, 00, da, 01, 69, de, 01, 2d, e3, 01, 65, 61, 00, d6, 01, 6d, da, 01, 69, de, 01, 2d, e3, 01, 65, 61, 00, 8b, 02, 71, 69, 6d, 87, 02, 75, 8b, 02, 71, 69, 6d, ff, 01, 00, 65, 83, 02, 87, 02, 75, 8b, 02, 71, 69, 6d, 7d, eb, 03, ef, 03, 8d, 01, f3, 03, 89, 01, 81, 01, 85, 01, 79, 00, d7, 02, 7d, 79, 00, d2, 02, 29, d7, 02, 7d, 79, 00, ce, 02, 81, 01, d2, 02, 29, d7, 02, 7d, 79, 00, ca, 02, 85, 01, ce, 02, 81, 01, d2, 02, 29, d7, 02, 7d, 79, 00, f3, 03, 89, 01, 81, 01, 85, 01, ef, 03, 8d, 01, f3, 03, 89, 01, 81, 01, 85, 01, 11, 93, 04, 97, 04, 21, 9b, 04, 1d, 15, 19, 7d, eb, 03, ef, 03, 8d, 01, f3, 03, 89, 01, 81, 01, 85, 01, e7, 03, 11, 7d, eb, 03, ef, 03, 8d, 01, f3, 03, 89, 01, 81, 01, 85, 01, e2, 03, 25, e7, 03, 11, 7d, eb, 03, ef, 03, 8d, 01, f3, 03, 89, 01, 81, 01, 85, 01, de, 03, 15, e2, 03, 25, e7, 03, 11, 7d, eb, 03, ef, 03, 8d, 01, f3, 03, 89, 01, 81, 01, 85, 01, da, 03, 19, de, 03, 15, e2, 03, 25, e7, 03, 11, 7d, eb, 03, ef, 03, 8d, 01, f3, 03, 89, 01, 81, 01, 85, 01, 9b, 04, 1d, 15, 19, 97, 04, 21, 9b, 04, 1d, 15, 19, 8f, 04, 9f, 04, 11, 93, 04, 97, 04, 21, 9b, 04, 1d, 15, 19, a3, 04, ae, 04, a7, 04, ab, 04, 25, 29, 2d, 31, b2, 04, 0d, b7, 04, 09, 05, 00, 44, 01, 03, 01, 02, 0c, 05, 02, 0d, 02, 06, 00, 02, 06, 00, 07, 03, 03, 09, 00, 0a, b7, 04, 00, 10, 00, 1d, 09, 01, 09, 01, 0a, b2, 04, 02, 0f, 00, 1c, 0d, 01, 0c, 00, 19, 26, 00, 1d, 00, 2a, 22, 00, 2e, 00, 3c, 37, 00, 3d, 02, 0a, 41, 02, 0a, 00, 0b, 33, 01, 09, 01, 12, ae, 04, 03, 09, 00, 0f, 03, 03, 09, 01, 0c, 45, 01, 0d, 02, 06, 00, 02, 06, 00, 07, 83, 01, 02, 08, 00, 15, 49, 00, 16, 02, 06, 7e, 02, 0f, 00, 1c, 7a, 01, 0c, 00, 19, 76, 00, 1d, 00, 2a, 72, 00, 2e, 00, 3c, a3, 01, 00, 3d, 02, 0a, 59, 02, 0a, 00, 0b, 9f, 01, 01, 09, 00, 17, 31, 02, 09, 00, 0f, 9b, 01, 03, 08, 00, 0c, 5d, 01, 0d, 01, 10, 61, 01, 11, 02, 0a, 00, 02, 0a, 00, 0b, e3, 01, 02, 0c, 00, 19, 65, 00, 1a, 02, 0a, de, 01, 03, 11, 00, 1e, da, 01, 01, 10, 00, 1d, d6, 01, 00, 21, 00, 2e, d2, 01, 00, 32, 00, 40, 87, 02, 00, 41, 02, 0e, 75, 02, 0e, 00, 0f, 83, 02, 01, 0d, 00, 1b, 2d, 02, 0d, 00, 13, 00, 02, 06, 00, 07, fb, 01, 02, 09, 01, 0c, 79, 01, 0d, 02, 06, 00, 02, 06, 00, 07, e7, 03, 02, 09, 00, 0a, d7, 02, 00, 10, 00, 1d, 7d, 00, 1e, 02, 06, d2, 02, 02, 0f, 00, 1c, ce, 02, 01, 0c, 00, 19, ca, 02, 00, 1d, 00, 2a, c6, 02, 00, 2e, 00, 3c, ef, 03, 00, 3d, 02, 0a, 8d, 01, 02, 0a, 00, 0b, eb, 03, 01, 09, 00, 17, 29, 02, 0d, 02, 0f, 8f, 04, 05, 09, 00, 0a, e7, 03, 00, 10, 00, 1d, 11, 00, 1e, 02, 06, e2, 03, 02, 0f, 00, 1c, de, 03, 01, 0c, 00, 19, da, 03, 00, 1d, 00, 2a, d6, 03, 00, 2e, 00, 3c, 97, 04, 00, 3d, 02, 0a, 21, 02, 0a, 00, 0b, 93, 04, 01, 09, 00, 17, 25, 02, 09, 00, 0f, 8b, 04, 02, 01, 00, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 142 +- expression 0 operands: lhs = Counter(2), rhs = Expression(12, Add) +- expression 1 operands: lhs = Expression(13, Add), rhs = Counter(16) +- expression 2 operands: lhs = Expression(14, Add), rhs = Counter(15) +- expression 3 operands: lhs = Counter(13), rhs = Counter(14) +- expression 4 operands: lhs = Counter(1), rhs = Zero +- expression 5 operands: lhs = Expression(141, Add), rhs = Counter(2) +- expression 6 operands: lhs = Counter(1), rhs = Zero +- expression 7 operands: lhs = Counter(3), rhs = Counter(13) +- expression 8 operands: lhs = Expression(9, Sub), rhs = Counter(14) +- expression 9 operands: lhs = Counter(3), rhs = Counter(13) +- expression 10 operands: lhs = Expression(14, Add), rhs = Counter(15) +- expression 11 operands: lhs = Counter(13), rhs = Counter(14) +- expression 12 operands: lhs = Expression(13, Add), rhs = Counter(16) +- expression 13 operands: lhs = Expression(14, Add), rhs = Counter(15) +- expression 14 operands: lhs = Counter(13), rhs = Counter(14) +- expression 15 operands: lhs = Expression(140, Sub), rhs = Counter(3) +- expression 16 operands: lhs = Expression(141, Add), rhs = Counter(2) +- expression 17 operands: lhs = Counter(1), rhs = Zero +- expression 18 operands: lhs = Counter(17), rhs = Zero +- expression 19 operands: lhs = Expression(32, Add), rhs = Counter(18) +- expression 20 operands: lhs = Counter(17), rhs = Zero +- expression 21 operands: lhs = Expression(31, Sub), rhs = Counter(12) +- expression 22 operands: lhs = Expression(32, Add), rhs = Counter(18) +- expression 23 operands: lhs = Counter(17), rhs = Zero +- expression 24 operands: lhs = Expression(30, Sub), rhs = Counter(19) +- expression 25 operands: lhs = Expression(31, Sub), rhs = Counter(12) +- expression 26 operands: lhs = Expression(32, Add), rhs = Counter(18) +- expression 27 operands: lhs = Counter(17), rhs = Zero +- expression 28 operands: lhs = Expression(29, Sub), rhs = Counter(20) +- expression 29 operands: lhs = Expression(30, Sub), rhs = Counter(19) +- expression 30 operands: lhs = Expression(31, Sub), rhs = Counter(12) +- expression 31 operands: lhs = Expression(32, Add), rhs = Counter(18) +- expression 32 operands: lhs = Counter(17), rhs = Zero +- expression 33 operands: lhs = Expression(41, Add), rhs = Counter(21) +- expression 34 operands: lhs = Counter(19), rhs = Counter(20) +- expression 35 operands: lhs = Expression(40, Add), rhs = Counter(22) +- expression 36 operands: lhs = Expression(41, Add), rhs = Counter(21) +- expression 37 operands: lhs = Counter(19), rhs = Counter(20) +- expression 38 operands: lhs = Counter(18), rhs = Expression(39, Add) +- expression 39 operands: lhs = Expression(40, Add), rhs = Counter(22) +- expression 40 operands: lhs = Expression(41, Add), rhs = Counter(21) +- expression 41 operands: lhs = Counter(19), rhs = Counter(20) +- expression 42 operands: lhs = Counter(24), rhs = Zero +- expression 43 operands: lhs = Expression(56, Add), rhs = Counter(25) +- expression 44 operands: lhs = Counter(24), rhs = Zero +- expression 45 operands: lhs = Expression(55, Sub), rhs = Counter(11) +- expression 46 operands: lhs = Expression(56, Add), rhs = Counter(25) +- expression 47 operands: lhs = Counter(24), rhs = Zero +- expression 48 operands: lhs = Expression(54, Sub), rhs = Counter(26) +- expression 49 operands: lhs = Expression(55, Sub), rhs = Counter(11) +- expression 50 operands: lhs = Expression(56, Add), rhs = Counter(25) +- expression 51 operands: lhs = Counter(24), rhs = Zero +- expression 52 operands: lhs = Expression(53, Sub), rhs = Counter(27) +- expression 53 operands: lhs = Expression(54, Sub), rhs = Counter(26) +- expression 54 operands: lhs = Expression(55, Sub), rhs = Counter(11) +- expression 55 operands: lhs = Expression(56, Add), rhs = Counter(25) +- expression 56 operands: lhs = Counter(24), rhs = Zero +- expression 57 operands: lhs = Expression(66, Add), rhs = Counter(28) +- expression 58 operands: lhs = Counter(26), rhs = Counter(27) +- expression 59 operands: lhs = Expression(65, Add), rhs = Counter(29) +- expression 60 operands: lhs = Expression(66, Add), rhs = Counter(28) +- expression 61 operands: lhs = Counter(26), rhs = Counter(27) +- expression 62 operands: lhs = Expression(63, Add), rhs = Zero +- expression 63 operands: lhs = Counter(25), rhs = Expression(64, Add) +- expression 64 operands: lhs = Expression(65, Add), rhs = Counter(29) +- expression 65 operands: lhs = Expression(66, Add), rhs = Counter(28) +- expression 66 operands: lhs = Counter(26), rhs = Counter(27) +- expression 67 operands: lhs = Counter(31), rhs = Expression(122, Add) +- expression 68 operands: lhs = Expression(123, Add), rhs = Counter(35) +- expression 69 operands: lhs = Expression(124, Add), rhs = Counter(34) +- expression 70 operands: lhs = Counter(32), rhs = Counter(33) +- expression 71 operands: lhs = Counter(30), rhs = Zero +- expression 72 operands: lhs = Expression(85, Add), rhs = Counter(31) +- expression 73 operands: lhs = Counter(30), rhs = Zero +- expression 74 operands: lhs = Expression(84, Sub), rhs = Counter(10) +- expression 75 operands: lhs = Expression(85, Add), rhs = Counter(31) +- expression 76 operands: lhs = Counter(30), rhs = Zero +- expression 77 operands: lhs = Expression(83, Sub), rhs = Counter(32) +- expression 78 operands: lhs = Expression(84, Sub), rhs = Counter(10) +- expression 79 operands: lhs = Expression(85, Add), rhs = Counter(31) +- expression 80 operands: lhs = Counter(30), rhs = Zero +- expression 81 operands: lhs = Expression(82, Sub), rhs = Counter(33) +- expression 82 operands: lhs = Expression(83, Sub), rhs = Counter(32) +- expression 83 operands: lhs = Expression(84, Sub), rhs = Counter(10) +- expression 84 operands: lhs = Expression(85, Add), rhs = Counter(31) +- expression 85 operands: lhs = Counter(30), rhs = Zero +- expression 86 operands: lhs = Expression(124, Add), rhs = Counter(34) +- expression 87 operands: lhs = Counter(32), rhs = Counter(33) +- expression 88 operands: lhs = Expression(123, Add), rhs = Counter(35) +- expression 89 operands: lhs = Expression(124, Add), rhs = Counter(34) +- expression 90 operands: lhs = Counter(32), rhs = Counter(33) +- expression 91 operands: lhs = Counter(4), rhs = Expression(132, Add) +- expression 92 operands: lhs = Expression(133, Add), rhs = Counter(8) +- expression 93 operands: lhs = Expression(134, Add), rhs = Counter(7) +- expression 94 operands: lhs = Counter(5), rhs = Counter(6) +- expression 95 operands: lhs = Counter(31), rhs = Expression(122, Add) +- expression 96 operands: lhs = Expression(123, Add), rhs = Counter(35) +- expression 97 operands: lhs = Expression(124, Add), rhs = Counter(34) +- expression 98 operands: lhs = Counter(32), rhs = Counter(33) +- expression 99 operands: lhs = Expression(121, Add), rhs = Counter(4) +- expression 100 operands: lhs = Counter(31), rhs = Expression(122, Add) +- expression 101 operands: lhs = Expression(123, Add), rhs = Counter(35) +- expression 102 operands: lhs = Expression(124, Add), rhs = Counter(34) +- expression 103 operands: lhs = Counter(32), rhs = Counter(33) +- expression 104 operands: lhs = Expression(120, Sub), rhs = Counter(9) +- expression 105 operands: lhs = Expression(121, Add), rhs = Counter(4) +- expression 106 operands: lhs = Counter(31), rhs = Expression(122, Add) +- expression 107 operands: lhs = Expression(123, Add), rhs = Counter(35) +- expression 108 operands: lhs = Expression(124, Add), rhs = Counter(34) +- expression 109 operands: lhs = Counter(32), rhs = Counter(33) +- expression 110 operands: lhs = Expression(119, Sub), rhs = Counter(5) +- expression 111 operands: lhs = Expression(120, Sub), rhs = Counter(9) +- expression 112 operands: lhs = Expression(121, Add), rhs = Counter(4) +- expression 113 operands: lhs = Counter(31), rhs = Expression(122, Add) +- expression 114 operands: lhs = Expression(123, Add), rhs = Counter(35) +- expression 115 operands: lhs = Expression(124, Add), rhs = Counter(34) +- expression 116 operands: lhs = Counter(32), rhs = Counter(33) +- expression 117 operands: lhs = Expression(118, Sub), rhs = Counter(6) +- expression 118 operands: lhs = Expression(119, Sub), rhs = Counter(5) +- expression 119 operands: lhs = Expression(120, Sub), rhs = Counter(9) +- expression 120 operands: lhs = Expression(121, Add), rhs = Counter(4) +- expression 121 operands: lhs = Counter(31), rhs = Expression(122, Add) +- expression 122 operands: lhs = Expression(123, Add), rhs = Counter(35) +- expression 123 operands: lhs = Expression(124, Add), rhs = Counter(34) +- expression 124 operands: lhs = Counter(32), rhs = Counter(33) +- expression 125 operands: lhs = Expression(134, Add), rhs = Counter(7) +- expression 126 operands: lhs = Counter(5), rhs = Counter(6) +- expression 127 operands: lhs = Expression(133, Add), rhs = Counter(8) +- expression 128 operands: lhs = Expression(134, Add), rhs = Counter(7) +- expression 129 operands: lhs = Counter(5), rhs = Counter(6) +- expression 130 operands: lhs = Expression(131, Add), rhs = Expression(135, Add) +- expression 131 operands: lhs = Counter(4), rhs = Expression(132, Add) +- expression 132 operands: lhs = Expression(133, Add), rhs = Counter(8) +- expression 133 operands: lhs = Expression(134, Add), rhs = Counter(7) +- expression 134 operands: lhs = Counter(5), rhs = Counter(6) +- expression 135 operands: lhs = Expression(136, Add), rhs = Expression(139, Sub) +- expression 136 operands: lhs = Expression(137, Add), rhs = Expression(138, Add) +- expression 137 operands: lhs = Counter(9), rhs = Counter(10) +- expression 138 operands: lhs = Counter(11), rhs = Counter(12) +- expression 139 operands: lhs = Expression(140, Sub), rhs = Counter(3) +- expression 140 operands: lhs = Expression(141, Add), rhs = Counter(2) +- expression 141 operands: lhs = Counter(1), rhs = Zero +Number of file 0 mappings: 68 +- Code(Counter(0)) at (prev + 3, 1) to (start + 2, 12) +- Code(Counter(1)) at (prev + 2, 13) to (start + 2, 6) +- Code(Zero) at (prev + 2, 6) to (start + 0, 7) +- Code(Expression(0, Add)) at (prev + 3, 9) to (start + 0, 10) + = (c2 + (((c13 + c14) + c15) + c16)) +- Code(Expression(141, Add)) at (prev + 0, 16) to (start + 0, 29) + = (c1 + Zero) +- Code(Counter(2)) at (prev + 1, 9) to (start + 1, 10) +- Code(Expression(140, Sub)) at (prev + 2, 15) to (start + 0, 28) + = ((c1 + Zero) - c2) +- Code(Counter(3)) at (prev + 1, 12) to (start + 0, 25) +- Code(Expression(9, Sub)) at (prev + 0, 29) to (start + 0, 42) + = (c3 - c13) +- Code(Expression(8, Sub)) at (prev + 0, 46) to (start + 0, 60) + = ((c3 - c13) - c14) +- Code(Expression(13, Add)) at (prev + 0, 61) to (start + 2, 10) + = ((c13 + c14) + c15) +- Code(Counter(16)) at (prev + 2, 10) to (start + 0, 11) +- Code(Expression(12, Add)) at (prev + 1, 9) to (start + 1, 18) + = (((c13 + c14) + c15) + c16) +- Code(Expression(139, Sub)) at (prev + 3, 9) to (start + 0, 15) + = (((c1 + Zero) - c2) - c3) +- Code(Expression(0, Add)) at (prev + 3, 9) to (start + 1, 12) + = (c2 + (((c13 + c14) + c15) + c16)) +- Code(Counter(17)) at (prev + 1, 13) to (start + 2, 6) +- Code(Zero) at (prev + 2, 6) to (start + 0, 7) +- Code(Expression(32, Add)) at (prev + 2, 8) to (start + 0, 21) + = (c17 + Zero) +- Code(Counter(18)) at (prev + 0, 22) to (start + 2, 6) +- Code(Expression(31, Sub)) at (prev + 2, 15) to (start + 0, 28) + = ((c17 + Zero) - c18) +- Code(Expression(30, Sub)) at (prev + 1, 12) to (start + 0, 25) + = (((c17 + Zero) - c18) - c12) +- Code(Expression(29, Sub)) at (prev + 0, 29) to (start + 0, 42) + = ((((c17 + Zero) - c18) - c12) - c19) +- Code(Expression(28, Sub)) at (prev + 0, 46) to (start + 0, 60) + = (((((c17 + Zero) - c18) - c12) - c19) - c20) +- Code(Expression(40, Add)) at (prev + 0, 61) to (start + 2, 10) + = ((c19 + c20) + c21) +- Code(Counter(22)) at (prev + 2, 10) to (start + 0, 11) +- Code(Expression(39, Add)) at (prev + 1, 9) to (start + 0, 23) + = (((c19 + c20) + c21) + c22) +- Code(Counter(12)) at (prev + 2, 9) to (start + 0, 15) +- Code(Expression(38, Add)) at (prev + 3, 8) to (start + 0, 12) + = (c18 + (((c19 + c20) + c21) + c22)) +- Code(Counter(23)) at (prev + 1, 13) to (start + 1, 16) +- Code(Counter(24)) at (prev + 1, 17) to (start + 2, 10) +- Code(Zero) at (prev + 2, 10) to (start + 0, 11) +- Code(Expression(56, Add)) at (prev + 2, 12) to (start + 0, 25) + = (c24 + Zero) +- Code(Counter(25)) at (prev + 0, 26) to (start + 2, 10) +- Code(Expression(55, Sub)) at (prev + 3, 17) to (start + 0, 30) + = ((c24 + Zero) - c25) +- Code(Expression(54, Sub)) at (prev + 1, 16) to (start + 0, 29) + = (((c24 + Zero) - c25) - c11) +- Code(Expression(53, Sub)) at (prev + 0, 33) to (start + 0, 46) + = ((((c24 + Zero) - c25) - c11) - c26) +- Code(Expression(52, Sub)) at (prev + 0, 50) to (start + 0, 64) + = (((((c24 + Zero) - c25) - c11) - c26) - c27) +- Code(Expression(65, Add)) at (prev + 0, 65) to (start + 2, 14) + = ((c26 + c27) + c28) +- Code(Counter(29)) at (prev + 2, 14) to (start + 0, 15) +- Code(Expression(64, Add)) at (prev + 1, 13) to (start + 0, 27) + = (((c26 + c27) + c28) + c29) +- Code(Counter(11)) at (prev + 2, 13) to (start + 0, 19) +- Code(Zero) at (prev + 2, 6) to (start + 0, 7) +- Code(Expression(62, Add)) at (prev + 2, 9) to (start + 1, 12) + = ((c25 + (((c26 + c27) + c28) + c29)) + Zero) +- Code(Counter(30)) at (prev + 1, 13) to (start + 2, 6) +- Code(Zero) at (prev + 2, 6) to (start + 0, 7) +- Code(Expression(121, Add)) at (prev + 2, 9) to (start + 0, 10) + = (c31 + (((c32 + c33) + c34) + c35)) +- Code(Expression(85, Add)) at (prev + 0, 16) to (start + 0, 29) + = (c30 + Zero) +- Code(Counter(31)) at (prev + 0, 30) to (start + 2, 6) +- Code(Expression(84, Sub)) at (prev + 2, 15) to (start + 0, 28) + = ((c30 + Zero) - c31) +- Code(Expression(83, Sub)) at (prev + 1, 12) to (start + 0, 25) + = (((c30 + Zero) - c31) - c10) +- Code(Expression(82, Sub)) at (prev + 0, 29) to (start + 0, 42) + = ((((c30 + Zero) - c31) - c10) - c32) +- Code(Expression(81, Sub)) at (prev + 0, 46) to (start + 0, 60) + = (((((c30 + Zero) - c31) - c10) - c32) - c33) +- Code(Expression(123, Add)) at (prev + 0, 61) to (start + 2, 10) + = ((c32 + c33) + c34) +- Code(Counter(35)) at (prev + 2, 10) to (start + 0, 11) +- Code(Expression(122, Add)) at (prev + 1, 9) to (start + 0, 23) + = (((c32 + c33) + c34) + c35) +- Code(Counter(10)) at (prev + 2, 13) to (start + 2, 15) +- Code(Expression(131, Add)) at (prev + 5, 9) to (start + 0, 10) + = (c4 + (((c5 + c6) + c7) + c8)) +- Code(Expression(121, Add)) at (prev + 0, 16) to (start + 0, 29) + = (c31 + (((c32 + c33) + c34) + c35)) +- Code(Counter(4)) at (prev + 0, 30) to (start + 2, 6) +- Code(Expression(120, Sub)) at (prev + 2, 15) to (start + 0, 28) + = ((c31 + (((c32 + c33) + c34) + c35)) - c4) +- Code(Expression(119, Sub)) at (prev + 1, 12) to (start + 0, 25) + = (((c31 + (((c32 + c33) + c34) + c35)) - c4) - c9) +- Code(Expression(118, Sub)) at (prev + 0, 29) to (start + 0, 42) + = ((((c31 + (((c32 + c33) + c34) + c35)) - c4) - c9) - c5) +- Code(Expression(117, Sub)) at (prev + 0, 46) to (start + 0, 60) + = (((((c31 + (((c32 + c33) + c34) + c35)) - c4) - c9) - c5) - c6) +- Code(Expression(133, Add)) at (prev + 0, 61) to (start + 2, 10) + = ((c5 + c6) + c7) +- Code(Counter(8)) at (prev + 2, 10) to (start + 0, 11) +- Code(Expression(132, Add)) at (prev + 1, 9) to (start + 0, 23) + = (((c5 + c6) + c7) + c8) +- Code(Counter(9)) at (prev + 2, 9) to (start + 0, 15) +- Code(Expression(130, Add)) at (prev + 2, 1) to (start + 0, 2) + = ((c4 + (((c5 + c6) + c7) + c8)) + (((c9 + c10) + (c11 + c12)) + (((c1 + Zero) - c2) - c3))) + diff --git a/tests/run-coverage/conditions.coverage b/tests/coverage/conditions.coverage index 473335ff6..473335ff6 100644 --- a/tests/run-coverage/conditions.coverage +++ b/tests/coverage/conditions.coverage diff --git a/tests/coverage-map/status-quo/conditions.rs b/tests/coverage/conditions.rs index fa7f2a116..fa7f2a116 100644 --- a/tests/coverage-map/status-quo/conditions.rs +++ b/tests/coverage/conditions.rs diff --git a/tests/coverage/continue.cov-map b/tests/coverage/continue.cov-map new file mode 100644 index 000000000..82f3d7c60 --- /dev/null +++ b/tests/coverage/continue.cov-map @@ -0,0 +1,79 @@ +Function name: continue::main +Raw bytes (210): 0x[01, 01, 1c, 01, 07, 05, 09, 03, 0d, 0d, 1f, 11, 15, 1b, 19, 0d, 1f, 11, 15, 19, 33, 1d, 21, 2f, 25, 19, 33, 1d, 21, 25, 47, 29, 2d, 43, 31, 25, 47, 29, 2d, 31, 5f, 35, 39, 57, 3d, 31, 5f, 35, 39, 35, 39, 3d, 41, 6b, 45, 3d, 41, 49, 45, 1e, 01, 03, 01, 03, 12, 03, 04, 0e, 00, 13, 0a, 01, 0f, 00, 16, 05, 02, 11, 00, 19, 09, 02, 12, 04, 0e, 1b, 06, 0e, 00, 13, 16, 01, 0f, 00, 16, 15, 01, 16, 02, 0e, 11, 04, 11, 00, 19, 15, 03, 09, 00, 0e, 2f, 02, 0e, 00, 13, 2a, 01, 0f, 00, 16, 1d, 01, 15, 02, 0e, 21, 04, 11, 00, 19, 1d, 03, 09, 00, 0e, 43, 02, 0e, 00, 13, 3e, 01, 0c, 00, 13, 29, 01, 0d, 00, 15, 2d, 01, 0a, 01, 0e, 57, 03, 0e, 00, 13, 52, 01, 0f, 00, 16, 39, 01, 16, 02, 0e, 35, 03, 12, 02, 0e, 5f, 04, 09, 00, 0e, 6b, 02, 0e, 00, 13, 66, 01, 0f, 00, 16, 41, 01, 16, 02, 0e, 49, 04, 11, 00, 16, 41, 03, 09, 00, 0e, 6f, 02, 0d, 01, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 28 +- expression 0 operands: lhs = Counter(0), rhs = Expression(1, Add) +- expression 1 operands: lhs = Counter(1), rhs = Counter(2) +- expression 2 operands: lhs = Expression(0, Add), rhs = Counter(3) +- expression 3 operands: lhs = Counter(3), rhs = Expression(7, Add) +- expression 4 operands: lhs = Counter(4), rhs = Counter(5) +- expression 5 operands: lhs = Expression(6, Add), rhs = Counter(6) +- expression 6 operands: lhs = Counter(3), rhs = Expression(7, Add) +- expression 7 operands: lhs = Counter(4), rhs = Counter(5) +- expression 8 operands: lhs = Counter(6), rhs = Expression(12, Add) +- expression 9 operands: lhs = Counter(7), rhs = Counter(8) +- expression 10 operands: lhs = Expression(11, Add), rhs = Counter(9) +- expression 11 operands: lhs = Counter(6), rhs = Expression(12, Add) +- expression 12 operands: lhs = Counter(7), rhs = Counter(8) +- expression 13 operands: lhs = Counter(9), rhs = Expression(17, Add) +- expression 14 operands: lhs = Counter(10), rhs = Counter(11) +- expression 15 operands: lhs = Expression(16, Add), rhs = Counter(12) +- expression 16 operands: lhs = Counter(9), rhs = Expression(17, Add) +- expression 17 operands: lhs = Counter(10), rhs = Counter(11) +- expression 18 operands: lhs = Counter(12), rhs = Expression(23, Add) +- expression 19 operands: lhs = Counter(13), rhs = Counter(14) +- expression 20 operands: lhs = Expression(21, Add), rhs = Counter(15) +- expression 21 operands: lhs = Counter(12), rhs = Expression(23, Add) +- expression 22 operands: lhs = Counter(13), rhs = Counter(14) +- expression 23 operands: lhs = Counter(13), rhs = Counter(14) +- expression 24 operands: lhs = Counter(15), rhs = Counter(16) +- expression 25 operands: lhs = Expression(26, Add), rhs = Counter(17) +- expression 26 operands: lhs = Counter(15), rhs = Counter(16) +- expression 27 operands: lhs = Counter(18), rhs = Counter(17) +Number of file 0 mappings: 30 +- Code(Counter(0)) at (prev + 3, 1) to (start + 3, 18) +- Code(Expression(0, Add)) at (prev + 4, 14) to (start + 0, 19) + = (c0 + (c1 + c2)) +- Code(Expression(2, Sub)) at (prev + 1, 15) to (start + 0, 22) + = ((c0 + (c1 + c2)) - c3) +- Code(Counter(1)) at (prev + 2, 17) to (start + 0, 25) +- Code(Counter(2)) at (prev + 2, 18) to (start + 4, 14) +- Code(Expression(6, Add)) at (prev + 6, 14) to (start + 0, 19) + = (c3 + (c4 + c5)) +- Code(Expression(5, Sub)) at (prev + 1, 15) to (start + 0, 22) + = ((c3 + (c4 + c5)) - c6) +- Code(Counter(5)) at (prev + 1, 22) to (start + 2, 14) +- Code(Counter(4)) at (prev + 4, 17) to (start + 0, 25) +- Code(Counter(5)) at (prev + 3, 9) to (start + 0, 14) +- Code(Expression(11, Add)) at (prev + 2, 14) to (start + 0, 19) + = (c6 + (c7 + c8)) +- Code(Expression(10, Sub)) at (prev + 1, 15) to (start + 0, 22) + = ((c6 + (c7 + c8)) - c9) +- Code(Counter(7)) at (prev + 1, 21) to (start + 2, 14) +- Code(Counter(8)) at (prev + 4, 17) to (start + 0, 25) +- Code(Counter(7)) at (prev + 3, 9) to (start + 0, 14) +- Code(Expression(16, Add)) at (prev + 2, 14) to (start + 0, 19) + = (c9 + (c10 + c11)) +- Code(Expression(15, Sub)) at (prev + 1, 12) to (start + 0, 19) + = ((c9 + (c10 + c11)) - c12) +- Code(Counter(10)) at (prev + 1, 13) to (start + 0, 21) +- Code(Counter(11)) at (prev + 1, 10) to (start + 1, 14) +- Code(Expression(21, Add)) at (prev + 3, 14) to (start + 0, 19) + = (c12 + (c13 + c14)) +- Code(Expression(20, Sub)) at (prev + 1, 15) to (start + 0, 22) + = ((c12 + (c13 + c14)) - c15) +- Code(Counter(14)) at (prev + 1, 22) to (start + 2, 14) +- Code(Counter(13)) at (prev + 3, 18) to (start + 2, 14) +- Code(Expression(23, Add)) at (prev + 4, 9) to (start + 0, 14) + = (c13 + c14) +- Code(Expression(26, Add)) at (prev + 2, 14) to (start + 0, 19) + = (c15 + c16) +- Code(Expression(25, Sub)) at (prev + 1, 15) to (start + 0, 22) + = ((c15 + c16) - c17) +- Code(Counter(16)) at (prev + 1, 22) to (start + 2, 14) +- Code(Counter(18)) at (prev + 4, 17) to (start + 0, 22) +- Code(Counter(16)) at (prev + 3, 9) to (start + 0, 14) +- Code(Expression(27, Add)) at (prev + 2, 13) to (start + 1, 2) + = (c18 + c17) + diff --git a/tests/run-coverage/continue.coverage b/tests/coverage/continue.coverage index 4916cac00..4916cac00 100644 --- a/tests/run-coverage/continue.coverage +++ b/tests/coverage/continue.coverage diff --git a/tests/coverage-map/status-quo/continue.rs b/tests/coverage/continue.rs index 624aa9834..624aa9834 100644 --- a/tests/coverage-map/status-quo/continue.rs +++ b/tests/coverage/continue.rs diff --git a/tests/coverage/coroutine.cov-map b/tests/coverage/coroutine.cov-map new file mode 100644 index 000000000..2f4936d9a --- /dev/null +++ b/tests/coverage/coroutine.cov-map @@ -0,0 +1,53 @@ +Function name: coroutine::get_u32 +Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 0b, 01, 01, 0b, 05, 01, 0e, 00, 13, 02, 00, 1d, 00, 3c, 07, 01, 01, 00, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 2 +- expression 0 operands: lhs = Counter(0), rhs = Counter(1) +- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) +Number of file 0 mappings: 4 +- Code(Counter(0)) at (prev + 11, 1) to (start + 1, 11) +- Code(Counter(1)) at (prev + 1, 14) to (start + 0, 19) +- Code(Expression(0, Sub)) at (prev + 0, 29) to (start + 0, 60) + = (c0 - c1) +- Code(Expression(1, Add)) at (prev + 1, 1) to (start + 0, 2) + = (c1 + (c0 - c1)) + +Function name: coroutine::main +Raw bytes (65): 0x[01, 01, 08, 05, 07, 09, 0d, 11, 15, 1e, 19, 11, 15, 15, 19, 1e, 19, 11, 15, 09, 01, 0f, 01, 02, 16, 01, 07, 0b, 00, 2e, 11, 01, 2b, 00, 2d, 03, 01, 0e, 00, 35, 11, 02, 0b, 00, 2e, 1e, 01, 22, 00, 27, 1a, 00, 2c, 00, 2e, 17, 01, 0e, 00, 35, 1a, 02, 01, 00, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 8 +- expression 0 operands: lhs = Counter(1), rhs = Expression(1, Add) +- expression 1 operands: lhs = Counter(2), rhs = Counter(3) +- expression 2 operands: lhs = Counter(4), rhs = Counter(5) +- expression 3 operands: lhs = Expression(7, Sub), rhs = Counter(6) +- expression 4 operands: lhs = Counter(4), rhs = Counter(5) +- expression 5 operands: lhs = Counter(5), rhs = Counter(6) +- expression 6 operands: lhs = Expression(7, Sub), rhs = Counter(6) +- expression 7 operands: lhs = Counter(4), rhs = Counter(5) +Number of file 0 mappings: 9 +- Code(Counter(0)) at (prev + 15, 1) to (start + 2, 22) +- Code(Counter(0)) at (prev + 7, 11) to (start + 0, 46) +- Code(Counter(4)) at (prev + 1, 43) to (start + 0, 45) +- Code(Expression(0, Add)) at (prev + 1, 14) to (start + 0, 53) + = (c1 + (c2 + c3)) +- Code(Counter(4)) at (prev + 2, 11) to (start + 0, 46) +- Code(Expression(7, Sub)) at (prev + 1, 34) to (start + 0, 39) + = (c4 - c5) +- Code(Expression(6, Sub)) at (prev + 0, 44) to (start + 0, 46) + = ((c4 - c5) - c6) +- Code(Expression(5, Add)) at (prev + 1, 14) to (start + 0, 53) + = (c5 + c6) +- Code(Expression(6, Sub)) at (prev + 2, 1) to (start + 0, 2) + = ((c4 - c5) - c6) + +Function name: coroutine::main::{closure#0} +Raw bytes (14): 0x[01, 01, 00, 02, 01, 11, 1c, 01, 1f, 05, 02, 10, 01, 06] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 2 +- Code(Counter(0)) at (prev + 17, 28) to (start + 1, 31) +- Code(Counter(1)) at (prev + 2, 16) to (start + 1, 6) + diff --git a/tests/coverage/coroutine.coverage b/tests/coverage/coroutine.coverage new file mode 100644 index 000000000..3a9791a0d --- /dev/null +++ b/tests/coverage/coroutine.coverage @@ -0,0 +1,32 @@ + LL| |#![feature(coroutines, coroutine_trait)] + LL| | + LL| |use std::ops::{Coroutine, CoroutineState}; + LL| |use std::pin::Pin; + LL| | + LL| |// The following implementation of a function called from a `yield` statement + LL| |// (apparently requiring the Result and the `String` type or constructor) + LL| |// creates conditions where the `coroutine::StateTransform` MIR transform will + LL| |// drop all `Counter` `Coverage` statements from a MIR. `simplify.rs` has logic + LL| |// to handle this condition, and still report dead block coverage. + LL| 1|fn get_u32(val: bool) -> Result<u32, String> { + LL| 1| if val { Ok(1) } else { Err(String::from("some error")) } + ^0 + LL| 1|} + LL| | + LL| 1|fn main() { + LL| 1| let is_true = std::env::args().len() == 1; + LL| 1| let mut coroutine = || { + LL| 1| yield get_u32(is_true); + LL| 1| return "foo"; + LL| 1| }; + LL| | + LL| 1| match Pin::new(&mut coroutine).resume(()) { + LL| 1| CoroutineState::Yielded(Ok(1)) => {} + LL| 0| _ => panic!("unexpected return from resume"), + LL| | } + LL| 1| match Pin::new(&mut coroutine).resume(()) { + LL| 1| CoroutineState::Complete("foo") => {} + LL| 0| _ => panic!("unexpected return from resume"), + LL| | } + LL| 1|} + diff --git a/tests/coverage/coroutine.rs b/tests/coverage/coroutine.rs new file mode 100644 index 000000000..86d19af6f --- /dev/null +++ b/tests/coverage/coroutine.rs @@ -0,0 +1,30 @@ +#![feature(coroutines, coroutine_trait)] + +use std::ops::{Coroutine, CoroutineState}; +use std::pin::Pin; + +// The following implementation of a function called from a `yield` statement +// (apparently requiring the Result and the `String` type or constructor) +// creates conditions where the `coroutine::StateTransform` MIR transform will +// drop all `Counter` `Coverage` statements from a MIR. `simplify.rs` has logic +// to handle this condition, and still report dead block coverage. +fn get_u32(val: bool) -> Result<u32, String> { + if val { Ok(1) } else { Err(String::from("some error")) } +} + +fn main() { + let is_true = std::env::args().len() == 1; + let mut coroutine = || { + yield get_u32(is_true); + return "foo"; + }; + + match Pin::new(&mut coroutine).resume(()) { + CoroutineState::Yielded(Ok(1)) => {} + _ => panic!("unexpected return from resume"), + } + match Pin::new(&mut coroutine).resume(()) { + CoroutineState::Complete("foo") => {} + _ => panic!("unexpected return from resume"), + } +} diff --git a/tests/coverage-map/status-quo/dead_code.cov-map b/tests/coverage/dead_code.cov-map index 8d5f88e63..0b8a40a8c 100644 --- a/tests/coverage-map/status-quo/dead_code.cov-map +++ b/tests/coverage/dead_code.cov-map @@ -14,23 +14,23 @@ Number of file 0 mappings: 4 = (c1 + (c0 - c1)) Function name: dead_code::unused_fn (unused) -Raw bytes (24): 0x[01, 01, 00, 04, 01, 0f, 01, 07, 0f, 00, 07, 10, 02, 06, 00, 02, 06, 00, 07, 00, 01, 01, 00, 02] +Raw bytes (24): 0x[01, 01, 00, 04, 00, 0f, 01, 07, 0f, 00, 07, 10, 02, 06, 00, 02, 06, 00, 07, 00, 01, 01, 00, 02] Number of files: 1 - file 0 => global file 1 Number of expressions: 0 Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 15, 1) to (start + 7, 15) +- Code(Zero) at (prev + 15, 1) to (start + 7, 15) - Code(Zero) at (prev + 7, 16) to (start + 2, 6) - Code(Zero) at (prev + 2, 6) to (start + 0, 7) - Code(Zero) at (prev + 1, 1) to (start + 0, 2) Function name: dead_code::unused_pub_fn_not_in_library (unused) -Raw bytes (24): 0x[01, 01, 00, 04, 01, 03, 01, 07, 0f, 00, 07, 10, 02, 06, 00, 02, 06, 00, 07, 00, 01, 01, 00, 02] +Raw bytes (24): 0x[01, 01, 00, 04, 00, 03, 01, 07, 0f, 00, 07, 10, 02, 06, 00, 02, 06, 00, 07, 00, 01, 01, 00, 02] Number of files: 1 - file 0 => global file 1 Number of expressions: 0 Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 3, 1) to (start + 7, 15) +- Code(Zero) at (prev + 3, 1) to (start + 7, 15) - Code(Zero) at (prev + 7, 16) to (start + 2, 6) - Code(Zero) at (prev + 2, 6) to (start + 0, 7) - Code(Zero) at (prev + 1, 1) to (start + 0, 2) diff --git a/tests/run-coverage/dead_code.coverage b/tests/coverage/dead_code.coverage index c4ee9f23f..c4ee9f23f 100644 --- a/tests/run-coverage/dead_code.coverage +++ b/tests/coverage/dead_code.coverage diff --git a/tests/coverage-map/status-quo/dead_code.rs b/tests/coverage/dead_code.rs index 3492712a6..3492712a6 100644 --- a/tests/coverage-map/status-quo/dead_code.rs +++ b/tests/coverage/dead_code.rs diff --git a/tests/coverage-map/status-quo/drop_trait.cov-map b/tests/coverage/drop_trait.cov-map index 203d1048b..203d1048b 100644 --- a/tests/coverage-map/status-quo/drop_trait.cov-map +++ b/tests/coverage/drop_trait.cov-map diff --git a/tests/run-coverage/drop_trait.coverage b/tests/coverage/drop_trait.coverage index 2c9439a93..2c9439a93 100644 --- a/tests/run-coverage/drop_trait.coverage +++ b/tests/coverage/drop_trait.coverage diff --git a/tests/coverage-map/status-quo/drop_trait.rs b/tests/coverage/drop_trait.rs index 7b062719c..7b062719c 100644 --- a/tests/coverage-map/status-quo/drop_trait.rs +++ b/tests/coverage/drop_trait.rs diff --git a/tests/coverage/fn_sig_into_try.cov-map b/tests/coverage/fn_sig_into_try.cov-map new file mode 100644 index 000000000..6e26c61aa --- /dev/null +++ b/tests/coverage/fn_sig_into_try.cov-map @@ -0,0 +1,53 @@ +Function name: fn_sig_into_try::a +Raw bytes (9): 0x[01, 01, 00, 01, 01, 0a, 01, 04, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 10, 1) to (start + 4, 2) + +Function name: fn_sig_into_try::b +Raw bytes (28): 0x[01, 01, 02, 01, 00, 00, 02, 04, 01, 10, 01, 02, 0f, 00, 02, 0f, 00, 10, 02, 01, 05, 00, 0c, 07, 01, 01, 00, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 2 +- expression 0 operands: lhs = Counter(0), rhs = Zero +- expression 1 operands: lhs = Zero, rhs = Expression(0, Sub) +Number of file 0 mappings: 4 +- Code(Counter(0)) at (prev + 16, 1) to (start + 2, 15) +- Code(Zero) at (prev + 2, 15) to (start + 0, 16) +- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 12) + = (c0 - Zero) +- Code(Expression(1, Add)) at (prev + 1, 1) to (start + 0, 2) + = (Zero + (c0 - Zero)) + +Function name: fn_sig_into_try::c +Raw bytes (28): 0x[01, 01, 02, 01, 00, 00, 02, 04, 01, 16, 01, 02, 17, 00, 02, 17, 00, 18, 02, 01, 05, 00, 0c, 07, 01, 01, 00, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 2 +- expression 0 operands: lhs = Counter(0), rhs = Zero +- expression 1 operands: lhs = Zero, rhs = Expression(0, Sub) +Number of file 0 mappings: 4 +- Code(Counter(0)) at (prev + 22, 1) to (start + 2, 23) +- Code(Zero) at (prev + 2, 23) to (start + 0, 24) +- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 12) + = (c0 - Zero) +- Code(Expression(1, Add)) at (prev + 1, 1) to (start + 0, 2) + = (Zero + (c0 - Zero)) + +Function name: fn_sig_into_try::d +Raw bytes (28): 0x[01, 01, 02, 01, 00, 00, 02, 04, 01, 1c, 01, 03, 0f, 00, 03, 0f, 00, 10, 02, 01, 05, 00, 0c, 07, 01, 01, 00, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 2 +- expression 0 operands: lhs = Counter(0), rhs = Zero +- expression 1 operands: lhs = Zero, rhs = Expression(0, Sub) +Number of file 0 mappings: 4 +- Code(Counter(0)) at (prev + 28, 1) to (start + 3, 15) +- Code(Zero) at (prev + 3, 15) to (start + 0, 16) +- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 12) + = (c0 - Zero) +- Code(Expression(1, Add)) at (prev + 1, 1) to (start + 0, 2) + = (Zero + (c0 - Zero)) + diff --git a/tests/coverage/fn_sig_into_try.coverage b/tests/coverage/fn_sig_into_try.coverage new file mode 100644 index 000000000..f1ddb1da7 --- /dev/null +++ b/tests/coverage/fn_sig_into_try.coverage @@ -0,0 +1,45 @@ + LL| |#![feature(coverage_attribute)] + LL| |// compile-flags: --edition=2021 + LL| | + LL| |// Regression test for inconsistent handling of function signature spans that + LL| |// are followed by code using the `?` operator. + LL| |// + LL| |// For each of these similar functions, the line containing the function + LL| |// signature should be handled in the same way. + LL| | + LL| 1|fn a() -> Option<i32> + LL| 1|{ + LL| 1| Some(7i32); + LL| 1| Some(0) + LL| 1|} + LL| | + LL| 1|fn b() -> Option<i32> + LL| 1|{ + LL| 1| Some(7i32)?; + ^0 + LL| 1| Some(0) + LL| 1|} + LL| | + LL| 1|fn c() -> Option<i32> + LL| 1|{ + LL| 1| let _ = Some(7i32)?; + ^0 + LL| 1| Some(0) + LL| 1|} + LL| | + LL| 1|fn d() -> Option<i32> + LL| 1|{ + LL| 1| let _: () = (); + LL| 1| Some(7i32)?; + ^0 + LL| 1| Some(0) + LL| 1|} + LL| | + LL| |#[coverage(off)] + LL| |fn main() { + LL| | a(); + LL| | b(); + LL| | c(); + LL| | d(); + LL| |} + diff --git a/tests/coverage/fn_sig_into_try.rs b/tests/coverage/fn_sig_into_try.rs new file mode 100644 index 000000000..92850c8a1 --- /dev/null +++ b/tests/coverage/fn_sig_into_try.rs @@ -0,0 +1,41 @@ +#![feature(coverage_attribute)] +// compile-flags: --edition=2021 + +// Regression test for inconsistent handling of function signature spans that +// are followed by code using the `?` operator. +// +// For each of these similar functions, the line containing the function +// signature should be handled in the same way. + +fn a() -> Option<i32> +{ + Some(7i32); + Some(0) +} + +fn b() -> Option<i32> +{ + Some(7i32)?; + Some(0) +} + +fn c() -> Option<i32> +{ + let _ = Some(7i32)?; + Some(0) +} + +fn d() -> Option<i32> +{ + let _: () = (); + Some(7i32)?; + Some(0) +} + +#[coverage(off)] +fn main() { + a(); + b(); + c(); + d(); +} diff --git a/tests/coverage-map/status-quo/generics.cov-map b/tests/coverage/generics.cov-map index 6079a433c..6079a433c 100644 --- a/tests/coverage-map/status-quo/generics.cov-map +++ b/tests/coverage/generics.cov-map diff --git a/tests/run-coverage/generics.coverage b/tests/coverage/generics.coverage index 098391835..098391835 100644 --- a/tests/run-coverage/generics.coverage +++ b/tests/coverage/generics.coverage diff --git a/tests/coverage-map/status-quo/generics.rs b/tests/coverage/generics.rs index bf4c2d8d6..bf4c2d8d6 100644 --- a/tests/coverage-map/status-quo/generics.rs +++ b/tests/coverage/generics.rs diff --git a/tests/coverage-map/status-quo/if.cov-map b/tests/coverage/if.cov-map index 391a69e0e..391a69e0e 100644 --- a/tests/coverage-map/status-quo/if.cov-map +++ b/tests/coverage/if.cov-map diff --git a/tests/run-coverage/if.coverage b/tests/coverage/if.coverage index 2e6845190..2e6845190 100644 --- a/tests/run-coverage/if.coverage +++ b/tests/coverage/if.coverage diff --git a/tests/coverage-map/status-quo/if.rs b/tests/coverage/if.rs index 8ad5042ff..8ad5042ff 100644 --- a/tests/coverage-map/status-quo/if.rs +++ b/tests/coverage/if.rs diff --git a/tests/coverage-map/status-quo/if_else.cov-map b/tests/coverage/if_else.cov-map index da692ca3a..da692ca3a 100644 --- a/tests/coverage-map/status-quo/if_else.cov-map +++ b/tests/coverage/if_else.cov-map diff --git a/tests/run-coverage/if_else.coverage b/tests/coverage/if_else.coverage index 0274401f0..0274401f0 100644 --- a/tests/run-coverage/if_else.coverage +++ b/tests/coverage/if_else.coverage diff --git a/tests/coverage-map/status-quo/if_else.rs b/tests/coverage/if_else.rs index 3244e1e3a..3244e1e3a 100644 --- a/tests/coverage-map/status-quo/if_else.rs +++ b/tests/coverage/if_else.rs diff --git a/tests/coverage/inline-dead.cov-map b/tests/coverage/inline-dead.cov-map new file mode 100644 index 000000000..958b423f2 --- /dev/null +++ b/tests/coverage/inline-dead.cov-map @@ -0,0 +1,45 @@ +Function name: inline_dead::dead (unused) +Raw bytes (9): 0x[01, 01, 00, 01, 00, 19, 01, 02, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Zero) at (prev + 25, 1) to (start + 2, 2) + +Function name: inline_dead::live::<false> +Raw bytes (28): 0x[01, 01, 02, 01, 00, 00, 02, 04, 01, 10, 01, 01, 09, 00, 02, 09, 00, 0f, 02, 02, 09, 00, 0a, 07, 02, 01, 00, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 2 +- expression 0 operands: lhs = Counter(0), rhs = Zero +- expression 1 operands: lhs = Zero, rhs = Expression(0, Sub) +Number of file 0 mappings: 4 +- Code(Counter(0)) at (prev + 16, 1) to (start + 1, 9) +- Code(Zero) at (prev + 2, 9) to (start + 0, 15) +- Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 10) + = (c0 - Zero) +- Code(Expression(1, Add)) at (prev + 2, 1) to (start + 0, 2) + = (Zero + (c0 - Zero)) + +Function name: inline_dead::main +Raw bytes (14): 0x[01, 01, 00, 02, 01, 04, 01, 03, 0d, 01, 07, 06, 02, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 2 +- Code(Counter(0)) at (prev + 4, 1) to (start + 3, 13) +- Code(Counter(0)) at (prev + 7, 6) to (start + 2, 2) + +Function name: inline_dead::main::{closure#0} +Raw bytes (23): 0x[01, 01, 02, 00, 06, 01, 00, 03, 01, 07, 17, 00, 18, 00, 02, 0d, 00, 0e, 03, 02, 05, 00, 06] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 2 +- expression 0 operands: lhs = Zero, rhs = Expression(1, Sub) +- expression 1 operands: lhs = Counter(0), rhs = Zero +Number of file 0 mappings: 3 +- Code(Counter(0)) at (prev + 7, 23) to (start + 0, 24) +- Code(Zero) at (prev + 2, 13) to (start + 0, 14) +- Code(Expression(0, Add)) at (prev + 2, 5) to (start + 0, 6) + = (Zero + (c0 - Zero)) + diff --git a/tests/run-coverage/inline-dead.coverage b/tests/coverage/inline-dead.coverage index de96aa17a..de96aa17a 100644 --- a/tests/run-coverage/inline-dead.coverage +++ b/tests/coverage/inline-dead.coverage diff --git a/tests/coverage-map/status-quo/inline-dead.rs b/tests/coverage/inline-dead.rs index 854fa0629..854fa0629 100644 --- a/tests/coverage-map/status-quo/inline-dead.rs +++ b/tests/coverage/inline-dead.rs diff --git a/tests/coverage/inline.cov-map b/tests/coverage/inline.cov-map new file mode 100644 index 000000000..72b10fd0c --- /dev/null +++ b/tests/coverage/inline.cov-map @@ -0,0 +1,78 @@ +Function name: inline::display::<char> +Raw bytes (33): 0x[01, 01, 02, 01, 05, 03, 05, 05, 01, 29, 01, 00, 22, 05, 01, 09, 00, 0a, 03, 00, 0e, 00, 10, 05, 00, 11, 02, 06, 06, 03, 05, 01, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 2 +- expression 0 operands: lhs = Counter(0), rhs = Counter(1) +- expression 1 operands: lhs = Expression(0, Add), rhs = Counter(1) +Number of file 0 mappings: 5 +- Code(Counter(0)) at (prev + 41, 1) to (start + 0, 34) +- Code(Counter(1)) at (prev + 1, 9) to (start + 0, 10) +- Code(Expression(0, Add)) at (prev + 0, 14) to (start + 0, 16) + = (c0 + c1) +- Code(Counter(1)) at (prev + 0, 17) to (start + 2, 6) +- Code(Expression(1, Sub)) at (prev + 3, 5) to (start + 1, 2) + = ((c0 + c1) - c1) + +Function name: inline::error +Raw bytes (9): 0x[01, 01, 00, 01, 01, 31, 01, 02, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 49, 1) to (start + 2, 2) + +Function name: inline::length::<char> +Raw bytes (9): 0x[01, 01, 00, 01, 01, 1e, 01, 02, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 30, 1) to (start + 2, 2) + +Function name: inline::main +Raw bytes (9): 0x[01, 01, 00, 01, 01, 05, 01, 02, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 5, 1) to (start + 2, 2) + +Function name: inline::permutate::<char> +Raw bytes (52): 0x[01, 01, 04, 01, 05, 02, 0d, 05, 0f, 09, 0d, 08, 01, 0f, 01, 02, 0e, 05, 02, 0f, 02, 06, 02, 02, 0f, 00, 14, 11, 01, 0d, 00, 0e, 06, 00, 12, 00, 16, 11, 00, 17, 04, 0a, 0d, 05, 0c, 02, 06, 0b, 03, 01, 00, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 4 +- expression 0 operands: lhs = Counter(0), rhs = Counter(1) +- expression 1 operands: lhs = Expression(0, Sub), rhs = Counter(3) +- expression 2 operands: lhs = Counter(1), rhs = Expression(3, Add) +- expression 3 operands: lhs = Counter(2), rhs = Counter(3) +Number of file 0 mappings: 8 +- Code(Counter(0)) at (prev + 15, 1) to (start + 2, 14) +- Code(Counter(1)) at (prev + 2, 15) to (start + 2, 6) +- Code(Expression(0, Sub)) at (prev + 2, 15) to (start + 0, 20) + = (c0 - c1) +- Code(Counter(4)) at (prev + 1, 13) to (start + 0, 14) +- Code(Expression(1, Sub)) at (prev + 0, 18) to (start + 0, 22) + = ((c0 - c1) - c3) +- Code(Counter(4)) at (prev + 0, 23) to (start + 4, 10) +- Code(Counter(3)) at (prev + 5, 12) to (start + 2, 6) +- Code(Expression(2, Add)) at (prev + 3, 1) to (start + 0, 2) + = (c1 + (c2 + c3)) + +Function name: inline::permutations::<char> +Raw bytes (9): 0x[01, 01, 00, 01, 01, 0a, 01, 03, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 10, 1) to (start + 3, 2) + +Function name: inline::swap::<char> +Raw bytes (9): 0x[01, 01, 00, 01, 01, 23, 01, 04, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 35, 1) to (start + 4, 2) + diff --git a/tests/run-coverage/inline.coverage b/tests/coverage/inline.coverage index 6efd9a083..6efd9a083 100644 --- a/tests/run-coverage/inline.coverage +++ b/tests/coverage/inline.coverage diff --git a/tests/coverage-map/status-quo/inline.rs b/tests/coverage/inline.rs index 9cfab9ddb..9cfab9ddb 100644 --- a/tests/coverage-map/status-quo/inline.rs +++ b/tests/coverage/inline.rs diff --git a/tests/coverage-map/status-quo/inner_items.cov-map b/tests/coverage/inner_items.cov-map index 3f39d74ef..3f39d74ef 100644 --- a/tests/coverage-map/status-quo/inner_items.cov-map +++ b/tests/coverage/inner_items.cov-map diff --git a/tests/run-coverage/inner_items.coverage b/tests/coverage/inner_items.coverage index 65493bcd9..65493bcd9 100644 --- a/tests/run-coverage/inner_items.coverage +++ b/tests/coverage/inner_items.coverage diff --git a/tests/coverage-map/status-quo/inner_items.rs b/tests/coverage/inner_items.rs index bcb62b303..bcb62b303 100644 --- a/tests/coverage-map/status-quo/inner_items.rs +++ b/tests/coverage/inner_items.rs diff --git a/tests/coverage-map/status-quo/issue-83601.cov-map b/tests/coverage/issue-83601.cov-map index f5db3a897..f5db3a897 100644 --- a/tests/coverage-map/status-quo/issue-83601.cov-map +++ b/tests/coverage/issue-83601.cov-map diff --git a/tests/run-coverage/issue-83601.coverage b/tests/coverage/issue-83601.coverage index 7995332ca..7995332ca 100644 --- a/tests/run-coverage/issue-83601.coverage +++ b/tests/coverage/issue-83601.coverage diff --git a/tests/coverage-map/status-quo/issue-83601.rs b/tests/coverage/issue-83601.rs index 0b72a8194..0b72a8194 100644 --- a/tests/coverage-map/status-quo/issue-83601.rs +++ b/tests/coverage/issue-83601.rs diff --git a/tests/coverage-map/status-quo/issue-84561.cov-map b/tests/coverage/issue-84561.cov-map index fe098fd39..82582b309 100644 --- a/tests/coverage-map/status-quo/issue-84561.cov-map +++ b/tests/coverage/issue-84561.cov-map @@ -1,22 +1,21 @@ Function name: <issue_84561::Foo as core::cmp::PartialEq>::eq -Raw bytes (14): 0x[01, 01, 00, 02, 01, 04, 0a, 00, 13, 00, 00, 0a, 00, 13] +Raw bytes (9): 0x[01, 01, 00, 01, 01, 04, 0a, 00, 13] Number of files: 1 - file 0 => global file 1 Number of expressions: 0 -Number of file 0 mappings: 2 +Number of file 0 mappings: 1 - Code(Counter(0)) at (prev + 4, 10) to (start + 0, 19) -- Code(Zero) at (prev + 0, 10) to (start + 0, 19) Function name: <issue_84561::Foo as core::fmt::Debug>::fmt -Raw bytes (29): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 89, 01, 09, 00, 25, 05, 00, 25, 00, 26, 02, 01, 09, 00, 0f, 07, 01, 05, 00, 06] +Raw bytes (29): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 88, 01, 05, 01, 25, 05, 01, 25, 00, 26, 02, 01, 09, 00, 0f, 07, 01, 05, 00, 06] Number of files: 1 - file 0 => global file 1 Number of expressions: 2 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) - expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 137, 9) to (start + 0, 37) -- Code(Counter(1)) at (prev + 0, 37) to (start + 0, 38) +- Code(Counter(0)) at (prev + 136, 5) to (start + 1, 37) +- Code(Counter(1)) at (prev + 1, 37) to (start + 0, 38) - Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 15) = (c0 - c1) - Code(Expression(1, Add)) at (prev + 1, 5) to (start + 0, 6) @@ -86,47 +85,47 @@ Number of file 0 mappings: 1 - Code(Counter(0)) at (prev + 165, 9) to (start + 2, 10) Function name: issue_84561::test3 -Raw bytes (437): 0x[01, 01, 41, 05, 09, 0d, 11, 15, 19, 12, 1d, 15, 19, 21, 25, 1e, 29, 21, 25, 31, 39, 3d, 41, 2e, 45, 3d, 41, 42, 49, 45, 4d, 3f, 51, 42, 49, 45, 4d, 5d, 8a, 01, 8f, 01, 5d, 92, 01, 55, 51, 59, 92, 01, 55, 51, 59, 8f, 01, 5d, 92, 01, 55, 51, 59, 87, 01, 61, 5d, 8a, 01, 8f, 01, 5d, 92, 01, 55, 51, 59, 82, 01, 65, 87, 01, 61, 5d, 8a, 01, 8f, 01, 5d, 92, 01, 55, 51, 59, 75, f6, 01, fb, 01, 79, 71, fe, 01, 82, 02, 71, 69, 6d, 71, fe, 01, 82, 02, 71, 69, 6d, 69, 6d, 82, 02, 71, 69, 6d, fb, 01, 79, 71, fe, 01, 82, 02, 71, 69, 6d, f3, 01, 7d, 75, f6, 01, fb, 01, 79, 71, fe, 01, 82, 02, 71, 69, 6d, ee, 01, 81, 01, f3, 01, 7d, 75, f6, 01, fb, 01, 79, 71, fe, 01, 82, 02, 71, 69, 6d, 33, 01, 06, 01, 03, 1c, 05, 04, 09, 01, 1c, 02, 02, 05, 04, 1f, 0d, 05, 05, 00, 1f, 06, 01, 05, 00, 1f, 15, 01, 09, 01, 1c, 12, 02, 05, 00, 1f, 0e, 01, 05, 00, 0f, 00, 00, 20, 00, 30, 21, 01, 05, 03, 0f, 00, 03, 20, 00, 30, 00, 00, 33, 00, 41, 00, 00, 4b, 00, 5a, 1e, 01, 05, 00, 0f, 00, 05, 09, 03, 10, 00, 05, 0d, 00, 1b, 00, 02, 0d, 00, 1c, 1a, 04, 09, 05, 06, 31, 06, 05, 03, 06, 22, 04, 05, 03, 06, 3d, 04, 09, 04, 06, 2e, 05, 08, 00, 0f, 45, 01, 09, 03, 0a, 2a, 05, 09, 03, 0a, 3f, 05, 08, 00, 0f, 51, 01, 09, 00, 13, 00, 03, 0d, 00, 1d, 3a, 03, 09, 00, 13, 00, 03, 0d, 00, 1d, 87, 01, 03, 05, 00, 0f, 8f, 01, 01, 0c, 00, 13, 5d, 01, 0d, 00, 13, 8a, 01, 02, 0d, 00, 13, 82, 01, 04, 05, 02, 13, 65, 03, 0d, 00, 13, 7e, 02, 0d, 00, 13, f3, 01, 03, 05, 00, 0f, 69, 01, 0c, 00, 13, 6d, 01, 0d, 03, 0e, 75, 04, 0d, 00, 13, fb, 01, 02, 0d, 00, 17, 82, 02, 01, 14, 00, 1b, 71, 01, 15, 00, 1b, fe, 01, 02, 15, 00, 1b, f6, 01, 04, 0d, 00, 13, 7d, 03, 09, 00, 19, ee, 01, 02, 05, 00, 0f, ea, 01, 03, 09, 00, 22, 00, 02, 05, 00, 0f, 00, 03, 09, 00, 2c, 00, 02, 01, 00, 02] +Raw bytes (436): 0x[01, 01, 41, 05, 09, 0d, 00, 15, 19, 12, 00, 15, 19, 21, 00, 1e, 00, 21, 00, 31, 00, 3d, 41, 2e, 45, 3d, 41, 42, 49, 45, 00, 3f, 51, 42, 49, 45, 00, 5d, 8a, 01, 8f, 01, 5d, 92, 01, 55, 51, 00, 92, 01, 55, 51, 00, 8f, 01, 5d, 92, 01, 55, 51, 00, 87, 01, 61, 5d, 8a, 01, 8f, 01, 5d, 92, 01, 55, 51, 00, 82, 01, 65, 87, 01, 61, 5d, 8a, 01, 8f, 01, 5d, 92, 01, 55, 51, 00, 75, f6, 01, fb, 01, 79, 71, fe, 01, 82, 02, 71, 69, 6d, 71, fe, 01, 82, 02, 71, 69, 6d, 69, 6d, 82, 02, 71, 69, 6d, fb, 01, 79, 71, fe, 01, 82, 02, 71, 69, 6d, f3, 01, 7d, 75, f6, 01, fb, 01, 79, 71, fe, 01, 82, 02, 71, 69, 6d, ee, 01, 00, f3, 01, 7d, 75, f6, 01, fb, 01, 79, 71, fe, 01, 82, 02, 71, 69, 6d, 33, 01, 06, 01, 03, 1c, 05, 04, 09, 01, 1c, 02, 02, 05, 04, 1f, 0d, 05, 05, 00, 1f, 06, 01, 05, 00, 1f, 15, 01, 09, 01, 1c, 12, 02, 05, 00, 1f, 0e, 01, 05, 00, 0f, 00, 00, 20, 00, 30, 21, 01, 05, 03, 0f, 00, 03, 20, 00, 30, 00, 00, 33, 00, 41, 00, 00, 4b, 00, 5a, 1e, 01, 05, 00, 0f, 00, 05, 09, 03, 10, 00, 05, 0d, 00, 1b, 00, 02, 0d, 00, 1c, 1a, 04, 09, 05, 06, 31, 06, 05, 03, 06, 22, 04, 05, 03, 06, 3d, 04, 09, 04, 06, 2e, 05, 08, 00, 0f, 45, 01, 09, 03, 0a, 2a, 05, 09, 03, 0a, 3f, 05, 08, 00, 0f, 51, 01, 09, 00, 13, 00, 03, 0d, 00, 1d, 3a, 03, 09, 00, 13, 00, 03, 0d, 00, 1d, 87, 01, 03, 05, 00, 0f, 8f, 01, 01, 0c, 00, 13, 5d, 01, 0d, 00, 13, 8a, 01, 02, 0d, 00, 13, 82, 01, 04, 05, 02, 13, 65, 03, 0d, 00, 13, 7e, 02, 0d, 00, 13, f3, 01, 03, 05, 00, 0f, 69, 01, 0c, 00, 13, 6d, 01, 0d, 03, 0e, 75, 04, 0d, 00, 13, fb, 01, 02, 0d, 00, 17, 82, 02, 01, 14, 00, 1b, 71, 01, 15, 00, 1b, fe, 01, 02, 15, 00, 1b, f6, 01, 04, 0d, 00, 13, 7d, 03, 09, 00, 19, ee, 01, 02, 05, 00, 0f, ea, 01, 03, 09, 00, 22, 00, 02, 05, 00, 0f, 00, 03, 09, 00, 2c, 00, 02, 01, 00, 02] Number of files: 1 - file 0 => global file 1 Number of expressions: 65 - expression 0 operands: lhs = Counter(1), rhs = Counter(2) -- expression 1 operands: lhs = Counter(3), rhs = Counter(4) +- expression 1 operands: lhs = Counter(3), rhs = Zero - expression 2 operands: lhs = Counter(5), rhs = Counter(6) -- expression 3 operands: lhs = Expression(4, Sub), rhs = Counter(7) +- expression 3 operands: lhs = Expression(4, Sub), rhs = Zero - expression 4 operands: lhs = Counter(5), rhs = Counter(6) -- expression 5 operands: lhs = Counter(8), rhs = Counter(9) -- expression 6 operands: lhs = Expression(7, Sub), rhs = Counter(10) -- expression 7 operands: lhs = Counter(8), rhs = Counter(9) -- expression 8 operands: lhs = Counter(12), rhs = Counter(14) +- expression 5 operands: lhs = Counter(8), rhs = Zero +- expression 6 operands: lhs = Expression(7, Sub), rhs = Zero +- expression 7 operands: lhs = Counter(8), rhs = Zero +- expression 8 operands: lhs = Counter(12), rhs = Zero - expression 9 operands: lhs = Counter(15), rhs = Counter(16) - expression 10 operands: lhs = Expression(11, Sub), rhs = Counter(17) - expression 11 operands: lhs = Counter(15), rhs = Counter(16) - expression 12 operands: lhs = Expression(16, Sub), rhs = Counter(18) -- expression 13 operands: lhs = Counter(17), rhs = Counter(19) +- expression 13 operands: lhs = Counter(17), rhs = Zero - expression 14 operands: lhs = Expression(15, Add), rhs = Counter(20) - expression 15 operands: lhs = Expression(16, Sub), rhs = Counter(18) -- expression 16 operands: lhs = Counter(17), rhs = Counter(19) +- expression 16 operands: lhs = Counter(17), rhs = Zero - expression 17 operands: lhs = Counter(23), rhs = Expression(34, Sub) - expression 18 operands: lhs = Expression(35, Add), rhs = Counter(23) - expression 19 operands: lhs = Expression(36, Sub), rhs = Counter(21) -- expression 20 operands: lhs = Counter(20), rhs = Counter(22) +- expression 20 operands: lhs = Counter(20), rhs = Zero - expression 21 operands: lhs = Expression(36, Sub), rhs = Counter(21) -- expression 22 operands: lhs = Counter(20), rhs = Counter(22) +- expression 22 operands: lhs = Counter(20), rhs = Zero - expression 23 operands: lhs = Expression(35, Add), rhs = Counter(23) - expression 24 operands: lhs = Expression(36, Sub), rhs = Counter(21) -- expression 25 operands: lhs = Counter(20), rhs = Counter(22) +- expression 25 operands: lhs = Counter(20), rhs = Zero - expression 26 operands: lhs = Expression(33, Add), rhs = Counter(24) - expression 27 operands: lhs = Counter(23), rhs = Expression(34, Sub) - expression 28 operands: lhs = Expression(35, Add), rhs = Counter(23) - expression 29 operands: lhs = Expression(36, Sub), rhs = Counter(21) -- expression 30 operands: lhs = Counter(20), rhs = Counter(22) +- expression 30 operands: lhs = Counter(20), rhs = Zero - expression 31 operands: lhs = Expression(32, Sub), rhs = Counter(25) - expression 32 operands: lhs = Expression(33, Add), rhs = Counter(24) - expression 33 operands: lhs = Counter(23), rhs = Expression(34, Sub) - expression 34 operands: lhs = Expression(35, Add), rhs = Counter(23) - expression 35 operands: lhs = Expression(36, Sub), rhs = Counter(21) -- expression 36 operands: lhs = Counter(20), rhs = Counter(22) +- expression 36 operands: lhs = Counter(20), rhs = Zero - expression 37 operands: lhs = Counter(29), rhs = Expression(61, Sub) - expression 38 operands: lhs = Expression(62, Add), rhs = Counter(30) - expression 39 operands: lhs = Counter(28), rhs = Expression(63, Sub) @@ -148,7 +147,7 @@ Number of expressions: 65 - expression 55 operands: lhs = Counter(28), rhs = Expression(63, Sub) - expression 56 operands: lhs = Expression(64, Sub), rhs = Counter(28) - expression 57 operands: lhs = Counter(26), rhs = Counter(27) -- expression 58 operands: lhs = Expression(59, Sub), rhs = Counter(32) +- expression 58 operands: lhs = Expression(59, Sub), rhs = Zero - expression 59 operands: lhs = Expression(60, Add), rhs = Counter(31) - expression 60 operands: lhs = Counter(29), rhs = Expression(61, Sub) - expression 61 operands: lhs = Expression(62, Add), rhs = Counter(30) @@ -162,27 +161,27 @@ Number of file 0 mappings: 51 = (c1 - c2) - Code(Counter(3)) at (prev + 5, 5) to (start + 0, 31) - Code(Expression(1, Sub)) at (prev + 1, 5) to (start + 0, 31) - = (c3 - c4) + = (c3 - Zero) - Code(Counter(5)) at (prev + 1, 9) to (start + 1, 28) - Code(Expression(4, Sub)) at (prev + 2, 5) to (start + 0, 31) = (c5 - c6) - Code(Expression(3, Sub)) at (prev + 1, 5) to (start + 0, 15) - = ((c5 - c6) - c7) + = ((c5 - c6) - Zero) - Code(Zero) at (prev + 0, 32) to (start + 0, 48) - Code(Counter(8)) at (prev + 1, 5) to (start + 3, 15) - Code(Zero) at (prev + 3, 32) to (start + 0, 48) - Code(Zero) at (prev + 0, 51) to (start + 0, 65) - Code(Zero) at (prev + 0, 75) to (start + 0, 90) - Code(Expression(7, Sub)) at (prev + 1, 5) to (start + 0, 15) - = (c8 - c9) + = (c8 - Zero) - Code(Zero) at (prev + 5, 9) to (start + 3, 16) - Code(Zero) at (prev + 5, 13) to (start + 0, 27) - Code(Zero) at (prev + 2, 13) to (start + 0, 28) - Code(Expression(6, Sub)) at (prev + 4, 9) to (start + 5, 6) - = ((c8 - c9) - c10) + = ((c8 - Zero) - Zero) - Code(Counter(12)) at (prev + 6, 5) to (start + 3, 6) - Code(Expression(8, Sub)) at (prev + 4, 5) to (start + 3, 6) - = (c12 - c14) + = (c12 - Zero) - Code(Counter(15)) at (prev + 4, 9) to (start + 4, 6) - Code(Expression(11, Sub)) at (prev + 5, 8) to (start + 0, 15) = (c15 - c16) @@ -190,24 +189,24 @@ Number of file 0 mappings: 51 - Code(Expression(10, Sub)) at (prev + 5, 9) to (start + 3, 10) = ((c15 - c16) - c17) - Code(Expression(15, Add)) at (prev + 5, 8) to (start + 0, 15) - = ((c17 - c19) + c18) + = ((c17 - Zero) + c18) - Code(Counter(20)) at (prev + 1, 9) to (start + 0, 19) - Code(Zero) at (prev + 3, 13) to (start + 0, 29) - Code(Expression(14, Sub)) at (prev + 3, 9) to (start + 0, 19) - = (((c17 - c19) + c18) - c20) + = (((c17 - Zero) + c18) - c20) - Code(Zero) at (prev + 3, 13) to (start + 0, 29) - Code(Expression(33, Add)) at (prev + 3, 5) to (start + 0, 15) - = (c23 + (((c20 - c22) + c21) - c23)) + = (c23 + (((c20 - Zero) + c21) - c23)) - Code(Expression(35, Add)) at (prev + 1, 12) to (start + 0, 19) - = ((c20 - c22) + c21) + = ((c20 - Zero) + c21) - Code(Counter(23)) at (prev + 1, 13) to (start + 0, 19) - Code(Expression(34, Sub)) at (prev + 2, 13) to (start + 0, 19) - = (((c20 - c22) + c21) - c23) + = (((c20 - Zero) + c21) - c23) - Code(Expression(32, Sub)) at (prev + 4, 5) to (start + 2, 19) - = ((c23 + (((c20 - c22) + c21) - c23)) - c24) + = ((c23 + (((c20 - Zero) + c21) - c23)) - c24) - Code(Counter(25)) at (prev + 3, 13) to (start + 0, 19) - Code(Expression(31, Sub)) at (prev + 2, 13) to (start + 0, 19) - = (((c23 + (((c20 - c22) + c21) - c23)) - c24) - c25) + = (((c23 + (((c20 - Zero) + c21) - c23)) - c24) - c25) - Code(Expression(60, Add)) at (prev + 3, 5) to (start + 0, 15) = (c29 + ((c28 + ((c26 - c27) - c28)) - c30)) - Code(Counter(26)) at (prev + 1, 12) to (start + 0, 19) @@ -226,7 +225,7 @@ Number of file 0 mappings: 51 - Code(Expression(59, Sub)) at (prev + 2, 5) to (start + 0, 15) = ((c29 + ((c28 + ((c26 - c27) - c28)) - c30)) - c31) - Code(Expression(58, Sub)) at (prev + 3, 9) to (start + 0, 34) - = (((c29 + ((c28 + ((c26 - c27) - c28)) - c30)) - c31) - c32) + = (((c29 + ((c28 + ((c26 - c27) - c28)) - c30)) - c31) - Zero) - Code(Zero) at (prev + 2, 5) to (start + 0, 15) - Code(Zero) at (prev + 3, 9) to (start + 0, 44) - Code(Zero) at (prev + 2, 1) to (start + 0, 2) diff --git a/tests/run-coverage/issue-84561.coverage b/tests/coverage/issue-84561.coverage index 222f877d3..e693866e2 100644 --- a/tests/run-coverage/issue-84561.coverage +++ b/tests/coverage/issue-84561.coverage @@ -135,7 +135,7 @@ LL| 0|} LL| | LL| |impl std::fmt::Debug for Foo { - LL| | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + LL| 7| fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { LL| 7| write!(f, "try and succeed")?; ^0 LL| 7| Ok(()) diff --git a/tests/coverage-map/status-quo/issue-84561.rs b/tests/coverage/issue-84561.rs index facf5b5b4..facf5b5b4 100644 --- a/tests/coverage-map/status-quo/issue-84561.rs +++ b/tests/coverage/issue-84561.rs diff --git a/tests/coverage/issue-85461.cov-map b/tests/coverage/issue-85461.cov-map new file mode 100644 index 000000000..d1c449b9a --- /dev/null +++ b/tests/coverage/issue-85461.cov-map @@ -0,0 +1,8 @@ +Function name: issue_85461::main +Raw bytes (9): 0x[01, 01, 00, 01, 01, 08, 01, 03, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 8, 1) to (start + 3, 2) + diff --git a/tests/run-coverage/issue-85461.coverage b/tests/coverage/issue-85461.coverage index cbc910664..cbc910664 100644 --- a/tests/run-coverage/issue-85461.coverage +++ b/tests/coverage/issue-85461.coverage diff --git a/tests/run-coverage/issue-85461.rs b/tests/coverage/issue-85461.rs index 9d4c90a82..9d4c90a82 100644 --- a/tests/run-coverage/issue-85461.rs +++ b/tests/coverage/issue-85461.rs diff --git a/tests/coverage/issue-93054.cov-map b/tests/coverage/issue-93054.cov-map new file mode 100644 index 000000000..c2c6e9a65 --- /dev/null +++ b/tests/coverage/issue-93054.cov-map @@ -0,0 +1,24 @@ +Function name: issue_93054::foo2 (unused) +Raw bytes (9): 0x[01, 01, 00, 01, 00, 16, 01, 00, 1d] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Zero) at (prev + 22, 1) to (start + 0, 29) + +Function name: issue_93054::main +Raw bytes (9): 0x[01, 01, 00, 01, 01, 1e, 01, 00, 0d] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 30, 1) to (start + 0, 13) + +Function name: issue_93054::make (unused) +Raw bytes (9): 0x[01, 01, 00, 01, 00, 1a, 01, 02, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Zero) at (prev + 26, 1) to (start + 2, 2) + diff --git a/tests/run-coverage/issue-93054.coverage b/tests/coverage/issue-93054.coverage index 15f225326..15f225326 100644 --- a/tests/run-coverage/issue-93054.coverage +++ b/tests/coverage/issue-93054.coverage diff --git a/tests/coverage-map/status-quo/issue-93054.rs b/tests/coverage/issue-93054.rs index da546cfee..da546cfee 100644 --- a/tests/coverage-map/status-quo/issue-93054.rs +++ b/tests/coverage/issue-93054.rs diff --git a/tests/coverage/lazy_boolean.cov-map b/tests/coverage/lazy_boolean.cov-map new file mode 100644 index 000000000..0ad393c40 --- /dev/null +++ b/tests/coverage/lazy_boolean.cov-map @@ -0,0 +1,219 @@ +Function name: lazy_boolean::main +Raw bytes (636): 0x[01, 01, a4, 01, 01, 05, 09, 8a, 05, 8f, 05, 09, 05, 02, 05, 02, 8f, 05, 09, 05, 02, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 09, 8a, 05, 8f, 05, 09, 05, 02, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 15, f2, 04, f7, 04, 15, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 15, f2, 04, f7, 04, 15, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, ef, 04, 19, 15, f2, 04, f7, 04, 15, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 19, ea, 04, ef, 04, 19, 15, f2, 04, f7, 04, 15, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, e7, 04, 1d, 19, ea, 04, ef, 04, 19, 15, f2, 04, f7, 04, 15, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 1d, e2, 04, e7, 04, 1d, 19, ea, 04, ef, 04, 19, 15, f2, 04, f7, 04, 15, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, df, 04, 21, 1d, e2, 04, e7, 04, 1d, 19, ea, 04, ef, 04, 19, 15, f2, 04, f7, 04, 15, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 21, da, 04, df, 04, 21, 1d, e2, 04, e7, 04, 1d, 19, ea, 04, ef, 04, 19, 15, f2, 04, f7, 04, 15, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, d7, 04, 25, 21, da, 04, df, 04, 21, 1d, e2, 04, e7, 04, 1d, 19, ea, 04, ef, 04, 19, 15, f2, 04, f7, 04, 15, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 25, d2, 04, d7, 04, 25, 21, da, 04, df, 04, 21, 1d, e2, 04, e7, 04, 1d, 19, ea, 04, ef, 04, 19, 15, f2, 04, f7, 04, 15, 11, fa, 04, ff, 04, 11, 0d, 82, 05, 87, 05, 0d, 09, 8a, 05, 8f, 05, 09, 05, 02, 1c, 01, 03, 01, 07, 0f, 05, 07, 10, 04, 06, 02, 04, 06, 00, 07, 87, 05, 02, 09, 00, 11, 8f, 05, 02, 0d, 00, 12, 8a, 05, 02, 0d, 00, 12, ff, 04, 03, 09, 00, 11, 87, 05, 02, 0d, 00, 12, 82, 05, 02, 0d, 00, 12, f7, 04, 02, 09, 00, 11, ff, 04, 00, 14, 00, 19, 11, 00, 1d, 00, 22, ef, 04, 01, 09, 00, 11, f7, 04, 00, 14, 00, 19, 15, 00, 1d, 00, 22, ef, 04, 04, 09, 00, 10, ea, 04, 01, 05, 03, 06, 19, 03, 06, 00, 07, e7, 04, 03, 09, 00, 10, 1d, 01, 05, 03, 06, e2, 04, 05, 05, 03, 06, df, 04, 05, 09, 00, 10, da, 04, 00, 11, 02, 06, 21, 02, 06, 00, 07, d7, 04, 02, 08, 00, 0f, 25, 00, 10, 02, 06, d2, 04, 02, 0c, 02, 06, cf, 04, 03, 01, 00, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 164 +- expression 0 operands: lhs = Counter(0), rhs = Counter(1) +- expression 1 operands: lhs = Counter(2), rhs = Expression(162, Sub) +- expression 2 operands: lhs = Expression(163, Add), rhs = Counter(2) +- expression 3 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 4 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 5 operands: lhs = Expression(163, Add), rhs = Counter(2) +- expression 6 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 7 operands: lhs = Counter(3), rhs = Expression(160, Sub) +- expression 8 operands: lhs = Expression(161, Add), rhs = Counter(3) +- expression 9 operands: lhs = Counter(2), rhs = Expression(162, Sub) +- expression 10 operands: lhs = Expression(163, Add), rhs = Counter(2) +- expression 11 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 12 operands: lhs = Counter(2), rhs = Expression(162, Sub) +- expression 13 operands: lhs = Expression(163, Add), rhs = Counter(2) +- expression 14 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 15 operands: lhs = Expression(161, Add), rhs = Counter(3) +- expression 16 operands: lhs = Counter(2), rhs = Expression(162, Sub) +- expression 17 operands: lhs = Expression(163, Add), rhs = Counter(2) +- expression 18 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 19 operands: lhs = Counter(4), rhs = Expression(158, Sub) +- expression 20 operands: lhs = Expression(159, Add), rhs = Counter(4) +- expression 21 operands: lhs = Counter(3), rhs = Expression(160, Sub) +- expression 22 operands: lhs = Expression(161, Add), rhs = Counter(3) +- expression 23 operands: lhs = Counter(2), rhs = Expression(162, Sub) +- expression 24 operands: lhs = Expression(163, Add), rhs = Counter(2) +- expression 25 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 26 operands: lhs = Counter(3), rhs = Expression(160, Sub) +- expression 27 operands: lhs = Expression(161, Add), rhs = Counter(3) +- expression 28 operands: lhs = Counter(2), rhs = Expression(162, Sub) +- expression 29 operands: lhs = Expression(163, Add), rhs = Counter(2) +- expression 30 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 31 operands: lhs = Counter(5), rhs = Expression(156, Sub) +- expression 32 operands: lhs = Expression(157, Add), rhs = Counter(5) +- expression 33 operands: lhs = Counter(4), rhs = Expression(158, Sub) +- expression 34 operands: lhs = Expression(159, Add), rhs = Counter(4) +- expression 35 operands: lhs = Counter(3), rhs = Expression(160, Sub) +- expression 36 operands: lhs = Expression(161, Add), rhs = Counter(3) +- expression 37 operands: lhs = Counter(2), rhs = Expression(162, Sub) +- expression 38 operands: lhs = Expression(163, Add), rhs = Counter(2) +- expression 39 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 40 operands: lhs = Counter(4), rhs = Expression(158, Sub) +- expression 41 operands: lhs = Expression(159, Add), rhs = Counter(4) +- expression 42 operands: lhs = Counter(3), rhs = Expression(160, Sub) +- expression 43 operands: lhs = Expression(161, Add), rhs = Counter(3) +- expression 44 operands: lhs = Counter(2), rhs = Expression(162, Sub) +- expression 45 operands: lhs = Expression(163, Add), rhs = Counter(2) +- expression 46 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 47 operands: lhs = Counter(5), rhs = Expression(156, Sub) +- expression 48 operands: lhs = Expression(157, Add), rhs = Counter(5) +- expression 49 operands: lhs = Counter(4), rhs = Expression(158, Sub) +- expression 50 operands: lhs = Expression(159, Add), rhs = Counter(4) +- expression 51 operands: lhs = Counter(3), rhs = Expression(160, Sub) +- expression 52 operands: lhs = Expression(161, Add), rhs = Counter(3) +- expression 53 operands: lhs = Counter(2), rhs = Expression(162, Sub) +- expression 54 operands: lhs = Expression(163, Add), rhs = Counter(2) +- expression 55 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 56 operands: lhs = Expression(155, Add), rhs = Counter(6) +- expression 57 operands: lhs = Counter(5), rhs = Expression(156, Sub) +- expression 58 operands: lhs = Expression(157, Add), rhs = Counter(5) +- expression 59 operands: lhs = Counter(4), rhs = Expression(158, Sub) +- expression 60 operands: lhs = Expression(159, Add), rhs = Counter(4) +- expression 61 operands: lhs = Counter(3), rhs = Expression(160, Sub) +- expression 62 operands: lhs = Expression(161, Add), rhs = Counter(3) +- expression 63 operands: lhs = Counter(2), rhs = Expression(162, Sub) +- expression 64 operands: lhs = Expression(163, Add), rhs = Counter(2) +- expression 65 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 66 operands: lhs = Counter(6), rhs = Expression(154, Sub) +- expression 67 operands: lhs = Expression(155, Add), rhs = Counter(6) +- expression 68 operands: lhs = Counter(5), rhs = Expression(156, Sub) +- expression 69 operands: lhs = Expression(157, Add), rhs = Counter(5) +- expression 70 operands: lhs = Counter(4), rhs = Expression(158, Sub) +- expression 71 operands: lhs = Expression(159, Add), rhs = Counter(4) +- expression 72 operands: lhs = Counter(3), rhs = Expression(160, Sub) +- expression 73 operands: lhs = Expression(161, Add), rhs = Counter(3) +- expression 74 operands: lhs = Counter(2), rhs = Expression(162, Sub) +- expression 75 operands: lhs = Expression(163, Add), rhs = Counter(2) +- expression 76 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 77 operands: lhs = Expression(153, Add), rhs = Counter(7) +- expression 78 operands: lhs = Counter(6), rhs = Expression(154, Sub) +- expression 79 operands: lhs = Expression(155, Add), rhs = Counter(6) +- expression 80 operands: lhs = Counter(5), rhs = Expression(156, Sub) +- expression 81 operands: lhs = Expression(157, Add), rhs = Counter(5) +- expression 82 operands: lhs = Counter(4), rhs = Expression(158, Sub) +- expression 83 operands: lhs = Expression(159, Add), rhs = Counter(4) +- expression 84 operands: lhs = Counter(3), rhs = Expression(160, Sub) +- expression 85 operands: lhs = Expression(161, Add), rhs = Counter(3) +- expression 86 operands: lhs = Counter(2), rhs = Expression(162, Sub) +- expression 87 operands: lhs = Expression(163, Add), rhs = Counter(2) +- expression 88 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 89 operands: lhs = Counter(7), rhs = Expression(152, Sub) +- expression 90 operands: lhs = Expression(153, Add), rhs = Counter(7) +- expression 91 operands: lhs = Counter(6), rhs = Expression(154, Sub) +- expression 92 operands: lhs = Expression(155, Add), rhs = Counter(6) +- expression 93 operands: lhs = Counter(5), rhs = Expression(156, Sub) +- expression 94 operands: lhs = Expression(157, Add), rhs = Counter(5) +- expression 95 operands: lhs = Counter(4), rhs = Expression(158, Sub) +- expression 96 operands: lhs = Expression(159, Add), rhs = Counter(4) +- expression 97 operands: lhs = Counter(3), rhs = Expression(160, Sub) +- expression 98 operands: lhs = Expression(161, Add), rhs = Counter(3) +- expression 99 operands: lhs = Counter(2), rhs = Expression(162, Sub) +- expression 100 operands: lhs = Expression(163, Add), rhs = Counter(2) +- expression 101 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 102 operands: lhs = Expression(151, Add), rhs = Counter(8) +- expression 103 operands: lhs = Counter(7), rhs = Expression(152, Sub) +- expression 104 operands: lhs = Expression(153, Add), rhs = Counter(7) +- expression 105 operands: lhs = Counter(6), rhs = Expression(154, Sub) +- expression 106 operands: lhs = Expression(155, Add), rhs = Counter(6) +- expression 107 operands: lhs = Counter(5), rhs = Expression(156, Sub) +- expression 108 operands: lhs = Expression(157, Add), rhs = Counter(5) +- expression 109 operands: lhs = Counter(4), rhs = Expression(158, Sub) +- expression 110 operands: lhs = Expression(159, Add), rhs = Counter(4) +- expression 111 operands: lhs = Counter(3), rhs = Expression(160, Sub) +- expression 112 operands: lhs = Expression(161, Add), rhs = Counter(3) +- expression 113 operands: lhs = Counter(2), rhs = Expression(162, Sub) +- expression 114 operands: lhs = Expression(163, Add), rhs = Counter(2) +- expression 115 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 116 operands: lhs = Counter(8), rhs = Expression(150, Sub) +- expression 117 operands: lhs = Expression(151, Add), rhs = Counter(8) +- expression 118 operands: lhs = Counter(7), rhs = Expression(152, Sub) +- expression 119 operands: lhs = Expression(153, Add), rhs = Counter(7) +- expression 120 operands: lhs = Counter(6), rhs = Expression(154, Sub) +- expression 121 operands: lhs = Expression(155, Add), rhs = Counter(6) +- expression 122 operands: lhs = Counter(5), rhs = Expression(156, Sub) +- expression 123 operands: lhs = Expression(157, Add), rhs = Counter(5) +- expression 124 operands: lhs = Counter(4), rhs = Expression(158, Sub) +- expression 125 operands: lhs = Expression(159, Add), rhs = Counter(4) +- expression 126 operands: lhs = Counter(3), rhs = Expression(160, Sub) +- expression 127 operands: lhs = Expression(161, Add), rhs = Counter(3) +- expression 128 operands: lhs = Counter(2), rhs = Expression(162, Sub) +- expression 129 operands: lhs = Expression(163, Add), rhs = Counter(2) +- expression 130 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 131 operands: lhs = Expression(149, Add), rhs = Counter(9) +- expression 132 operands: lhs = Counter(8), rhs = Expression(150, Sub) +- expression 133 operands: lhs = Expression(151, Add), rhs = Counter(8) +- expression 134 operands: lhs = Counter(7), rhs = Expression(152, Sub) +- expression 135 operands: lhs = Expression(153, Add), rhs = Counter(7) +- expression 136 operands: lhs = Counter(6), rhs = Expression(154, Sub) +- expression 137 operands: lhs = Expression(155, Add), rhs = Counter(6) +- expression 138 operands: lhs = Counter(5), rhs = Expression(156, Sub) +- expression 139 operands: lhs = Expression(157, Add), rhs = Counter(5) +- expression 140 operands: lhs = Counter(4), rhs = Expression(158, Sub) +- expression 141 operands: lhs = Expression(159, Add), rhs = Counter(4) +- expression 142 operands: lhs = Counter(3), rhs = Expression(160, Sub) +- expression 143 operands: lhs = Expression(161, Add), rhs = Counter(3) +- expression 144 operands: lhs = Counter(2), rhs = Expression(162, Sub) +- expression 145 operands: lhs = Expression(163, Add), rhs = Counter(2) +- expression 146 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 147 operands: lhs = Counter(9), rhs = Expression(148, Sub) +- expression 148 operands: lhs = Expression(149, Add), rhs = Counter(9) +- expression 149 operands: lhs = Counter(8), rhs = Expression(150, Sub) +- expression 150 operands: lhs = Expression(151, Add), rhs = Counter(8) +- expression 151 operands: lhs = Counter(7), rhs = Expression(152, Sub) +- expression 152 operands: lhs = Expression(153, Add), rhs = Counter(7) +- expression 153 operands: lhs = Counter(6), rhs = Expression(154, Sub) +- expression 154 operands: lhs = Expression(155, Add), rhs = Counter(6) +- expression 155 operands: lhs = Counter(5), rhs = Expression(156, Sub) +- expression 156 operands: lhs = Expression(157, Add), rhs = Counter(5) +- expression 157 operands: lhs = Counter(4), rhs = Expression(158, Sub) +- expression 158 operands: lhs = Expression(159, Add), rhs = Counter(4) +- expression 159 operands: lhs = Counter(3), rhs = Expression(160, Sub) +- expression 160 operands: lhs = Expression(161, Add), rhs = Counter(3) +- expression 161 operands: lhs = Counter(2), rhs = Expression(162, Sub) +- expression 162 operands: lhs = Expression(163, Add), rhs = Counter(2) +- expression 163 operands: lhs = Counter(1), rhs = Expression(0, Sub) +Number of file 0 mappings: 28 +- Code(Counter(0)) at (prev + 3, 1) to (start + 7, 15) +- Code(Counter(1)) at (prev + 7, 16) to (start + 4, 6) +- Code(Expression(0, Sub)) at (prev + 4, 6) to (start + 0, 7) + = (c0 - c1) +- Code(Expression(161, Add)) at (prev + 2, 9) to (start + 0, 17) + = (c2 + ((c1 + (c0 - c1)) - c2)) +- Code(Expression(163, Add)) at (prev + 2, 13) to (start + 0, 18) + = (c1 + (c0 - c1)) +- Code(Expression(162, Sub)) at (prev + 2, 13) to (start + 0, 18) + = ((c1 + (c0 - c1)) - c2) +- Code(Expression(159, Add)) at (prev + 3, 9) to (start + 0, 17) + = (c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) +- Code(Expression(161, Add)) at (prev + 2, 13) to (start + 0, 18) + = (c2 + ((c1 + (c0 - c1)) - c2)) +- Code(Expression(160, Sub)) at (prev + 2, 13) to (start + 0, 18) + = ((c2 + ((c1 + (c0 - c1)) - c2)) - c3) +- Code(Expression(157, Add)) at (prev + 2, 9) to (start + 0, 17) + = (c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4)) +- Code(Expression(159, Add)) at (prev + 0, 20) to (start + 0, 25) + = (c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) +- Code(Counter(4)) at (prev + 0, 29) to (start + 0, 34) +- Code(Expression(155, Add)) at (prev + 1, 9) to (start + 0, 17) + = (c5 + ((c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4)) - c5)) +- Code(Expression(157, Add)) at (prev + 0, 20) to (start + 0, 25) + = (c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4)) +- Code(Counter(5)) at (prev + 0, 29) to (start + 0, 34) +- Code(Expression(155, Add)) at (prev + 4, 9) to (start + 0, 16) + = (c5 + ((c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4)) - c5)) +- Code(Expression(154, Sub)) at (prev + 1, 5) to (start + 3, 6) + = ((c5 + ((c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4)) - c5)) - c6) +- Code(Counter(6)) at (prev + 3, 6) to (start + 0, 7) +- Code(Expression(153, Add)) at (prev + 3, 9) to (start + 0, 16) + = (c6 + ((c5 + ((c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4)) - c5)) - c6)) +- Code(Counter(7)) at (prev + 1, 5) to (start + 3, 6) +- Code(Expression(152, Sub)) at (prev + 5, 5) to (start + 3, 6) + = ((c6 + ((c5 + ((c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4)) - c5)) - c6)) - c7) +- Code(Expression(151, Add)) at (prev + 5, 9) to (start + 0, 16) + = (c7 + ((c6 + ((c5 + ((c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4)) - c5)) - c6)) - c7)) +- Code(Expression(150, Sub)) at (prev + 0, 17) to (start + 2, 6) + = ((c7 + ((c6 + ((c5 + ((c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4)) - c5)) - c6)) - c7)) - c8) +- Code(Counter(8)) at (prev + 2, 6) to (start + 0, 7) +- Code(Expression(149, Add)) at (prev + 2, 8) to (start + 0, 15) + = (c8 + ((c7 + ((c6 + ((c5 + ((c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4)) - c5)) - c6)) - c7)) - c8)) +- Code(Counter(9)) at (prev + 0, 16) to (start + 2, 6) +- Code(Expression(148, Sub)) at (prev + 2, 12) to (start + 2, 6) + = ((c8 + ((c7 + ((c6 + ((c5 + ((c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4)) - c5)) - c6)) - c7)) - c8)) - c9) +- Code(Expression(147, Add)) at (prev + 3, 1) to (start + 0, 2) + = (c9 + ((c8 + ((c7 + ((c6 + ((c5 + ((c4 + ((c3 + ((c2 + ((c1 + (c0 - c1)) - c2)) - c3)) - c4)) - c5)) - c6)) - c7)) - c8)) - c9)) + diff --git a/tests/run-coverage/lazy_boolean.coverage b/tests/coverage/lazy_boolean.coverage index 8f14082ef..8f14082ef 100644 --- a/tests/run-coverage/lazy_boolean.coverage +++ b/tests/coverage/lazy_boolean.coverage diff --git a/tests/coverage-map/status-quo/lazy_boolean.rs b/tests/coverage/lazy_boolean.rs index bb6219e85..bb6219e85 100644 --- a/tests/coverage-map/status-quo/lazy_boolean.rs +++ b/tests/coverage/lazy_boolean.rs diff --git a/tests/coverage-map/long_and_wide.cov-map b/tests/coverage/long_and_wide.cov-map index 97aebf9b1..97aebf9b1 100644 --- a/tests/coverage-map/long_and_wide.cov-map +++ b/tests/coverage/long_and_wide.cov-map diff --git a/tests/coverage/long_and_wide.coverage b/tests/coverage/long_and_wide.coverage new file mode 100644 index 000000000..d7d29ca40 --- /dev/null +++ b/tests/coverage/long_and_wide.coverage @@ -0,0 +1,151 @@ + LL| |// compile-flags: --edition=2021 + LL| |// ignore-tidy-linelength + LL| | + LL| |// This file deliberately contains line and column numbers larger than 127, + LL| |// to verify that `coverage-dump`'s ULEB128 parser can handle them. + LL| | + LL| 1|fn main() { + LL| 1| wide_function(); + LL| 1| long_function(); + LL| 1| far_function(); + LL| 1|} + LL| | + LL| |#[rustfmt::skip] + LL| 1|fn wide_function() { /* */ (); } + LL| | + LL| 1|fn long_function() { + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1| // + LL| 1|} + LL| | + LL| 1|fn far_function() {} + diff --git a/tests/coverage-map/long_and_wide.rs b/tests/coverage/long_and_wide.rs index a7cbcd480..a7cbcd480 100644 --- a/tests/coverage-map/long_and_wide.rs +++ b/tests/coverage/long_and_wide.rs diff --git a/tests/coverage-map/status-quo/loop_break_value.cov-map b/tests/coverage/loop_break_value.cov-map index 75018442d..75018442d 100644 --- a/tests/coverage-map/status-quo/loop_break_value.cov-map +++ b/tests/coverage/loop_break_value.cov-map diff --git a/tests/run-coverage/loop_break_value.coverage b/tests/coverage/loop_break_value.coverage index 1f0630636..1f0630636 100644 --- a/tests/run-coverage/loop_break_value.coverage +++ b/tests/coverage/loop_break_value.coverage diff --git a/tests/coverage-map/status-quo/loop_break_value.rs b/tests/coverage/loop_break_value.rs index dbc4fad7a..dbc4fad7a 100644 --- a/tests/coverage-map/status-quo/loop_break_value.rs +++ b/tests/coverage/loop_break_value.rs diff --git a/tests/coverage/loops_branches.cov-map b/tests/coverage/loops_branches.cov-map new file mode 100644 index 000000000..813583a9d --- /dev/null +++ b/tests/coverage/loops_branches.cov-map @@ -0,0 +1,183 @@ +Function name: <loops_branches::DebugTest as core::fmt::Debug>::fmt +Raw bytes (249): 0x[01, 01, 31, 05, 00, 00, 02, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 00, bf, 01, c3, 01, 0d, 00, 11, 00, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 00, b6, 01, 00, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 00, b2, 01, 00, b6, 01, 00, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 00, 00, ae, 01, b2, 01, 00, b6, 01, 00, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 00, ab, 01, 11, 00, ae, 01, b2, 01, 00, b6, 01, 00, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 00, 25, a3, 01, a6, 01, 19, ab, 01, 11, 00, ae, 01, b2, 01, 00, b6, 01, 00, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 00, 14, 01, 09, 05, 01, 10, 05, 02, 10, 00, 15, 00, 01, 17, 00, 1b, 00, 00, 1c, 00, 1e, 02, 01, 0e, 00, 0f, 07, 01, 0d, 00, 1e, 25, 00, 1e, 00, 1f, 00, 01, 10, 01, 0a, b6, 01, 03, 0d, 00, 0e, bb, 01, 00, 12, 00, 17, b6, 01, 01, 10, 00, 14, b2, 01, 01, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, ae, 01, 01, 12, 00, 13, ab, 01, 01, 11, 00, 22, a6, 01, 00, 22, 00, 23, 00, 01, 14, 01, 0e, 19, 03, 09, 00, 0f, 9f, 01, 01, 05, 00, 06] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 49 +- expression 0 operands: lhs = Counter(1), rhs = Zero +- expression 1 operands: lhs = Zero, rhs = Expression(0, Sub) +- expression 2 operands: lhs = Expression(46, Add), rhs = Counter(6) +- expression 3 operands: lhs = Expression(47, Add), rhs = Expression(48, Add) +- expression 4 operands: lhs = Counter(3), rhs = Zero +- expression 5 operands: lhs = Counter(4), rhs = Zero +- expression 6 operands: lhs = Expression(47, Add), rhs = Expression(48, Add) +- expression 7 operands: lhs = Counter(3), rhs = Zero +- expression 8 operands: lhs = Counter(4), rhs = Zero +- expression 9 operands: lhs = Expression(46, Add), rhs = Counter(6) +- expression 10 operands: lhs = Expression(47, Add), rhs = Expression(48, Add) +- expression 11 operands: lhs = Counter(3), rhs = Zero +- expression 12 operands: lhs = Counter(4), rhs = Zero +- expression 13 operands: lhs = Expression(45, Sub), rhs = Zero +- expression 14 operands: lhs = Expression(46, Add), rhs = Counter(6) +- expression 15 operands: lhs = Expression(47, Add), rhs = Expression(48, Add) +- expression 16 operands: lhs = Counter(3), rhs = Zero +- expression 17 operands: lhs = Counter(4), rhs = Zero +- expression 18 operands: lhs = Expression(44, Sub), rhs = Zero +- expression 19 operands: lhs = Expression(45, Sub), rhs = Zero +- expression 20 operands: lhs = Expression(46, Add), rhs = Counter(6) +- expression 21 operands: lhs = Expression(47, Add), rhs = Expression(48, Add) +- expression 22 operands: lhs = Counter(3), rhs = Zero +- expression 23 operands: lhs = Counter(4), rhs = Zero +- expression 24 operands: lhs = Zero, rhs = Expression(43, Sub) +- expression 25 operands: lhs = Expression(44, Sub), rhs = Zero +- expression 26 operands: lhs = Expression(45, Sub), rhs = Zero +- expression 27 operands: lhs = Expression(46, Add), rhs = Counter(6) +- expression 28 operands: lhs = Expression(47, Add), rhs = Expression(48, Add) +- expression 29 operands: lhs = Counter(3), rhs = Zero +- expression 30 operands: lhs = Counter(4), rhs = Zero +- expression 31 operands: lhs = Expression(42, Add), rhs = Counter(4) +- expression 32 operands: lhs = Zero, rhs = Expression(43, Sub) +- expression 33 operands: lhs = Expression(44, Sub), rhs = Zero +- expression 34 operands: lhs = Expression(45, Sub), rhs = Zero +- expression 35 operands: lhs = Expression(46, Add), rhs = Counter(6) +- expression 36 operands: lhs = Expression(47, Add), rhs = Expression(48, Add) +- expression 37 operands: lhs = Counter(3), rhs = Zero +- expression 38 operands: lhs = Counter(4), rhs = Zero +- expression 39 operands: lhs = Counter(9), rhs = Expression(40, Add) +- expression 40 operands: lhs = Expression(41, Sub), rhs = Counter(6) +- expression 41 operands: lhs = Expression(42, Add), rhs = Counter(4) +- expression 42 operands: lhs = Zero, rhs = Expression(43, Sub) +- expression 43 operands: lhs = Expression(44, Sub), rhs = Zero +- expression 44 operands: lhs = Expression(45, Sub), rhs = Zero +- expression 45 operands: lhs = Expression(46, Add), rhs = Counter(6) +- expression 46 operands: lhs = Expression(47, Add), rhs = Expression(48, Add) +- expression 47 operands: lhs = Counter(3), rhs = Zero +- expression 48 operands: lhs = Counter(4), rhs = Zero +Number of file 0 mappings: 20 +- Code(Counter(0)) at (prev + 9, 5) to (start + 1, 16) +- Code(Counter(1)) at (prev + 2, 16) to (start + 0, 21) +- Code(Zero) at (prev + 1, 23) to (start + 0, 27) +- Code(Zero) at (prev + 0, 28) to (start + 0, 30) +- Code(Expression(0, Sub)) at (prev + 1, 14) to (start + 0, 15) + = (c1 - Zero) +- Code(Expression(1, Add)) at (prev + 1, 13) to (start + 0, 30) + = (Zero + (c1 - Zero)) +- Code(Counter(9)) at (prev + 0, 30) to (start + 0, 31) +- Code(Zero) at (prev + 1, 16) to (start + 1, 10) +- Code(Expression(45, Sub)) at (prev + 3, 13) to (start + 0, 14) + = (((c3 + Zero) + (c4 + Zero)) - c6) +- Code(Expression(46, Add)) at (prev + 0, 18) to (start + 0, 23) + = ((c3 + Zero) + (c4 + Zero)) +- Code(Expression(45, Sub)) at (prev + 1, 16) to (start + 0, 20) + = (((c3 + Zero) + (c4 + Zero)) - c6) +- Code(Expression(44, Sub)) at (prev + 1, 20) to (start + 0, 25) + = ((((c3 + Zero) + (c4 + Zero)) - c6) - Zero) +- Code(Zero) at (prev + 1, 27) to (start + 0, 31) +- Code(Zero) at (prev + 0, 32) to (start + 0, 34) +- Code(Expression(43, Sub)) at (prev + 1, 18) to (start + 0, 19) + = (((((c3 + Zero) + (c4 + Zero)) - c6) - Zero) - Zero) +- Code(Expression(42, Add)) at (prev + 1, 17) to (start + 0, 34) + = (Zero + (((((c3 + Zero) + (c4 + Zero)) - c6) - Zero) - Zero)) +- Code(Expression(41, Sub)) at (prev + 0, 34) to (start + 0, 35) + = ((Zero + (((((c3 + Zero) + (c4 + Zero)) - c6) - Zero) - Zero)) - c4) +- Code(Zero) at (prev + 1, 20) to (start + 1, 14) +- Code(Counter(6)) at (prev + 3, 9) to (start + 0, 15) +- Code(Expression(39, Add)) at (prev + 1, 5) to (start + 0, 6) + = (c9 + (((Zero + (((((c3 + Zero) + (c4 + Zero)) - c6) - Zero) - Zero)) - c4) + c6)) + +Function name: <loops_branches::DisplayTest as core::fmt::Display>::fmt +Raw bytes (253): 0x[01, 01, 33, 01, 00, 02, 00, 00, 0e, 02, 00, bf, 01, 19, c3, 01, c7, 01, 00, 0d, 00, 15, c3, 01, c7, 01, 00, 0d, 00, 15, bf, 01, 19, c3, 01, c7, 01, 00, 0d, 00, 15, ba, 01, 00, bf, 01, 19, c3, 01, c7, 01, 00, 0d, 00, 15, b6, 01, 00, ba, 01, 00, bf, 01, 19, c3, 01, c7, 01, 00, 0d, 00, 15, 00, b2, 01, b6, 01, 00, ba, 01, 00, bf, 01, 19, c3, 01, c7, 01, 00, 0d, 00, 15, af, 01, 15, 00, b2, 01, b6, 01, 00, ba, 01, 00, bf, 01, 19, c3, 01, c7, 01, 00, 0d, 00, 15, aa, 01, cb, 01, af, 01, 15, 00, b2, 01, b6, 01, 00, ba, 01, 00, bf, 01, 19, c3, 01, c7, 01, 00, 0d, 00, 15, 19, 25, 14, 01, 22, 05, 01, 11, 00, 01, 12, 01, 0a, 02, 02, 10, 00, 15, 00, 01, 17, 00, 1b, 00, 00, 1c, 00, 1e, 0e, 01, 0e, 00, 0f, 0b, 01, 0d, 00, 1e, 25, 00, 1e, 00, 1f, ba, 01, 02, 0d, 00, 0e, bf, 01, 00, 12, 00, 17, ba, 01, 01, 10, 00, 15, 00, 00, 16, 01, 0e, b6, 01, 02, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, b2, 01, 01, 12, 00, 13, af, 01, 01, 11, 00, 22, aa, 01, 00, 22, 00, 23, 19, 03, 09, 00, 0f, a7, 01, 01, 05, 00, 06] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 51 +- expression 0 operands: lhs = Counter(0), rhs = Zero +- expression 1 operands: lhs = Expression(0, Sub), rhs = Zero +- expression 2 operands: lhs = Zero, rhs = Expression(3, Sub) +- expression 3 operands: lhs = Expression(0, Sub), rhs = Zero +- expression 4 operands: lhs = Expression(47, Add), rhs = Counter(6) +- expression 5 operands: lhs = Expression(48, Add), rhs = Expression(49, Add) +- expression 6 operands: lhs = Zero, rhs = Counter(3) +- expression 7 operands: lhs = Zero, rhs = Counter(5) +- expression 8 operands: lhs = Expression(48, Add), rhs = Expression(49, Add) +- expression 9 operands: lhs = Zero, rhs = Counter(3) +- expression 10 operands: lhs = Zero, rhs = Counter(5) +- expression 11 operands: lhs = Expression(47, Add), rhs = Counter(6) +- expression 12 operands: lhs = Expression(48, Add), rhs = Expression(49, Add) +- expression 13 operands: lhs = Zero, rhs = Counter(3) +- expression 14 operands: lhs = Zero, rhs = Counter(5) +- expression 15 operands: lhs = Expression(46, Sub), rhs = Zero +- expression 16 operands: lhs = Expression(47, Add), rhs = Counter(6) +- expression 17 operands: lhs = Expression(48, Add), rhs = Expression(49, Add) +- expression 18 operands: lhs = Zero, rhs = Counter(3) +- expression 19 operands: lhs = Zero, rhs = Counter(5) +- expression 20 operands: lhs = Expression(45, Sub), rhs = Zero +- expression 21 operands: lhs = Expression(46, Sub), rhs = Zero +- expression 22 operands: lhs = Expression(47, Add), rhs = Counter(6) +- expression 23 operands: lhs = Expression(48, Add), rhs = Expression(49, Add) +- expression 24 operands: lhs = Zero, rhs = Counter(3) +- expression 25 operands: lhs = Zero, rhs = Counter(5) +- expression 26 operands: lhs = Zero, rhs = Expression(44, Sub) +- expression 27 operands: lhs = Expression(45, Sub), rhs = Zero +- expression 28 operands: lhs = Expression(46, Sub), rhs = Zero +- expression 29 operands: lhs = Expression(47, Add), rhs = Counter(6) +- expression 30 operands: lhs = Expression(48, Add), rhs = Expression(49, Add) +- expression 31 operands: lhs = Zero, rhs = Counter(3) +- expression 32 operands: lhs = Zero, rhs = Counter(5) +- expression 33 operands: lhs = Expression(43, Add), rhs = Counter(5) +- expression 34 operands: lhs = Zero, rhs = Expression(44, Sub) +- expression 35 operands: lhs = Expression(45, Sub), rhs = Zero +- expression 36 operands: lhs = Expression(46, Sub), rhs = Zero +- expression 37 operands: lhs = Expression(47, Add), rhs = Counter(6) +- expression 38 operands: lhs = Expression(48, Add), rhs = Expression(49, Add) +- expression 39 operands: lhs = Zero, rhs = Counter(3) +- expression 40 operands: lhs = Zero, rhs = Counter(5) +- expression 41 operands: lhs = Expression(42, Sub), rhs = Expression(50, Add) +- expression 42 operands: lhs = Expression(43, Add), rhs = Counter(5) +- expression 43 operands: lhs = Zero, rhs = Expression(44, Sub) +- expression 44 operands: lhs = Expression(45, Sub), rhs = Zero +- expression 45 operands: lhs = Expression(46, Sub), rhs = Zero +- expression 46 operands: lhs = Expression(47, Add), rhs = Counter(6) +- expression 47 operands: lhs = Expression(48, Add), rhs = Expression(49, Add) +- expression 48 operands: lhs = Zero, rhs = Counter(3) +- expression 49 operands: lhs = Zero, rhs = Counter(5) +- expression 50 operands: lhs = Counter(6), rhs = Counter(9) +Number of file 0 mappings: 20 +- Code(Counter(0)) at (prev + 34, 5) to (start + 1, 17) +- Code(Zero) at (prev + 1, 18) to (start + 1, 10) +- Code(Expression(0, Sub)) at (prev + 2, 16) to (start + 0, 21) + = (c0 - Zero) +- Code(Zero) at (prev + 1, 23) to (start + 0, 27) +- Code(Zero) at (prev + 0, 28) to (start + 0, 30) +- Code(Expression(3, Sub)) at (prev + 1, 14) to (start + 0, 15) + = ((c0 - Zero) - Zero) +- Code(Expression(2, Add)) at (prev + 1, 13) to (start + 0, 30) + = (Zero + ((c0 - Zero) - Zero)) +- Code(Counter(9)) at (prev + 0, 30) to (start + 0, 31) +- Code(Expression(46, Sub)) at (prev + 2, 13) to (start + 0, 14) + = (((Zero + c3) + (Zero + c5)) - c6) +- Code(Expression(47, Add)) at (prev + 0, 18) to (start + 0, 23) + = ((Zero + c3) + (Zero + c5)) +- Code(Expression(46, Sub)) at (prev + 1, 16) to (start + 0, 21) + = (((Zero + c3) + (Zero + c5)) - c6) +- Code(Zero) at (prev + 0, 22) to (start + 1, 14) +- Code(Expression(45, Sub)) at (prev + 2, 20) to (start + 0, 25) + = ((((Zero + c3) + (Zero + c5)) - c6) - Zero) +- Code(Zero) at (prev + 1, 27) to (start + 0, 31) +- Code(Zero) at (prev + 0, 32) to (start + 0, 34) +- Code(Expression(44, Sub)) at (prev + 1, 18) to (start + 0, 19) + = (((((Zero + c3) + (Zero + c5)) - c6) - Zero) - Zero) +- Code(Expression(43, Add)) at (prev + 1, 17) to (start + 0, 34) + = (Zero + (((((Zero + c3) + (Zero + c5)) - c6) - Zero) - Zero)) +- Code(Expression(42, Sub)) at (prev + 0, 34) to (start + 0, 35) + = ((Zero + (((((Zero + c3) + (Zero + c5)) - c6) - Zero) - Zero)) - c5) +- Code(Counter(6)) at (prev + 3, 9) to (start + 0, 15) +- Code(Expression(41, Add)) at (prev + 1, 5) to (start + 0, 6) + = (((Zero + (((((Zero + c3) + (Zero + c5)) - c6) - Zero) - Zero)) - c5) + (c6 + c9)) + +Function name: loops_branches::main +Raw bytes (9): 0x[01, 01, 00, 01, 01, 37, 01, 05, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 55, 1) to (start + 5, 2) + diff --git a/tests/run-coverage/loops_branches.coverage b/tests/coverage/loops_branches.coverage index 8cd6f1be3..8cd6f1be3 100644 --- a/tests/run-coverage/loops_branches.coverage +++ b/tests/coverage/loops_branches.coverage diff --git a/tests/coverage-map/status-quo/loops_branches.rs b/tests/coverage/loops_branches.rs index f3a343bcc..f3a343bcc 100644 --- a/tests/coverage-map/status-quo/loops_branches.rs +++ b/tests/coverage/loops_branches.rs diff --git a/tests/coverage/macro_name_span.cov-map b/tests/coverage/macro_name_span.cov-map new file mode 100644 index 000000000..b84628fc7 --- /dev/null +++ b/tests/coverage/macro_name_span.cov-map @@ -0,0 +1,16 @@ +Function name: macro_name_span::affected_function +Raw bytes (9): 0x[01, 01, 00, 01, 01, 06, 1b, 00, 20] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 6, 27) to (start + 0, 32) + +Function name: macro_name_span::main +Raw bytes (9): 0x[01, 02, 00, 01, 01, 0b, 01, 02, 02] +Number of files: 1 +- file 0 => global file 2 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 11, 1) to (start + 2, 2) + diff --git a/tests/run-coverage/macro_name_span.coverage b/tests/coverage/macro_name_span.coverage index cadf70246..cadf70246 100644 --- a/tests/run-coverage/macro_name_span.coverage +++ b/tests/coverage/macro_name_span.coverage diff --git a/tests/run-coverage/macro_name_span.rs b/tests/coverage/macro_name_span.rs index 5d15977c4..5d15977c4 100644 --- a/tests/run-coverage/macro_name_span.rs +++ b/tests/coverage/macro_name_span.rs diff --git a/tests/coverage-map/status-quo/match_or_pattern.cov-map b/tests/coverage/match_or_pattern.cov-map index d63407a99..d63407a99 100644 --- a/tests/coverage-map/status-quo/match_or_pattern.cov-map +++ b/tests/coverage/match_or_pattern.cov-map diff --git a/tests/run-coverage/match_or_pattern.coverage b/tests/coverage/match_or_pattern.coverage index 94c796721..94c796721 100644 --- a/tests/run-coverage/match_or_pattern.coverage +++ b/tests/coverage/match_or_pattern.coverage diff --git a/tests/coverage-map/status-quo/match_or_pattern.rs b/tests/coverage/match_or_pattern.rs index ab7aee51d..ab7aee51d 100644 --- a/tests/coverage-map/status-quo/match_or_pattern.rs +++ b/tests/coverage/match_or_pattern.rs diff --git a/tests/coverage-map/status-quo/nested_loops.cov-map b/tests/coverage/nested_loops.cov-map index 35d92594e..35d92594e 100644 --- a/tests/coverage-map/status-quo/nested_loops.cov-map +++ b/tests/coverage/nested_loops.cov-map diff --git a/tests/run-coverage/nested_loops.coverage b/tests/coverage/nested_loops.coverage index 143d0d26a..143d0d26a 100644 --- a/tests/run-coverage/nested_loops.coverage +++ b/tests/coverage/nested_loops.coverage diff --git a/tests/coverage-map/status-quo/nested_loops.rs b/tests/coverage/nested_loops.rs index 4c7c78427..4c7c78427 100644 --- a/tests/coverage-map/status-quo/nested_loops.rs +++ b/tests/coverage/nested_loops.rs diff --git a/tests/coverage-map/status-quo/no_cov_crate.cov-map b/tests/coverage/no_cov_crate.cov-map index 7ab5995dc..05b6448bb 100644 --- a/tests/coverage-map/status-quo/no_cov_crate.cov-map +++ b/tests/coverage/no_cov_crate.cov-map @@ -15,12 +15,12 @@ Number of file 0 mappings: 1 - Code(Counter(0)) at (prev + 24, 1) to (start + 2, 2) Function name: no_cov_crate::add_coverage_not_called (unused) -Raw bytes (9): 0x[01, 01, 00, 01, 01, 1d, 01, 02, 02] +Raw bytes (9): 0x[01, 01, 00, 01, 00, 1d, 01, 02, 02] Number of files: 1 - file 0 => global file 1 Number of expressions: 0 Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 29, 1) to (start + 2, 2) +- Code(Zero) at (prev + 29, 1) to (start + 2, 2) Function name: no_cov_crate::main Raw bytes (9): 0x[01, 01, 00, 01, 01, 4d, 01, 0b, 02] diff --git a/tests/run-coverage/no_cov_crate.coverage b/tests/coverage/no_cov_crate.coverage index f5a0322bf..f5a0322bf 100644 --- a/tests/run-coverage/no_cov_crate.coverage +++ b/tests/coverage/no_cov_crate.coverage diff --git a/tests/coverage-map/status-quo/no_cov_crate.rs b/tests/coverage/no_cov_crate.rs index e12e4bc55..e12e4bc55 100644 --- a/tests/coverage-map/status-quo/no_cov_crate.rs +++ b/tests/coverage/no_cov_crate.rs diff --git a/tests/coverage-map/status-quo/overflow.cov-map b/tests/coverage/overflow.cov-map index bfffd9b2a..39a5c05f8 100644 --- a/tests/coverage-map/status-quo/overflow.cov-map +++ b/tests/coverage/overflow.cov-map @@ -1,5 +1,5 @@ Function name: overflow::main -Raw bytes (65): 0x[01, 01, 08, 01, 1b, 05, 1f, 09, 0d, 03, 11, 16, 05, 03, 11, 05, 1f, 09, 0d, 09, 01, 0f, 01, 01, 1b, 03, 02, 0b, 00, 18, 16, 01, 0c, 00, 1a, 05, 00, 1b, 03, 0a, 12, 03, 13, 00, 20, 09, 00, 21, 03, 0a, 0d, 03, 0a, 00, 0b, 1b, 01, 09, 00, 17, 11, 02, 05, 01, 02] +Raw bytes (65): 0x[01, 01, 08, 01, 1b, 05, 1f, 09, 0d, 03, 11, 16, 05, 03, 11, 05, 1f, 09, 0d, 09, 01, 10, 01, 01, 1b, 03, 02, 0b, 00, 18, 16, 01, 0c, 00, 1a, 05, 00, 1b, 03, 0a, 12, 03, 13, 00, 20, 09, 00, 21, 03, 0a, 0d, 03, 0a, 00, 0b, 1b, 01, 09, 00, 17, 11, 02, 05, 01, 02] Number of files: 1 - file 0 => global file 1 Number of expressions: 8 @@ -12,7 +12,7 @@ Number of expressions: 8 - expression 6 operands: lhs = Counter(1), rhs = Expression(7, Add) - expression 7 operands: lhs = Counter(2), rhs = Counter(3) Number of file 0 mappings: 9 -- Code(Counter(0)) at (prev + 15, 1) to (start + 1, 27) +- Code(Counter(0)) at (prev + 16, 1) to (start + 1, 27) - Code(Expression(0, Add)) at (prev + 2, 11) to (start + 0, 24) = (c0 + (c1 + (c2 + c3))) - Code(Expression(5, Sub)) at (prev + 1, 12) to (start + 0, 26) @@ -27,14 +27,14 @@ Number of file 0 mappings: 9 - Code(Counter(4)) at (prev + 2, 5) to (start + 1, 2) Function name: overflow::might_overflow -Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 04, 01, 01, 12, 05, 01, 13, 02, 06, 02, 02, 06, 00, 07, 07, 01, 09, 05, 02] +Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 05, 01, 01, 12, 05, 01, 13, 02, 06, 02, 02, 06, 00, 07, 07, 01, 09, 05, 02] Number of files: 1 - file 0 => global file 1 Number of expressions: 2 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) - expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 4, 1) to (start + 1, 18) +- Code(Counter(0)) at (prev + 5, 1) to (start + 1, 18) - Code(Counter(1)) at (prev + 1, 19) to (start + 2, 6) - Code(Expression(0, Sub)) at (prev + 2, 6) to (start + 0, 7) = (c0 - c1) diff --git a/tests/run-coverage/overflow.coverage b/tests/coverage/overflow.coverage index cee076e88..4f8dffc0c 100644 --- a/tests/run-coverage/overflow.coverage +++ b/tests/coverage/overflow.coverage @@ -1,4 +1,5 @@ LL| |#![allow(unused_assignments)] + LL| |// compile-flags: -Coverflow-checks=yes LL| |// failure-status: 101 LL| | LL| 4|fn might_overflow(to_add: u32) -> u32 { diff --git a/tests/coverage/overflow.rs b/tests/coverage/overflow.rs new file mode 100644 index 000000000..1c40771b2 --- /dev/null +++ b/tests/coverage/overflow.rs @@ -0,0 +1,64 @@ +#![allow(unused_assignments)] +// compile-flags: -Coverflow-checks=yes +// failure-status: 101 + +fn might_overflow(to_add: u32) -> u32 { + if to_add > 5 { + println!("this will probably overflow"); + } + let add_to = u32::MAX - 5; + println!("does {} + {} overflow?", add_to, to_add); + let result = to_add + add_to; + println!("continuing after overflow check"); + result +} + +fn main() -> Result<(), u8> { + let mut countdown = 10; + while countdown > 0 { + if countdown == 1 { + let result = might_overflow(10); + println!("Result: {}", result); + } else if countdown < 5 { + let result = might_overflow(1); + println!("Result: {}", result); + } + countdown -= 1; + } + Ok(()) +} + +// Notes: +// 1. Compare this program and its coverage results to those of the very similar test `assert.rs`, +// and similar tests `panic_unwind.rs`, abort.rs` and `try_error_result.rs`. +// 2. This test confirms the coverage generated when a program passes or fails a +// compiler-generated `TerminatorKind::Assert` (based on an overflow check, in this case). +// 3. Similar to how the coverage instrumentation handles `TerminatorKind::Call`, +// compiler-generated assertion failures are assumed to be a symptom of a program bug, not +// expected behavior. To simplify the coverage graphs and keep instrumented programs as +// small and fast as possible, `Assert` terminators are assumed to always succeed, and +// therefore are considered "non-branching" terminators. So, an `Assert` terminator does not +// get its own coverage counter. +// 4. After an unhandled panic or failed Assert, coverage results may not always be intuitive. +// In this test, the final count for the statements after the `if` block in `might_overflow()` +// is 4, even though the lines after `to_add + add_to` were executed only 3 times. Depending +// on the MIR graph and the structure of the code, this count could have been 3 (which might +// have been valid for the overflowed add `+`, but should have been 4 for the lines before +// the overflow. The reason for this potential uncertainty is, a `CounterKind` is incremented +// via StatementKind::Counter at the end of the block, but (as in the case in this test), +// a CounterKind::Expression is always evaluated. In this case, the expression was based on +// a `Counter` incremented as part of the evaluation of the `if` expression, which was +// executed, and counted, 4 times, before reaching the overflow add. + +// If the program did not overflow, the coverage for `might_overflow()` would look like this: +// +// 4| |fn might_overflow(to_add: u32) -> u32 { +// 5| 4| if to_add > 5 { +// 6| 0| println!("this will probably overflow"); +// 7| 4| } +// 8| 4| let add_to = u32::MAX - 5; +// 9| 4| println!("does {} + {} overflow?", add_to, to_add); +// 10| 4| let result = to_add + add_to; +// 11| 4| println!("continuing after overflow check"); +// 12| 4| result +// 13| 4|} diff --git a/tests/coverage-map/status-quo/panic_unwind.cov-map b/tests/coverage/panic_unwind.cov-map index f6089ce55..f6089ce55 100644 --- a/tests/coverage-map/status-quo/panic_unwind.cov-map +++ b/tests/coverage/panic_unwind.cov-map diff --git a/tests/run-coverage/panic_unwind.coverage b/tests/coverage/panic_unwind.coverage index 2b0777ef2..2b0777ef2 100644 --- a/tests/run-coverage/panic_unwind.coverage +++ b/tests/coverage/panic_unwind.coverage diff --git a/tests/coverage-map/status-quo/panic_unwind.rs b/tests/coverage/panic_unwind.rs index 638d2eb6a..638d2eb6a 100644 --- a/tests/coverage-map/status-quo/panic_unwind.rs +++ b/tests/coverage/panic_unwind.rs diff --git a/tests/coverage-map/status-quo/partial_eq.cov-map b/tests/coverage/partial_eq.cov-map index dd61cd77a..3549116db 100644 --- a/tests/coverage-map/status-quo/partial_eq.cov-map +++ b/tests/coverage/partial_eq.cov-map @@ -1,27 +1,27 @@ Function name: <partial_eq::Version as core::clone::Clone>::clone (unused) -Raw bytes (9): 0x[01, 01, 00, 01, 01, 04, 0a, 00, 0f] +Raw bytes (9): 0x[01, 01, 00, 01, 00, 04, 0a, 00, 0f] Number of files: 1 - file 0 => global file 1 Number of expressions: 0 Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 4, 10) to (start + 0, 15) +- Code(Zero) at (prev + 4, 10) to (start + 0, 15) Function name: <partial_eq::Version as core::cmp::Ord>::cmp (unused) -Raw bytes (14): 0x[01, 01, 00, 02, 01, 04, 33, 00, 34, 00, 00, 35, 00, 36] +Raw bytes (14): 0x[01, 01, 00, 02, 00, 04, 33, 00, 34, 00, 00, 35, 00, 36] Number of files: 1 - file 0 => global file 1 Number of expressions: 0 Number of file 0 mappings: 2 -- Code(Counter(0)) at (prev + 4, 51) to (start + 0, 52) +- Code(Zero) at (prev + 4, 51) to (start + 0, 52) - Code(Zero) at (prev + 0, 53) to (start + 0, 54) Function name: <partial_eq::Version as core::cmp::PartialEq>::eq (unused) -Raw bytes (14): 0x[01, 01, 00, 02, 01, 04, 18, 00, 19, 00, 00, 20, 00, 21] +Raw bytes (14): 0x[01, 01, 00, 02, 00, 04, 18, 00, 19, 00, 00, 20, 00, 21] Number of files: 1 - file 0 => global file 1 Number of expressions: 0 Number of file 0 mappings: 2 -- Code(Counter(0)) at (prev + 4, 24) to (start + 0, 25) +- Code(Zero) at (prev + 4, 24) to (start + 0, 25) - Code(Zero) at (prev + 0, 32) to (start + 0, 33) Function name: <partial_eq::Version as core::cmp::PartialOrd>::partial_cmp diff --git a/tests/run-coverage/partial_eq.coverage b/tests/coverage/partial_eq.coverage index c6d9ad6cf..c6d9ad6cf 100644 --- a/tests/run-coverage/partial_eq.coverage +++ b/tests/coverage/partial_eq.coverage diff --git a/tests/coverage-map/status-quo/partial_eq.rs b/tests/coverage/partial_eq.rs index dd8b42c18..dd8b42c18 100644 --- a/tests/coverage-map/status-quo/partial_eq.rs +++ b/tests/coverage/partial_eq.rs diff --git a/tests/coverage/simple_loop.cov-map b/tests/coverage/simple_loop.cov-map new file mode 100644 index 000000000..f1691ffc5 --- /dev/null +++ b/tests/coverage/simple_loop.cov-map @@ -0,0 +1,27 @@ +Function name: simple_loop::main +Raw bytes (57): 0x[01, 01, 09, 01, 05, 23, 09, 05, 02, 1f, 09, 23, 09, 05, 02, 1f, 09, 23, 09, 05, 02, 07, 01, 03, 01, 09, 10, 05, 0a, 05, 05, 06, 02, 05, 06, 00, 07, 1f, 05, 0d, 02, 0e, 1a, 04, 0d, 00, 12, 09, 02, 0a, 03, 0a, 1a, 06, 01, 00, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 9 +- expression 0 operands: lhs = Counter(0), rhs = Counter(1) +- expression 1 operands: lhs = Expression(8, Add), rhs = Counter(2) +- expression 2 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 3 operands: lhs = Expression(7, Add), rhs = Counter(2) +- expression 4 operands: lhs = Expression(8, Add), rhs = Counter(2) +- expression 5 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 6 operands: lhs = Expression(7, Add), rhs = Counter(2) +- expression 7 operands: lhs = Expression(8, Add), rhs = Counter(2) +- expression 8 operands: lhs = Counter(1), rhs = Expression(0, Sub) +Number of file 0 mappings: 7 +- Code(Counter(0)) at (prev + 3, 1) to (start + 9, 16) +- Code(Counter(1)) at (prev + 10, 5) to (start + 5, 6) +- Code(Expression(0, Sub)) at (prev + 5, 6) to (start + 0, 7) + = (c0 - c1) +- Code(Expression(7, Add)) at (prev + 5, 13) to (start + 2, 14) + = ((c1 + (c0 - c1)) + c2) +- Code(Expression(6, Sub)) at (prev + 4, 13) to (start + 0, 18) + = (((c1 + (c0 - c1)) + c2) - c2) +- Code(Counter(2)) at (prev + 2, 10) to (start + 3, 10) +- Code(Expression(6, Sub)) at (prev + 6, 1) to (start + 0, 2) + = (((c1 + (c0 - c1)) + c2) - c2) + diff --git a/tests/run-coverage/simple_loop.coverage b/tests/coverage/simple_loop.coverage index 691c6cd1e..691c6cd1e 100644 --- a/tests/run-coverage/simple_loop.coverage +++ b/tests/coverage/simple_loop.coverage diff --git a/tests/coverage-map/status-quo/simple_loop.rs b/tests/coverage/simple_loop.rs index 6f7f23475..6f7f23475 100644 --- a/tests/coverage-map/status-quo/simple_loop.rs +++ b/tests/coverage/simple_loop.rs diff --git a/tests/coverage/simple_match.cov-map b/tests/coverage/simple_match.cov-map new file mode 100644 index 000000000..4a32745d2 --- /dev/null +++ b/tests/coverage/simple_match.cov-map @@ -0,0 +1,33 @@ +Function name: simple_match::main +Raw bytes (78): 0x[01, 01, 0c, 01, 05, 2b, 2f, 05, 02, 09, 0d, 27, 11, 2b, 2f, 05, 02, 09, 0d, 27, 11, 2b, 2f, 05, 02, 09, 0d, 0a, 01, 03, 01, 07, 0f, 05, 07, 10, 02, 06, 02, 02, 06, 00, 07, 27, 05, 09, 00, 0d, 22, 05, 0d, 00, 16, 09, 02, 0d, 00, 0e, 22, 02, 11, 02, 12, 09, 04, 0d, 07, 0e, 0d, 0a, 0d, 00, 0f, 11, 03, 01, 00, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 12 +- expression 0 operands: lhs = Counter(0), rhs = Counter(1) +- expression 1 operands: lhs = Expression(10, Add), rhs = Expression(11, Add) +- expression 2 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 3 operands: lhs = Counter(2), rhs = Counter(3) +- expression 4 operands: lhs = Expression(9, Add), rhs = Counter(4) +- expression 5 operands: lhs = Expression(10, Add), rhs = Expression(11, Add) +- expression 6 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 7 operands: lhs = Counter(2), rhs = Counter(3) +- expression 8 operands: lhs = Expression(9, Add), rhs = Counter(4) +- expression 9 operands: lhs = Expression(10, Add), rhs = Expression(11, Add) +- expression 10 operands: lhs = Counter(1), rhs = Expression(0, Sub) +- expression 11 operands: lhs = Counter(2), rhs = Counter(3) +Number of file 0 mappings: 10 +- Code(Counter(0)) at (prev + 3, 1) to (start + 7, 15) +- Code(Counter(1)) at (prev + 7, 16) to (start + 2, 6) +- Code(Expression(0, Sub)) at (prev + 2, 6) to (start + 0, 7) + = (c0 - c1) +- Code(Expression(9, Add)) at (prev + 5, 9) to (start + 0, 13) + = ((c1 + (c0 - c1)) + (c2 + c3)) +- Code(Expression(8, Sub)) at (prev + 5, 13) to (start + 0, 22) + = (((c1 + (c0 - c1)) + (c2 + c3)) - c4) +- Code(Counter(2)) at (prev + 2, 13) to (start + 0, 14) +- Code(Expression(8, Sub)) at (prev + 2, 17) to (start + 2, 18) + = (((c1 + (c0 - c1)) + (c2 + c3)) - c4) +- Code(Counter(2)) at (prev + 4, 13) to (start + 7, 14) +- Code(Counter(3)) at (prev + 10, 13) to (start + 0, 15) +- Code(Counter(4)) at (prev + 3, 1) to (start + 0, 2) + diff --git a/tests/run-coverage/simple_match.coverage b/tests/coverage/simple_match.coverage index 7f5dd3bb6..7f5dd3bb6 100644 --- a/tests/run-coverage/simple_match.coverage +++ b/tests/coverage/simple_match.coverage diff --git a/tests/coverage-map/status-quo/simple_match.rs b/tests/coverage/simple_match.rs index be99e59a8..be99e59a8 100644 --- a/tests/coverage-map/status-quo/simple_match.rs +++ b/tests/coverage/simple_match.rs diff --git a/tests/coverage-map/status-quo/sort_groups.cov-map b/tests/coverage/sort_groups.cov-map index 7156a66cf..3cbda6fbe 100644 --- a/tests/coverage-map/status-quo/sort_groups.cov-map +++ b/tests/coverage/sort_groups.cov-map @@ -28,6 +28,21 @@ Number of file 0 mappings: 4 - Code(Expression(1, Add)) at (prev + 1, 1) to (start + 0, 2) = (c1 + (c0 - c1)) +Function name: sort_groups::generic_fn::<char> +Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 11, 01, 01, 0c, 05, 01, 0d, 02, 06, 02, 02, 06, 00, 07, 07, 01, 01, 00, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 2 +- expression 0 operands: lhs = Counter(0), rhs = Counter(1) +- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) +Number of file 0 mappings: 4 +- Code(Counter(0)) at (prev + 17, 1) to (start + 1, 12) +- Code(Counter(1)) at (prev + 1, 13) to (start + 2, 6) +- Code(Expression(0, Sub)) at (prev + 2, 6) to (start + 0, 7) + = (c0 - c1) +- Code(Expression(1, Add)) at (prev + 1, 1) to (start + 0, 2) + = (c1 + (c0 - c1)) + Function name: sort_groups::generic_fn::<i32> Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 11, 01, 01, 0c, 05, 01, 0d, 02, 06, 02, 02, 06, 00, 07, 07, 01, 01, 00, 02] Number of files: 1 @@ -44,15 +59,15 @@ Number of file 0 mappings: 4 = (c1 + (c0 - c1)) Function name: sort_groups::main -Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 06, 01, 04, 0d, 00, 04, 0e, 02, 06, 02, 02, 06, 00, 07, 07, 01, 05, 02, 02] +Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 06, 01, 04, 23, 05, 04, 24, 02, 06, 02, 02, 06, 00, 07, 07, 01, 05, 02, 02] Number of files: 1 - file 0 => global file 1 Number of expressions: 2 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) - expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 6, 1) to (start + 4, 13) -- Code(Zero) at (prev + 4, 14) to (start + 2, 6) +- Code(Counter(0)) at (prev + 6, 1) to (start + 4, 35) +- Code(Counter(1)) at (prev + 4, 36) to (start + 2, 6) - Code(Expression(0, Sub)) at (prev + 2, 6) to (start + 0, 7) = (c0 - c1) - Code(Expression(1, Add)) at (prev + 1, 5) to (start + 2, 2) diff --git a/tests/run-coverage/sort_groups.coverage b/tests/coverage/sort_groups.coverage index 8733bf48a..c70d7b3b2 100644 --- a/tests/run-coverage/sort_groups.coverage +++ b/tests/coverage/sort_groups.coverage @@ -7,7 +7,7 @@ LL| 1| let cond = std::env::args().len() > 1; LL| 1| generic_fn::<()>(cond); LL| 1| generic_fn::<&'static str>(!cond); - LL| 1| if false { + LL| 1| if std::hint::black_box(false) { LL| 0| generic_fn::<char>(cond); LL| 1| } LL| 1| generic_fn::<i32>(cond); diff --git a/tests/coverage/sort_groups.rs b/tests/coverage/sort_groups.rs new file mode 100644 index 000000000..5adbbc6a8 --- /dev/null +++ b/tests/coverage/sort_groups.rs @@ -0,0 +1,23 @@ +// compile-flags: --edition=2021 + +// Demonstrate that `sort_subviews.py` can sort instantiation groups into a +// predictable order, while preserving their heterogeneous contents. + +fn main() { + let cond = std::env::args().len() > 1; + generic_fn::<()>(cond); + generic_fn::<&'static str>(!cond); + if std::hint::black_box(false) { + generic_fn::<char>(cond); + } + generic_fn::<i32>(cond); + other_fn(); +} + +fn generic_fn<T>(cond: bool) { + if cond { + println!("{}", std::any::type_name::<T>()); + } +} + +fn other_fn() {} diff --git a/tests/coverage-map/status-quo/test_harness.cov-map b/tests/coverage/test_harness.cov-map index b0e955dd1..6940d2e28 100644 --- a/tests/coverage-map/status-quo/test_harness.cov-map +++ b/tests/coverage/test_harness.cov-map @@ -15,10 +15,10 @@ Number of file 0 mappings: 1 - Code(Counter(0)) at (prev + 9, 1) to (start + 0, 8) Function name: test_harness::unused (unused) -Raw bytes (9): 0x[01, 01, 00, 01, 01, 07, 01, 00, 0f] +Raw bytes (9): 0x[01, 01, 00, 01, 00, 07, 01, 00, 0f] Number of files: 1 - file 0 => global file 1 Number of expressions: 0 Number of file 0 mappings: 1 -- Code(Counter(0)) at (prev + 7, 1) to (start + 0, 15) +- Code(Zero) at (prev + 7, 1) to (start + 0, 15) diff --git a/tests/run-coverage/test_harness.coverage b/tests/coverage/test_harness.coverage index ff6009f6f..ff6009f6f 100644 --- a/tests/run-coverage/test_harness.coverage +++ b/tests/coverage/test_harness.coverage diff --git a/tests/coverage-map/status-quo/test_harness.rs b/tests/coverage/test_harness.rs index 12a755734..12a755734 100644 --- a/tests/coverage-map/status-quo/test_harness.rs +++ b/tests/coverage/test_harness.rs diff --git a/tests/coverage/tight_inf_loop.cov-map b/tests/coverage/tight_inf_loop.cov-map new file mode 100644 index 000000000..7fe3146b0 --- /dev/null +++ b/tests/coverage/tight_inf_loop.cov-map @@ -0,0 +1,12 @@ +Function name: tight_inf_loop::main +Raw bytes (21): 0x[01, 01, 01, 01, 00, 03, 01, 01, 01, 01, 0d, 00, 02, 09, 00, 10, 02, 01, 06, 01, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 1 +- expression 0 operands: lhs = Counter(0), rhs = Zero +Number of file 0 mappings: 3 +- Code(Counter(0)) at (prev + 1, 1) to (start + 1, 13) +- Code(Zero) at (prev + 2, 9) to (start + 0, 16) +- Code(Expression(0, Sub)) at (prev + 1, 6) to (start + 1, 2) + = (c0 - Zero) + diff --git a/tests/run-coverage/tight_inf_loop.coverage b/tests/coverage/tight_inf_loop.coverage index c15c76b3a..c15c76b3a 100644 --- a/tests/run-coverage/tight_inf_loop.coverage +++ b/tests/coverage/tight_inf_loop.coverage diff --git a/tests/coverage-map/status-quo/tight_inf_loop.rs b/tests/coverage/tight_inf_loop.rs index cef99027a..cef99027a 100644 --- a/tests/coverage-map/status-quo/tight_inf_loop.rs +++ b/tests/coverage/tight_inf_loop.rs diff --git a/tests/coverage-map/trivial.cov-map b/tests/coverage/trivial.cov-map index 874e294a1..874e294a1 100644 --- a/tests/coverage-map/trivial.cov-map +++ b/tests/coverage/trivial.cov-map diff --git a/tests/coverage/trivial.coverage b/tests/coverage/trivial.coverage new file mode 100644 index 000000000..4f417979e --- /dev/null +++ b/tests/coverage/trivial.coverage @@ -0,0 +1,4 @@ + LL| |// compile-flags: --edition=2021 + LL| | + LL| 1|fn main() {} + diff --git a/tests/coverage-map/trivial.rs b/tests/coverage/trivial.rs index d0a9b44fb..d0a9b44fb 100644 --- a/tests/coverage-map/trivial.rs +++ b/tests/coverage/trivial.rs diff --git a/tests/coverage/try_error_result.cov-map b/tests/coverage/try_error_result.cov-map new file mode 100644 index 000000000..8367103a2 --- /dev/null +++ b/tests/coverage/try_error_result.cov-map @@ -0,0 +1,220 @@ +Function name: <try_error_result::Thing1>::get_thing_2 +Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 28, 05, 01, 18, 05, 02, 0d, 00, 14, 02, 02, 0d, 00, 1a, 07, 02, 05, 00, 06] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 2 +- expression 0 operands: lhs = Counter(0), rhs = Counter(1) +- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) +Number of file 0 mappings: 4 +- Code(Counter(0)) at (prev + 40, 5) to (start + 1, 24) +- Code(Counter(1)) at (prev + 2, 13) to (start + 0, 20) +- Code(Expression(0, Sub)) at (prev + 2, 13) to (start + 0, 26) + = (c0 - c1) +- Code(Expression(1, Add)) at (prev + 2, 5) to (start + 0, 6) + = (c1 + (c0 - c1)) + +Function name: <try_error_result::Thing2>::call +Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 33, 05, 01, 18, 05, 02, 0d, 00, 14, 02, 02, 0d, 00, 13, 07, 02, 05, 00, 06] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 2 +- expression 0 operands: lhs = Counter(0), rhs = Counter(1) +- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) +Number of file 0 mappings: 4 +- Code(Counter(0)) at (prev + 51, 5) to (start + 1, 24) +- Code(Counter(1)) at (prev + 2, 13) to (start + 0, 20) +- Code(Expression(0, Sub)) at (prev + 2, 13) to (start + 0, 19) + = (c0 - c1) +- Code(Expression(1, Add)) at (prev + 2, 5) to (start + 0, 6) + = (c1 + (c0 - c1)) + +Function name: try_error_result::call +Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 04, 01, 01, 14, 05, 02, 09, 00, 10, 02, 02, 09, 00, 0f, 07, 02, 01, 00, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 2 +- expression 0 operands: lhs = Counter(0), rhs = Counter(1) +- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) +Number of file 0 mappings: 4 +- Code(Counter(0)) at (prev + 4, 1) to (start + 1, 20) +- Code(Counter(1)) at (prev + 2, 9) to (start + 0, 16) +- Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 15) + = (c0 - c1) +- Code(Expression(1, Add)) at (prev + 2, 1) to (start + 0, 2) + = (c1 + (c0 - c1)) + +Function name: try_error_result::main +Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 70, 01, 02, 0c, 05, 03, 05, 00, 06, 02, 02, 05, 00, 0b, 07, 01, 01, 00, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 2 +- expression 0 operands: lhs = Counter(0), rhs = Counter(1) +- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) +Number of file 0 mappings: 4 +- Code(Counter(0)) at (prev + 112, 1) to (start + 2, 12) +- Code(Counter(1)) at (prev + 3, 5) to (start + 0, 6) +- Code(Expression(0, Sub)) at (prev + 2, 5) to (start + 0, 11) + = (c0 - c1) +- Code(Expression(1, Add)) at (prev + 1, 1) to (start + 0, 2) + = (c1 + (c0 - c1)) + +Function name: try_error_result::test1 +Raw bytes (77): 0x[01, 01, 09, 01, 07, 05, 09, 03, 0d, 1d, 11, 16, 1d, 03, 0d, 1f, 0d, 11, 23, 15, 19, 0b, 01, 0c, 01, 02, 17, 03, 07, 09, 00, 0e, 16, 02, 09, 04, 1a, 1d, 06, 0d, 00, 29, 11, 00, 29, 00, 2a, 0e, 01, 0d, 00, 2a, 15, 00, 2a, 00, 2b, 12, 04, 0d, 00, 2a, 19, 00, 2a, 00, 2b, 0d, 03, 05, 00, 0b, 1b, 01, 01, 00, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 9 +- expression 0 operands: lhs = Counter(0), rhs = Expression(1, Add) +- expression 1 operands: lhs = Counter(1), rhs = Counter(2) +- expression 2 operands: lhs = Expression(0, Add), rhs = Counter(3) +- expression 3 operands: lhs = Counter(7), rhs = Counter(4) +- expression 4 operands: lhs = Expression(5, Sub), rhs = Counter(7) +- expression 5 operands: lhs = Expression(0, Add), rhs = Counter(3) +- expression 6 operands: lhs = Expression(7, Add), rhs = Counter(3) +- expression 7 operands: lhs = Counter(4), rhs = Expression(8, Add) +- expression 8 operands: lhs = Counter(5), rhs = Counter(6) +Number of file 0 mappings: 11 +- Code(Counter(0)) at (prev + 12, 1) to (start + 2, 23) +- Code(Expression(0, Add)) at (prev + 7, 9) to (start + 0, 14) + = (c0 + (c1 + c2)) +- Code(Expression(5, Sub)) at (prev + 2, 9) to (start + 4, 26) + = ((c0 + (c1 + c2)) - c3) +- Code(Counter(7)) at (prev + 6, 13) to (start + 0, 41) +- Code(Counter(4)) at (prev + 0, 41) to (start + 0, 42) +- Code(Expression(3, Sub)) at (prev + 1, 13) to (start + 0, 42) + = (c7 - c4) +- Code(Counter(5)) at (prev + 0, 42) to (start + 0, 43) +- Code(Expression(4, Sub)) at (prev + 4, 13) to (start + 0, 42) + = (((c0 + (c1 + c2)) - c3) - c7) +- Code(Counter(6)) at (prev + 0, 42) to (start + 0, 43) +- Code(Counter(3)) at (prev + 3, 5) to (start + 0, 11) +- Code(Expression(6, Add)) at (prev + 1, 1) to (start + 0, 2) + = ((c4 + (c5 + c6)) + c3) + +Function name: try_error_result::test2 +Raw bytes (358): 0x[01, 01, 3b, 01, 07, 05, 09, 03, 0d, 41, 11, 4a, 15, 41, 11, 42, 1d, 46, 19, 4a, 15, 41, 11, 4a, 15, 41, 11, 46, 19, 4a, 15, 41, 11, 42, 1d, 46, 19, 4a, 15, 41, 11, 5e, 25, 49, 21, 49, 21, 5e, 25, 49, 21, 8a, 01, 2d, 8e, 01, 29, 92, 01, 41, 03, 0d, 92, 01, 41, 03, 0d, 8e, 01, 29, 92, 01, 41, 03, 0d, 8a, 01, 2d, 8e, 01, 29, 92, 01, 41, 03, 0d, a6, 01, 35, 45, 31, 45, 31, a6, 01, 35, 45, 31, ba, 01, 3d, 4d, 39, 4d, 39, ba, 01, 3d, 4d, 39, c3, 01, 0d, 11, c7, 01, cb, 01, db, 01, 15, cf, 01, d3, 01, d7, 01, 19, 1d, 21, 25, df, 01, e3, 01, 29, 2d, e7, 01, eb, 01, 31, 35, 39, 3d, 28, 01, 3c, 01, 03, 17, 03, 08, 09, 00, 0e, 92, 01, 02, 09, 04, 1a, 41, 06, 0d, 00, 2f, 11, 00, 2f, 00, 30, 4a, 00, 31, 03, 35, 15, 04, 11, 00, 12, 46, 02, 11, 04, 12, 3e, 05, 11, 00, 14, 46, 00, 17, 00, 41, 19, 00, 41, 00, 42, 42, 00, 43, 00, 5f, 1d, 00, 5f, 00, 60, 3e, 01, 0d, 00, 20, 5a, 01, 11, 00, 14, 49, 00, 17, 00, 41, 21, 00, 41, 00, 42, 5e, 00, 43, 00, 60, 25, 00, 60, 00, 61, 5a, 01, 0d, 00, 20, 86, 01, 04, 11, 00, 14, 8e, 01, 00, 17, 00, 42, 29, 00, 42, 00, 43, 8a, 01, 00, 44, 00, 61, 2d, 00, 61, 00, 62, 86, 01, 01, 0d, 00, 20, a2, 01, 01, 11, 00, 14, 45, 00, 17, 01, 36, 31, 01, 36, 00, 37, a6, 01, 01, 12, 00, 2f, 35, 00, 2f, 00, 30, a2, 01, 01, 0d, 00, 20, b6, 01, 01, 11, 00, 14, 4d, 00, 17, 01, 36, 39, 02, 11, 00, 12, ba, 01, 01, 12, 00, 2f, 3d, 01, 11, 00, 12, b6, 01, 02, 0d, 00, 20, 0d, 03, 05, 00, 0b, bf, 01, 01, 01, 00, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 59 +- expression 0 operands: lhs = Counter(0), rhs = Expression(1, Add) +- expression 1 operands: lhs = Counter(1), rhs = Counter(2) +- expression 2 operands: lhs = Expression(0, Add), rhs = Counter(3) +- expression 3 operands: lhs = Counter(16), rhs = Counter(4) +- expression 4 operands: lhs = Expression(18, Sub), rhs = Counter(5) +- expression 5 operands: lhs = Counter(16), rhs = Counter(4) +- expression 6 operands: lhs = Expression(16, Sub), rhs = Counter(7) +- expression 7 operands: lhs = Expression(17, Sub), rhs = Counter(6) +- expression 8 operands: lhs = Expression(18, Sub), rhs = Counter(5) +- expression 9 operands: lhs = Counter(16), rhs = Counter(4) +- expression 10 operands: lhs = Expression(18, Sub), rhs = Counter(5) +- expression 11 operands: lhs = Counter(16), rhs = Counter(4) +- expression 12 operands: lhs = Expression(17, Sub), rhs = Counter(6) +- expression 13 operands: lhs = Expression(18, Sub), rhs = Counter(5) +- expression 14 operands: lhs = Counter(16), rhs = Counter(4) +- expression 15 operands: lhs = Expression(16, Sub), rhs = Counter(7) +- expression 16 operands: lhs = Expression(17, Sub), rhs = Counter(6) +- expression 17 operands: lhs = Expression(18, Sub), rhs = Counter(5) +- expression 18 operands: lhs = Counter(16), rhs = Counter(4) +- expression 19 operands: lhs = Expression(23, Sub), rhs = Counter(9) +- expression 20 operands: lhs = Counter(18), rhs = Counter(8) +- expression 21 operands: lhs = Counter(18), rhs = Counter(8) +- expression 22 operands: lhs = Expression(23, Sub), rhs = Counter(9) +- expression 23 operands: lhs = Counter(18), rhs = Counter(8) +- expression 24 operands: lhs = Expression(34, Sub), rhs = Counter(11) +- expression 25 operands: lhs = Expression(35, Sub), rhs = Counter(10) +- expression 26 operands: lhs = Expression(36, Sub), rhs = Counter(16) +- expression 27 operands: lhs = Expression(0, Add), rhs = Counter(3) +- expression 28 operands: lhs = Expression(36, Sub), rhs = Counter(16) +- expression 29 operands: lhs = Expression(0, Add), rhs = Counter(3) +- expression 30 operands: lhs = Expression(35, Sub), rhs = Counter(10) +- expression 31 operands: lhs = Expression(36, Sub), rhs = Counter(16) +- expression 32 operands: lhs = Expression(0, Add), rhs = Counter(3) +- expression 33 operands: lhs = Expression(34, Sub), rhs = Counter(11) +- expression 34 operands: lhs = Expression(35, Sub), rhs = Counter(10) +- expression 35 operands: lhs = Expression(36, Sub), rhs = Counter(16) +- expression 36 operands: lhs = Expression(0, Add), rhs = Counter(3) +- expression 37 operands: lhs = Expression(41, Sub), rhs = Counter(13) +- expression 38 operands: lhs = Counter(17), rhs = Counter(12) +- expression 39 operands: lhs = Counter(17), rhs = Counter(12) +- expression 40 operands: lhs = Expression(41, Sub), rhs = Counter(13) +- expression 41 operands: lhs = Counter(17), rhs = Counter(12) +- expression 42 operands: lhs = Expression(46, Sub), rhs = Counter(15) +- expression 43 operands: lhs = Counter(19), rhs = Counter(14) +- expression 44 operands: lhs = Counter(19), rhs = Counter(14) +- expression 45 operands: lhs = Expression(46, Sub), rhs = Counter(15) +- expression 46 operands: lhs = Counter(19), rhs = Counter(14) +- expression 47 operands: lhs = Expression(48, Add), rhs = Counter(3) +- expression 48 operands: lhs = Counter(4), rhs = Expression(49, Add) +- expression 49 operands: lhs = Expression(50, Add), rhs = Expression(54, Add) +- expression 50 operands: lhs = Counter(5), rhs = Expression(51, Add) +- expression 51 operands: lhs = Expression(52, Add), rhs = Expression(53, Add) +- expression 52 operands: lhs = Counter(6), rhs = Counter(7) +- expression 53 operands: lhs = Counter(8), rhs = Counter(9) +- expression 54 operands: lhs = Expression(55, Add), rhs = Expression(56, Add) +- expression 55 operands: lhs = Counter(10), rhs = Counter(11) +- expression 56 operands: lhs = Expression(57, Add), rhs = Expression(58, Add) +- expression 57 operands: lhs = Counter(12), rhs = Counter(13) +- expression 58 operands: lhs = Counter(14), rhs = Counter(15) +Number of file 0 mappings: 40 +- Code(Counter(0)) at (prev + 60, 1) to (start + 3, 23) +- Code(Expression(0, Add)) at (prev + 8, 9) to (start + 0, 14) + = (c0 + (c1 + c2)) +- Code(Expression(36, Sub)) at (prev + 2, 9) to (start + 4, 26) + = ((c0 + (c1 + c2)) - c3) +- Code(Counter(16)) at (prev + 6, 13) to (start + 0, 47) +- Code(Counter(4)) at (prev + 0, 47) to (start + 0, 48) +- Code(Expression(18, Sub)) at (prev + 0, 49) to (start + 3, 53) + = (c16 - c4) +- Code(Counter(5)) at (prev + 4, 17) to (start + 0, 18) +- Code(Expression(17, Sub)) at (prev + 2, 17) to (start + 4, 18) + = ((c16 - c4) - c5) +- Code(Expression(15, Sub)) at (prev + 5, 17) to (start + 0, 20) + = ((((c16 - c4) - c5) - c6) - c7) +- Code(Expression(17, Sub)) at (prev + 0, 23) to (start + 0, 65) + = ((c16 - c4) - c5) +- Code(Counter(6)) at (prev + 0, 65) to (start + 0, 66) +- Code(Expression(16, Sub)) at (prev + 0, 67) to (start + 0, 95) + = (((c16 - c4) - c5) - c6) +- Code(Counter(7)) at (prev + 0, 95) to (start + 0, 96) +- Code(Expression(15, Sub)) at (prev + 1, 13) to (start + 0, 32) + = ((((c16 - c4) - c5) - c6) - c7) +- Code(Expression(22, Sub)) at (prev + 1, 17) to (start + 0, 20) + = ((c18 - c8) - c9) +- Code(Counter(18)) at (prev + 0, 23) to (start + 0, 65) +- Code(Counter(8)) at (prev + 0, 65) to (start + 0, 66) +- Code(Expression(23, Sub)) at (prev + 0, 67) to (start + 0, 96) + = (c18 - c8) +- Code(Counter(9)) at (prev + 0, 96) to (start + 0, 97) +- Code(Expression(22, Sub)) at (prev + 1, 13) to (start + 0, 32) + = ((c18 - c8) - c9) +- Code(Expression(33, Sub)) at (prev + 4, 17) to (start + 0, 20) + = (((((c0 + (c1 + c2)) - c3) - c16) - c10) - c11) +- Code(Expression(35, Sub)) at (prev + 0, 23) to (start + 0, 66) + = (((c0 + (c1 + c2)) - c3) - c16) +- Code(Counter(10)) at (prev + 0, 66) to (start + 0, 67) +- Code(Expression(34, Sub)) at (prev + 0, 68) to (start + 0, 97) + = ((((c0 + (c1 + c2)) - c3) - c16) - c10) +- Code(Counter(11)) at (prev + 0, 97) to (start + 0, 98) +- Code(Expression(33, Sub)) at (prev + 1, 13) to (start + 0, 32) + = (((((c0 + (c1 + c2)) - c3) - c16) - c10) - c11) +- Code(Expression(40, Sub)) at (prev + 1, 17) to (start + 0, 20) + = ((c17 - c12) - c13) +- Code(Counter(17)) at (prev + 0, 23) to (start + 1, 54) +- Code(Counter(12)) at (prev + 1, 54) to (start + 0, 55) +- Code(Expression(41, Sub)) at (prev + 1, 18) to (start + 0, 47) + = (c17 - c12) +- Code(Counter(13)) at (prev + 0, 47) to (start + 0, 48) +- Code(Expression(40, Sub)) at (prev + 1, 13) to (start + 0, 32) + = ((c17 - c12) - c13) +- Code(Expression(45, Sub)) at (prev + 1, 17) to (start + 0, 20) + = ((c19 - c14) - c15) +- Code(Counter(19)) at (prev + 0, 23) to (start + 1, 54) +- Code(Counter(14)) at (prev + 2, 17) to (start + 0, 18) +- Code(Expression(46, Sub)) at (prev + 1, 18) to (start + 0, 47) + = (c19 - c14) +- Code(Counter(15)) at (prev + 1, 17) to (start + 0, 18) +- Code(Expression(45, Sub)) at (prev + 2, 13) to (start + 0, 32) + = ((c19 - c14) - c15) +- Code(Counter(3)) at (prev + 3, 5) to (start + 0, 11) +- Code(Expression(47, Add)) at (prev + 1, 1) to (start + 0, 2) + = ((c4 + ((c5 + ((c6 + c7) + (c8 + c9))) + ((c10 + c11) + ((c12 + c13) + (c14 + c15))))) + c3) + diff --git a/tests/run-coverage/try_error_result.coverage b/tests/coverage/try_error_result.coverage index 5d48cbd62..5d48cbd62 100644 --- a/tests/run-coverage/try_error_result.coverage +++ b/tests/coverage/try_error_result.coverage diff --git a/tests/coverage-map/status-quo/try_error_result.rs b/tests/coverage/try_error_result.rs index 557cbf22b..557cbf22b 100644 --- a/tests/coverage-map/status-quo/try_error_result.rs +++ b/tests/coverage/try_error_result.rs diff --git a/tests/coverage/unreachable.cov-map b/tests/coverage/unreachable.cov-map new file mode 100644 index 000000000..495419820 --- /dev/null +++ b/tests/coverage/unreachable.cov-map @@ -0,0 +1,24 @@ +Function name: unreachable::UNREACHABLE_CLOSURE::{closure#0} +Raw bytes (9): 0x[01, 01, 00, 01, 01, 0f, 27, 00, 49] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 15, 39) to (start + 0, 73) + +Function name: unreachable::unreachable_function +Raw bytes (9): 0x[01, 01, 00, 01, 01, 11, 01, 02, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 17, 1) to (start + 2, 2) + +Function name: unreachable::unreachable_intrinsic +Raw bytes (9): 0x[01, 01, 00, 01, 01, 16, 01, 02, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 22, 1) to (start + 2, 2) + diff --git a/tests/coverage/unreachable.coverage b/tests/coverage/unreachable.coverage new file mode 100644 index 000000000..fa0ac9ccf --- /dev/null +++ b/tests/coverage/unreachable.coverage @@ -0,0 +1,38 @@ + LL| |#![feature(core_intrinsics)] + LL| |#![feature(coverage_attribute)] + LL| |// compile-flags: --edition=2021 + LL| | + LL| |// <https://github.com/rust-lang/rust/issues/116171> + LL| |// If we instrument a function for coverage, but all of its counter-increment + LL| |// statements are removed by MIR optimizations, LLVM will think it isn't + LL| |// instrumented and it will disappear from coverage maps and coverage reports. + LL| |// Most MIR opts won't cause this because they tend not to remove statements + LL| |// from bb0, but `UnreachablePropagation` can do so if it sees that bb0 ends + LL| |// with `TerminatorKind::Unreachable`. + LL| | + LL| |use std::hint::{black_box, unreachable_unchecked}; + LL| | + LL| 0|static UNREACHABLE_CLOSURE: fn() = || unsafe { unreachable_unchecked() }; + LL| | + LL| 0|fn unreachable_function() { + LL| 0| unsafe { unreachable_unchecked() } + LL| 0|} + LL| | + LL| |// Use an intrinsic to more reliably trigger unreachable-propagation. + LL| 0|fn unreachable_intrinsic() { + LL| 0| unsafe { std::intrinsics::unreachable() } + LL| 0|} + LL| | + LL| |#[coverage(off)] + LL| |fn main() { + LL| | if black_box(false) { + LL| | UNREACHABLE_CLOSURE(); + LL| | } + LL| | if black_box(false) { + LL| | unreachable_function(); + LL| | } + LL| | if black_box(false) { + LL| | unreachable_intrinsic(); + LL| | } + LL| |} + diff --git a/tests/coverage/unreachable.rs b/tests/coverage/unreachable.rs new file mode 100644 index 000000000..6385bfa16 --- /dev/null +++ b/tests/coverage/unreachable.rs @@ -0,0 +1,37 @@ +#![feature(core_intrinsics)] +#![feature(coverage_attribute)] +// compile-flags: --edition=2021 + +// <https://github.com/rust-lang/rust/issues/116171> +// If we instrument a function for coverage, but all of its counter-increment +// statements are removed by MIR optimizations, LLVM will think it isn't +// instrumented and it will disappear from coverage maps and coverage reports. +// Most MIR opts won't cause this because they tend not to remove statements +// from bb0, but `UnreachablePropagation` can do so if it sees that bb0 ends +// with `TerminatorKind::Unreachable`. + +use std::hint::{black_box, unreachable_unchecked}; + +static UNREACHABLE_CLOSURE: fn() = || unsafe { unreachable_unchecked() }; + +fn unreachable_function() { + unsafe { unreachable_unchecked() } +} + +// Use an intrinsic to more reliably trigger unreachable-propagation. +fn unreachable_intrinsic() { + unsafe { std::intrinsics::unreachable() } +} + +#[coverage(off)] +fn main() { + if black_box(false) { + UNREACHABLE_CLOSURE(); + } + if black_box(false) { + unreachable_function(); + } + if black_box(false) { + unreachable_intrinsic(); + } +} diff --git a/tests/coverage-map/status-quo/unused.cov-map b/tests/coverage/unused.cov-map index c8b8f195f..9383d1e90 100644 --- a/tests/coverage-map/status-quo/unused.cov-map +++ b/tests/coverage/unused.cov-map @@ -47,45 +47,45 @@ Number of file 0 mappings: 1 - Code(Counter(0)) at (prev + 37, 1) to (start + 4, 2) Function name: unused::unused_func (unused) -Raw bytes (24): 0x[01, 01, 00, 04, 01, 13, 01, 01, 0e, 00, 01, 0f, 02, 06, 00, 02, 06, 00, 07, 00, 01, 01, 00, 02] +Raw bytes (24): 0x[01, 01, 00, 04, 00, 13, 01, 01, 0e, 00, 01, 0f, 02, 06, 00, 02, 06, 00, 07, 00, 01, 01, 00, 02] Number of files: 1 - file 0 => global file 1 Number of expressions: 0 Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 19, 1) to (start + 1, 14) +- Code(Zero) at (prev + 19, 1) to (start + 1, 14) - Code(Zero) at (prev + 1, 15) to (start + 2, 6) - Code(Zero) at (prev + 2, 6) to (start + 0, 7) - Code(Zero) at (prev + 1, 1) to (start + 0, 2) Function name: unused::unused_func2 (unused) -Raw bytes (24): 0x[01, 01, 00, 04, 01, 19, 01, 01, 0e, 00, 01, 0f, 02, 06, 00, 02, 06, 00, 07, 00, 01, 01, 00, 02] +Raw bytes (24): 0x[01, 01, 00, 04, 00, 19, 01, 01, 0e, 00, 01, 0f, 02, 06, 00, 02, 06, 00, 07, 00, 01, 01, 00, 02] Number of files: 1 - file 0 => global file 1 Number of expressions: 0 Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 25, 1) to (start + 1, 14) +- Code(Zero) at (prev + 25, 1) to (start + 1, 14) - Code(Zero) at (prev + 1, 15) to (start + 2, 6) - Code(Zero) at (prev + 2, 6) to (start + 0, 7) - Code(Zero) at (prev + 1, 1) to (start + 0, 2) Function name: unused::unused_func3 (unused) -Raw bytes (24): 0x[01, 01, 00, 04, 01, 1f, 01, 01, 0e, 00, 01, 0f, 02, 06, 00, 02, 06, 00, 07, 00, 01, 01, 00, 02] +Raw bytes (24): 0x[01, 01, 00, 04, 00, 1f, 01, 01, 0e, 00, 01, 0f, 02, 06, 00, 02, 06, 00, 07, 00, 01, 01, 00, 02] Number of files: 1 - file 0 => global file 1 Number of expressions: 0 Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 31, 1) to (start + 1, 14) +- Code(Zero) at (prev + 31, 1) to (start + 1, 14) - Code(Zero) at (prev + 1, 15) to (start + 2, 6) - Code(Zero) at (prev + 2, 6) to (start + 0, 7) - Code(Zero) at (prev + 1, 1) to (start + 0, 2) Function name: unused::unused_template_func::<_> (unused) -Raw bytes (34): 0x[01, 01, 00, 06, 01, 0b, 01, 01, 12, 00, 02, 0b, 00, 11, 00, 01, 09, 00, 0f, 00, 00, 13, 00, 19, 00, 01, 09, 00, 0f, 00, 02, 01, 00, 02] +Raw bytes (34): 0x[01, 01, 00, 06, 00, 0b, 01, 01, 12, 00, 02, 0b, 00, 11, 00, 01, 09, 00, 0f, 00, 00, 13, 00, 19, 00, 01, 09, 00, 0f, 00, 02, 01, 00, 02] Number of files: 1 - file 0 => global file 1 Number of expressions: 0 Number of file 0 mappings: 6 -- Code(Counter(0)) at (prev + 11, 1) to (start + 1, 18) +- Code(Zero) at (prev + 11, 1) to (start + 1, 18) - Code(Zero) at (prev + 2, 11) to (start + 0, 17) - Code(Zero) at (prev + 1, 9) to (start + 0, 15) - Code(Zero) at (prev + 0, 19) to (start + 0, 25) diff --git a/tests/run-coverage/unused.coverage b/tests/coverage/unused.coverage index 056ffeb02..056ffeb02 100644 --- a/tests/run-coverage/unused.coverage +++ b/tests/coverage/unused.coverage diff --git a/tests/coverage-map/status-quo/unused.rs b/tests/coverage/unused.rs index d985af135..d985af135 100644 --- a/tests/coverage-map/status-quo/unused.rs +++ b/tests/coverage/unused.rs diff --git a/tests/coverage/unused_mod.cov-map b/tests/coverage/unused_mod.cov-map new file mode 100644 index 000000000..241cb2610 --- /dev/null +++ b/tests/coverage/unused_mod.cov-map @@ -0,0 +1,16 @@ +Function name: unused_mod::main +Raw bytes (9): 0x[01, 02, 00, 01, 01, 04, 01, 02, 02] +Number of files: 1 +- file 0 => global file 2 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 4, 1) to (start + 2, 2) + +Function name: unused_mod::unused_module::never_called_function (unused) +Raw bytes (9): 0x[01, 01, 00, 01, 00, 02, 01, 02, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Zero) at (prev + 2, 1) to (start + 2, 2) + diff --git a/tests/run-coverage/unused_mod.coverage b/tests/coverage/unused_mod.coverage index a8fa24ac6..a8fa24ac6 100644 --- a/tests/run-coverage/unused_mod.coverage +++ b/tests/coverage/unused_mod.coverage diff --git a/tests/run-coverage/unused_mod.rs b/tests/coverage/unused_mod.rs index 6e62839c9..6e62839c9 100644 --- a/tests/run-coverage/unused_mod.rs +++ b/tests/coverage/unused_mod.rs diff --git a/tests/coverage/uses_crate.cov-map b/tests/coverage/uses_crate.cov-map new file mode 100644 index 000000000..9c06eab70 --- /dev/null +++ b/tests/coverage/uses_crate.cov-map @@ -0,0 +1,40 @@ +Function name: used_crate::used_from_bin_crate_and_lib_crate_generic_function::<alloc::vec::Vec<i32>> +Raw bytes (9): 0x[01, 01, 00, 01, 01, 1b, 01, 02, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 27, 1) to (start + 2, 2) + +Function name: used_crate::used_only_from_bin_crate_generic_function::<&alloc::vec::Vec<i32>> +Raw bytes (9): 0x[01, 01, 00, 01, 01, 13, 01, 02, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 19, 1) to (start + 2, 2) + +Function name: used_crate::used_only_from_bin_crate_generic_function::<&str> +Raw bytes (9): 0x[01, 01, 00, 01, 01, 13, 01, 02, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 19, 1) to (start + 2, 2) + +Function name: used_crate::used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str> +Raw bytes (9): 0x[01, 01, 00, 01, 01, 1f, 01, 02, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 31, 1) to (start + 2, 2) + +Function name: uses_crate::main +Raw bytes (9): 0x[01, 02, 00, 01, 01, 0c, 01, 07, 02] +Number of files: 1 +- file 0 => global file 2 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 12, 1) to (start + 7, 2) + diff --git a/tests/run-coverage/uses_crate.coverage b/tests/coverage/uses_crate.coverage index 50d92102a..50d92102a 100644 --- a/tests/run-coverage/uses_crate.coverage +++ b/tests/coverage/uses_crate.coverage diff --git a/tests/run-coverage/uses_crate.rs b/tests/coverage/uses_crate.rs index ab203ad78..ab203ad78 100644 --- a/tests/run-coverage/uses_crate.rs +++ b/tests/coverage/uses_crate.rs diff --git a/tests/coverage/uses_inline_crate.cov-map b/tests/coverage/uses_inline_crate.cov-map new file mode 100644 index 000000000..6b621825c --- /dev/null +++ b/tests/coverage/uses_inline_crate.cov-map @@ -0,0 +1,55 @@ +Function name: used_inline_crate::used_from_bin_crate_and_lib_crate_generic_function::<alloc::vec::Vec<i32>> +Raw bytes (9): 0x[01, 01, 00, 01, 01, 2c, 01, 02, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 44, 1) to (start + 2, 2) + +Function name: used_inline_crate::used_inline_function +Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 14, 01, 06, 0f, 05, 06, 10, 02, 06, 02, 02, 06, 00, 07, 07, 01, 05, 01, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 2 +- expression 0 operands: lhs = Counter(0), rhs = Counter(1) +- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub) +Number of file 0 mappings: 4 +- Code(Counter(0)) at (prev + 20, 1) to (start + 6, 15) +- Code(Counter(1)) at (prev + 6, 16) to (start + 2, 6) +- Code(Expression(0, Sub)) at (prev + 2, 6) to (start + 0, 7) + = (c0 - c1) +- Code(Expression(1, Add)) at (prev + 1, 5) to (start + 1, 2) + = (c1 + (c0 - c1)) + +Function name: used_inline_crate::used_only_from_bin_crate_generic_function::<&alloc::vec::Vec<i32>> +Raw bytes (9): 0x[01, 01, 00, 01, 01, 21, 01, 02, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 33, 1) to (start + 2, 2) + +Function name: used_inline_crate::used_only_from_bin_crate_generic_function::<&str> +Raw bytes (9): 0x[01, 01, 00, 01, 01, 21, 01, 02, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 33, 1) to (start + 2, 2) + +Function name: used_inline_crate::used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str> +Raw bytes (9): 0x[01, 01, 00, 01, 01, 31, 01, 02, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 49, 1) to (start + 2, 2) + +Function name: uses_inline_crate::main +Raw bytes (9): 0x[01, 02, 00, 01, 01, 0c, 01, 0a, 02] +Number of files: 1 +- file 0 => global file 2 +Number of expressions: 0 +Number of file 0 mappings: 1 +- Code(Counter(0)) at (prev + 12, 1) to (start + 10, 2) + diff --git a/tests/run-coverage/uses_inline_crate.coverage b/tests/coverage/uses_inline_crate.coverage index cc0e01ffd..cc0e01ffd 100644 --- a/tests/run-coverage/uses_inline_crate.coverage +++ b/tests/coverage/uses_inline_crate.coverage diff --git a/tests/run-coverage/uses_inline_crate.rs b/tests/coverage/uses_inline_crate.rs index d7b4c3c05..d7b4c3c05 100644 --- a/tests/run-coverage/uses_inline_crate.rs +++ b/tests/coverage/uses_inline_crate.rs diff --git a/tests/coverage/while.cov-map b/tests/coverage/while.cov-map new file mode 100644 index 000000000..af250f3fb --- /dev/null +++ b/tests/coverage/while.cov-map @@ -0,0 +1,15 @@ +Function name: while::main +Raw bytes (28): 0x[01, 01, 02, 01, 00, 03, 00, 04, 01, 01, 01, 01, 10, 03, 02, 0b, 00, 14, 00, 00, 15, 01, 06, 06, 02, 01, 00, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 2 +- expression 0 operands: lhs = Counter(0), rhs = Zero +- expression 1 operands: lhs = Expression(0, Add), rhs = Zero +Number of file 0 mappings: 4 +- Code(Counter(0)) at (prev + 1, 1) to (start + 1, 16) +- Code(Expression(0, Add)) at (prev + 2, 11) to (start + 0, 20) + = (c0 + Zero) +- Code(Zero) at (prev + 0, 21) to (start + 1, 6) +- Code(Expression(1, Sub)) at (prev + 2, 1) to (start + 0, 2) + = ((c0 + Zero) - Zero) + diff --git a/tests/run-coverage/while.coverage b/tests/coverage/while.coverage index c9d497651..c9d497651 100644 --- a/tests/run-coverage/while.coverage +++ b/tests/coverage/while.coverage diff --git a/tests/coverage-map/status-quo/while.rs b/tests/coverage/while.rs index 781b90b35..781b90b35 100644 --- a/tests/coverage-map/status-quo/while.rs +++ b/tests/coverage/while.rs diff --git a/tests/coverage-map/status-quo/while_early_ret.cov-map b/tests/coverage/while_early_ret.cov-map index 369ebe891..369ebe891 100644 --- a/tests/coverage-map/status-quo/while_early_ret.cov-map +++ b/tests/coverage/while_early_ret.cov-map diff --git a/tests/run-coverage/while_early_ret.coverage b/tests/coverage/while_early_ret.coverage index 49d39d366..49d39d366 100644 --- a/tests/run-coverage/while_early_ret.coverage +++ b/tests/coverage/while_early_ret.coverage diff --git a/tests/coverage-map/status-quo/while_early_ret.rs b/tests/coverage/while_early_ret.rs index b2f0eee2c..b2f0eee2c 100644 --- a/tests/coverage-map/status-quo/while_early_ret.rs +++ b/tests/coverage/while_early_ret.rs diff --git a/tests/coverage/yield.cov-map b/tests/coverage/yield.cov-map new file mode 100644 index 000000000..c9c9709fa --- /dev/null +++ b/tests/coverage/yield.cov-map @@ -0,0 +1,62 @@ +Function name: yield::main +Raw bytes (106): 0x[01, 01, 0b, 05, 09, 0d, 11, 22, 15, 0d, 11, 11, 15, 22, 15, 0d, 11, 22, 15, 0d, 11, 19, 1d, 25, 29, 10, 01, 07, 01, 01, 16, 01, 06, 0b, 00, 2e, 0d, 01, 27, 00, 29, 03, 01, 0e, 00, 34, 0d, 02, 0b, 00, 2e, 22, 01, 22, 00, 27, 1e, 00, 2c, 00, 2e, 13, 01, 0e, 00, 34, 1e, 03, 09, 00, 16, 1e, 07, 0b, 00, 2e, 21, 01, 27, 00, 29, 27, 01, 0e, 00, 34, 21, 02, 0b, 00, 2e, 2d, 01, 27, 00, 29, 2b, 01, 0e, 00, 34, 2d, 02, 01, 00, 02] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 11 +- expression 0 operands: lhs = Counter(1), rhs = Counter(2) +- expression 1 operands: lhs = Counter(3), rhs = Counter(4) +- expression 2 operands: lhs = Expression(8, Sub), rhs = Counter(5) +- expression 3 operands: lhs = Counter(3), rhs = Counter(4) +- expression 4 operands: lhs = Counter(4), rhs = Counter(5) +- expression 5 operands: lhs = Expression(8, Sub), rhs = Counter(5) +- expression 6 operands: lhs = Counter(3), rhs = Counter(4) +- expression 7 operands: lhs = Expression(8, Sub), rhs = Counter(5) +- expression 8 operands: lhs = Counter(3), rhs = Counter(4) +- expression 9 operands: lhs = Counter(6), rhs = Counter(7) +- expression 10 operands: lhs = Counter(9), rhs = Counter(10) +Number of file 0 mappings: 16 +- Code(Counter(0)) at (prev + 7, 1) to (start + 1, 22) +- Code(Counter(0)) at (prev + 6, 11) to (start + 0, 46) +- Code(Counter(3)) at (prev + 1, 39) to (start + 0, 41) +- Code(Expression(0, Add)) at (prev + 1, 14) to (start + 0, 52) + = (c1 + c2) +- Code(Counter(3)) at (prev + 2, 11) to (start + 0, 46) +- Code(Expression(8, Sub)) at (prev + 1, 34) to (start + 0, 39) + = (c3 - c4) +- Code(Expression(7, Sub)) at (prev + 0, 44) to (start + 0, 46) + = ((c3 - c4) - c5) +- Code(Expression(4, Add)) at (prev + 1, 14) to (start + 0, 52) + = (c4 + c5) +- Code(Expression(7, Sub)) at (prev + 3, 9) to (start + 0, 22) + = ((c3 - c4) - c5) +- Code(Expression(7, Sub)) at (prev + 7, 11) to (start + 0, 46) + = ((c3 - c4) - c5) +- Code(Counter(8)) at (prev + 1, 39) to (start + 0, 41) +- Code(Expression(9, Add)) at (prev + 1, 14) to (start + 0, 52) + = (c6 + c7) +- Code(Counter(8)) at (prev + 2, 11) to (start + 0, 46) +- Code(Counter(11)) at (prev + 1, 39) to (start + 0, 41) +- Code(Expression(10, Add)) at (prev + 1, 14) to (start + 0, 52) + = (c9 + c10) +- Code(Counter(11)) at (prev + 2, 1) to (start + 0, 2) + +Function name: yield::main::{closure#0} +Raw bytes (14): 0x[01, 01, 00, 02, 01, 08, 1c, 01, 10, 05, 02, 10, 01, 06] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 2 +- Code(Counter(0)) at (prev + 8, 28) to (start + 1, 16) +- Code(Counter(1)) at (prev + 2, 16) to (start + 1, 6) + +Function name: yield::main::{closure#1} +Raw bytes (24): 0x[01, 01, 00, 04, 01, 16, 1c, 01, 10, 05, 02, 09, 00, 10, 09, 01, 09, 00, 10, 0d, 01, 10, 01, 06] +Number of files: 1 +- file 0 => global file 1 +Number of expressions: 0 +Number of file 0 mappings: 4 +- Code(Counter(0)) at (prev + 22, 28) to (start + 1, 16) +- Code(Counter(1)) at (prev + 2, 9) to (start + 0, 16) +- Code(Counter(2)) at (prev + 1, 9) to (start + 0, 16) +- Code(Counter(3)) at (prev + 1, 16) to (start + 1, 6) + diff --git a/tests/coverage/yield.coverage b/tests/coverage/yield.coverage new file mode 100644 index 000000000..d7e455f21 --- /dev/null +++ b/tests/coverage/yield.coverage @@ -0,0 +1,38 @@ + LL| |#![feature(coroutines, coroutine_trait)] + LL| |#![allow(unused_assignments)] + LL| | + LL| |use std::ops::{Coroutine, CoroutineState}; + LL| |use std::pin::Pin; + LL| | + LL| 1|fn main() { + LL| 1| let mut coroutine = || { + LL| 1| yield 1; + LL| 1| return "foo"; + LL| 1| }; + LL| | + LL| 1| match Pin::new(&mut coroutine).resume(()) { + LL| 1| CoroutineState::Yielded(1) => {} + LL| 0| _ => panic!("unexpected value from resume"), + LL| | } + LL| 1| match Pin::new(&mut coroutine).resume(()) { + LL| 1| CoroutineState::Complete("foo") => {} + LL| 0| _ => panic!("unexpected value from resume"), + LL| | } + LL| | + LL| 1| let mut coroutine = || { + LL| 1| yield 1; + LL| 1| yield 2; + LL| 0| yield 3; + LL| 0| return "foo"; + LL| 0| }; + LL| | + LL| 1| match Pin::new(&mut coroutine).resume(()) { + LL| 1| CoroutineState::Yielded(1) => {} + LL| 0| _ => panic!("unexpected value from resume"), + LL| | } + LL| 1| match Pin::new(&mut coroutine).resume(()) { + LL| 1| CoroutineState::Yielded(2) => {} + LL| 0| _ => panic!("unexpected value from resume"), + LL| | } + LL| 1|} + diff --git a/tests/coverage/yield.rs b/tests/coverage/yield.rs new file mode 100644 index 000000000..b7e2ba31b --- /dev/null +++ b/tests/coverage/yield.rs @@ -0,0 +1,37 @@ +#![feature(coroutines, coroutine_trait)] +#![allow(unused_assignments)] + +use std::ops::{Coroutine, CoroutineState}; +use std::pin::Pin; + +fn main() { + let mut coroutine = || { + yield 1; + return "foo"; + }; + + match Pin::new(&mut coroutine).resume(()) { + CoroutineState::Yielded(1) => {} + _ => panic!("unexpected value from resume"), + } + match Pin::new(&mut coroutine).resume(()) { + CoroutineState::Complete("foo") => {} + _ => panic!("unexpected value from resume"), + } + + let mut coroutine = || { + yield 1; + yield 2; + yield 3; + return "foo"; + }; + + match Pin::new(&mut coroutine).resume(()) { + CoroutineState::Yielded(1) => {} + _ => panic!("unexpected value from resume"), + } + match Pin::new(&mut coroutine).resume(()) { + CoroutineState::Yielded(2) => {} + _ => panic!("unexpected value from resume"), + } +} |