diff options
Diffstat (limited to 'tests/coverage')
| -rw-r--r-- | tests/coverage/branch/no-mir-spans.cov-map | 63 | ||||
| -rw-r--r-- | tests/coverage/branch/no-mir-spans.coverage | 77 | ||||
| -rw-r--r-- | tests/coverage/branch/no-mir-spans.rs | 62 |
3 files changed, 0 insertions, 202 deletions
diff --git a/tests/coverage/branch/no-mir-spans.cov-map b/tests/coverage/branch/no-mir-spans.cov-map deleted file mode 100644 index 4f893cba1f8..00000000000 --- a/tests/coverage/branch/no-mir-spans.cov-map +++ /dev/null @@ -1,63 +0,0 @@ -Function name: no_mir_spans::while_cond -Raw bytes (18): 0x[01, 01, 01, 05, 01, 02, 01, 10, 01, 00, 10, 20, 02, 01, 04, 0b, 00, 10] -Number of files: 1 -- file 0 => $DIR/no-mir-spans.rs -Number of expressions: 1 -- expression 0 operands: lhs = Counter(1), rhs = Counter(0) -Number of file 0 mappings: 2 -- Code(Counter(0)) at (prev + 16, 1) to (start + 0, 16) -- Branch { true: Expression(0, Sub), false: Counter(0) } at (prev + 4, 11) to (start + 0, 16) - true = (c1 - c0) - false = c0 -Highest counter ID seen: c0 - -Function name: no_mir_spans::while_cond_not -Raw bytes (18): 0x[01, 01, 01, 05, 01, 02, 01, 19, 01, 00, 14, 20, 02, 01, 04, 0b, 00, 14] -Number of files: 1 -- file 0 => $DIR/no-mir-spans.rs -Number of expressions: 1 -- expression 0 operands: lhs = Counter(1), rhs = Counter(0) -Number of file 0 mappings: 2 -- Code(Counter(0)) at (prev + 25, 1) to (start + 0, 20) -- Branch { true: Expression(0, Sub), false: Counter(0) } at (prev + 4, 11) to (start + 0, 20) - true = (c1 - c0) - false = c0 -Highest counter ID seen: c0 - -Function name: no_mir_spans::while_op_and -Raw bytes (31): 0x[01, 01, 04, 09, 05, 09, 01, 0f, 09, 01, 05, 03, 01, 22, 01, 00, 12, 20, 05, 02, 05, 0b, 00, 10, 20, 06, 0a, 00, 14, 00, 19] -Number of files: 1 -- file 0 => $DIR/no-mir-spans.rs -Number of expressions: 4 -- expression 0 operands: lhs = Counter(2), rhs = Counter(1) -- expression 1 operands: lhs = Counter(2), rhs = Counter(0) -- expression 2 operands: lhs = Expression(3, Add), rhs = Counter(2) -- expression 3 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 3 -- Code(Counter(0)) at (prev + 34, 1) to (start + 0, 18) -- Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 5, 11) to (start + 0, 16) - true = c1 - false = (c2 - c1) -- Branch { true: Expression(1, Sub), false: Expression(2, Sub) } at (prev + 0, 20) to (start + 0, 25) - true = (c2 - c0) - false = ((c0 + c1) - c2) -Highest counter ID seen: c1 - -Function name: no_mir_spans::while_op_or -Raw bytes (29): 0x[01, 01, 03, 09, 05, 09, 0b, 01, 05, 03, 01, 2d, 01, 00, 11, 20, 05, 02, 05, 0b, 00, 10, 20, 06, 01, 00, 14, 00, 19] -Number of files: 1 -- file 0 => $DIR/no-mir-spans.rs -Number of expressions: 3 -- expression 0 operands: lhs = Counter(2), rhs = Counter(1) -- expression 1 operands: lhs = Counter(2), rhs = Expression(2, Add) -- expression 2 operands: lhs = Counter(0), rhs = Counter(1) -Number of file 0 mappings: 3 -- Code(Counter(0)) at (prev + 45, 1) to (start + 0, 17) -- Branch { true: Counter(1), false: Expression(0, Sub) } at (prev + 5, 11) to (start + 0, 16) - true = c1 - false = (c2 - c1) -- Branch { true: Expression(1, Sub), false: Counter(0) } at (prev + 0, 20) to (start + 0, 25) - true = (c2 - (c0 + c1)) - false = c0 -Highest counter ID seen: c1 - diff --git a/tests/coverage/branch/no-mir-spans.coverage b/tests/coverage/branch/no-mir-spans.coverage deleted file mode 100644 index 2cae98ed3ff..00000000000 --- a/tests/coverage/branch/no-mir-spans.coverage +++ /dev/null @@ -1,77 +0,0 @@ - LL| |#![feature(coverage_attribute)] - LL| |//@ edition: 2021 - LL| |//@ compile-flags: -Zcoverage-options=branch,no-mir-spans - LL| |//@ llvm-cov-flags: --show-branches=count - LL| | - LL| |// Tests the behaviour of the `-Zcoverage-options=no-mir-spans` debugging flag. - LL| |// The actual code below is just some non-trivial code copied from another test - LL| |// (`while.rs`), and has no particular significance. - LL| | - LL| |macro_rules! no_merge { - LL| | () => { - LL| | for _ in 0..1 {} - LL| | }; - LL| |} - LL| | - LL| 1|fn while_cond() { - LL| | no_merge!(); - LL| | - LL| | let mut a = 8; - LL| | while a > 0 { - ------------------ - | Branch (LL:11): [True: 8, False: 1] - ------------------ - LL| | a -= 1; - LL| | } - LL| |} - LL| | - LL| 1|fn while_cond_not() { - LL| | no_merge!(); - LL| | - LL| | let mut a = 8; - LL| | while !(a == 0) { - ------------------ - | Branch (LL:11): [True: 8, False: 1] - ------------------ - LL| | a -= 1; - LL| | } - LL| |} - LL| | - LL| 1|fn while_op_and() { - LL| | no_merge!(); - LL| | - LL| | let mut a = 8; - LL| | let mut b = 4; - LL| | while a > 0 && b > 0 { - ------------------ - | Branch (LL:11): [True: 5, False: 0] - | Branch (LL:20): [True: 4, False: 1] - ------------------ - LL| | a -= 1; - LL| | b -= 1; - LL| | } - LL| |} - LL| | - LL| 1|fn while_op_or() { - LL| | no_merge!(); - LL| | - LL| | let mut a = 4; - LL| | let mut b = 8; - LL| | while a > 0 || b > 0 { - ------------------ - | Branch (LL:11): [True: 4, False: 5] - | Branch (LL:20): [True: 4, False: 1] - ------------------ - LL| | a -= 1; - LL| | b -= 1; - LL| | } - LL| |} - LL| | - LL| |#[coverage(off)] - LL| |fn main() { - LL| | while_cond(); - LL| | while_cond_not(); - LL| | while_op_and(); - LL| | while_op_or(); - LL| |} - diff --git a/tests/coverage/branch/no-mir-spans.rs b/tests/coverage/branch/no-mir-spans.rs deleted file mode 100644 index acb268f2d45..00000000000 --- a/tests/coverage/branch/no-mir-spans.rs +++ /dev/null @@ -1,62 +0,0 @@ -#![feature(coverage_attribute)] -//@ edition: 2021 -//@ compile-flags: -Zcoverage-options=branch,no-mir-spans -//@ llvm-cov-flags: --show-branches=count - -// Tests the behaviour of the `-Zcoverage-options=no-mir-spans` debugging flag. -// The actual code below is just some non-trivial code copied from another test -// (`while.rs`), and has no particular significance. - -macro_rules! no_merge { - () => { - for _ in 0..1 {} - }; -} - -fn while_cond() { - no_merge!(); - - let mut a = 8; - while a > 0 { - a -= 1; - } -} - -fn while_cond_not() { - no_merge!(); - - let mut a = 8; - while !(a == 0) { - a -= 1; - } -} - -fn while_op_and() { - no_merge!(); - - let mut a = 8; - let mut b = 4; - while a > 0 && b > 0 { - a -= 1; - b -= 1; - } -} - -fn while_op_or() { - no_merge!(); - - let mut a = 4; - let mut b = 8; - while a > 0 || b > 0 { - a -= 1; - b -= 1; - } -} - -#[coverage(off)] -fn main() { - while_cond(); - while_cond_not(); - while_op_and(); - while_op_or(); -} |
