diff options
| author | Zalathar <Zalathar@users.noreply.github.com> | 2023-11-30 17:45:03 +1100 |
|---|---|---|
| committer | Zalathar <Zalathar@users.noreply.github.com> | 2024-01-05 13:42:54 +1100 |
| commit | aa4bf0bbf0078ca0f9b2cc1a9c0edea0b551af35 (patch) | |
| tree | 7320fa710f87ff66218a6be4adba157e7415d45e /tests/coverage | |
| parent | f9df1ad4f252531d0d66c97beb0d25c0deb3e07d (diff) | |
| download | rust-aa4bf0bbf0078ca0f9b2cc1a9c0edea0b551af35.tar.gz rust-aa4bf0bbf0078ca0f9b2cc1a9c0edea0b551af35.zip | |
Allow tests to ignore individual test modes
Normally, each test in `tests/coverage` is automatically run in both `coverage-map` mode and `coverage-run` mode. This new family of directives allows an individual test to specify that it should not be run in a particular mode.
Diffstat (limited to 'tests/coverage')
| -rw-r--r-- | tests/coverage/ignore_map.coverage | 4 | ||||
| -rw-r--r-- | tests/coverage/ignore_map.rs | 3 | ||||
| -rw-r--r-- | tests/coverage/ignore_run.cov-map | 8 | ||||
| -rw-r--r-- | tests/coverage/ignore_run.rs | 3 |
4 files changed, 18 insertions, 0 deletions
diff --git a/tests/coverage/ignore_map.coverage b/tests/coverage/ignore_map.coverage new file mode 100644 index 00000000000..04bcb5bec6e --- /dev/null +++ b/tests/coverage/ignore_map.coverage @@ -0,0 +1,4 @@ + LL| |// ignore-mode-coverage-map + LL| | + LL| 1|fn main() {} + diff --git a/tests/coverage/ignore_map.rs b/tests/coverage/ignore_map.rs new file mode 100644 index 00000000000..71b82e8fc9d --- /dev/null +++ b/tests/coverage/ignore_map.rs @@ -0,0 +1,3 @@ +// ignore-mode-coverage-map + +fn main() {} diff --git a/tests/coverage/ignore_run.cov-map b/tests/coverage/ignore_run.cov-map new file mode 100644 index 00000000000..9865efae0a1 --- /dev/null +++ b/tests/coverage/ignore_run.cov-map @@ -0,0 +1,8 @@ +Function name: ignore_run::main +Raw bytes (9): 0x[01, 01, 00, 01, 01, 03, 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 + 3, 1) to (start + 0, 13) + diff --git a/tests/coverage/ignore_run.rs b/tests/coverage/ignore_run.rs new file mode 100644 index 00000000000..87108867a05 --- /dev/null +++ b/tests/coverage/ignore_run.rs @@ -0,0 +1,3 @@ +// ignore-mode-coverage-run + +fn main() {} |
