Skip to content

Commit e0625b4

Browse files
committed
Migrate most of the existing coverage tests over to run-coverage
1 parent 22e119b commit e0625b4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+24
-20
lines changed
File renamed without changes.

tests/run-make/coverage-reports/expected_show_coverage.assert.txt renamed to tests/run-coverage/assert.coverage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
1| |#![allow(unused_assignments)]
2-
2| |// expect-exit-status-101
2+
2| |// failure-status: 101
33
3| |
44
4| 4|fn might_fail_assert(one_plus_one: u32) {
55
5| 4| println!("does 1 + 1 = {}?", one_plus_one);

tests/run-make/coverage/assert.rs renamed to tests/run-coverage/assert.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![allow(unused_assignments)]
2-
// expect-exit-status-101
2+
// failure-status: 101
33

44
fn might_fail_assert(one_plus_one: u32) {
55
println!("does 1 + 1 = {}?", one_plus_one);
File renamed without changes.
File renamed without changes.

tests/run-make/coverage-reports/expected_show_coverage.closure.txt renamed to tests/run-coverage/closure.coverage

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
1| |#![allow(unused_assignments, unused_variables)]
2-
2| |// compile-flags: -C opt-level=2 # fix described in rustc_middle/mir/mono.rs
3-
3| 1|fn main() {
2+
2| |// compile-flags: -C opt-level=2
3+
3| 1|fn main() { // ^^ fix described in rustc_middle/mir/mono.rs
44
4| 1| // Initialize test constants in a way that cannot be determined at compile time, to ensure
55
5| 1| // rustc and LLVM cannot optimize out statements (or coverage counters) downstream from
66
6| 1| // dependent conditions.

tests/run-make/coverage/closure.rs renamed to tests/run-coverage/closure.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![allow(unused_assignments, unused_variables)]
2-
// compile-flags: -C opt-level=2 # fix described in rustc_middle/mir/mono.rs
3-
fn main() {
2+
// compile-flags: -C opt-level=2
3+
fn main() { // ^^ fix described in rustc_middle/mir/mono.rs
44
// Initialize test constants in a way that cannot be determined at compile time, to ensure
55
// rustc and LLVM cannot optimize out statements (or coverage counters) downstream from
66
// dependent conditions.

0 commit comments

Comments
 (0)