about summary refs log tree commit diff
path: root/tests/run-coverage/loop_break_value.coverage
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-06-29 16:36:31 +0200
committerGitHub <noreply@github.com>2023-06-29 16:36:31 +0200
commitf00db43e97dc9a4138686e5fca0fdb0be0775eed (patch)
treea143c85fcfcc7d7af6f4882abc7586ee8c80dfe7 /tests/run-coverage/loop_break_value.coverage
parent93a97c7a2a7d6ddcc40254331ce81f2fc1fe0790 (diff)
parent7b4e75b98965f45dd35a31968d388c7deca997a2 (diff)
Rollup merge of #112300 - Zalathar:run-coverage, r=wesleywiser
Convert `run-make/coverage-reports` tests to use a custom compiletest mode

I was frustrated by the fact that most of the coverage tests are glued together with makefiles and shell scripts, so I tried my hand at converting most of them over to a newly-implemented `run-coverage` mode/suite in compiletest.

This ~~*mostly*~~ resolves #85009, ~~though I've left a small number of the existing tests as-is because they would require more work to fix/support~~.

---

I had time to go back and add support for the more troublesome tests that I had initially skipped over, so this PR now manages to completely get rid of `run-make/coverage-reports`.

---

The patches are arranged as follows:

- Declare the new mode/suite in bootstrap
- Small changes to compiletest that will be used by the new mode
- Implement the new mode in compiletest
- Migrate most of the tests over
- Add more code to bootstrap and compiletest to support the remaining tests
- Migrate the remaining tests (with some temporary hacks to avoid re-blessing them)
- Remove the temporary hacks and re-bless the migrated tests
- Remove the unused remnants of `run-make/coverage-reports`
Diffstat (limited to 'tests/run-coverage/loop_break_value.coverage')
-rw-r--r--tests/run-coverage/loop_break_value.coverage14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/run-coverage/loop_break_value.coverage b/tests/run-coverage/loop_break_value.coverage
new file mode 100644
index 00000000000..022fe4c5962
--- /dev/null
+++ b/tests/run-coverage/loop_break_value.coverage
@@ -0,0 +1,14 @@
+    1|       |#![allow(unused_assignments, unused_variables)]
+    2|       |
+    3|      1|fn main() {
+    4|      1|    let result
+    5|      1|        =
+    6|      1|            loop
+    7|      1|        {
+    8|      1|            break
+    9|      1|            10
+   10|      1|            ;
+   11|      1|        }
+   12|      1|    ;
+   13|      1|}
+