diff options
| author | Zalathar <Zalathar@users.noreply.github.com> | 2024-05-14 13:51:24 +1000 |
|---|---|---|
| committer | Zalathar <Zalathar@users.noreply.github.com> | 2024-05-14 13:58:40 +1000 |
| commit | d01df6f9aadf58a00357bd89b8fc25a44822ba77 (patch) | |
| tree | 4b2aa4b799457fe91c953b5462682577b793c54f /tests/coverage/while.cov-map | |
| parent | a68bb5e176ff7f250c0af00467a6793952be7489 (diff) | |
| download | rust-d01df6f9aadf58a00357bd89b8fc25a44822ba77.tar.gz rust-d01df6f9aadf58a00357bd89b8fc25a44822ba77.zip | |
coverage: Simplify counter expressions using simple algebra
Some of these cases currently don't occur in practice, but are included for completeness, and to avoid having to add them later as branch coverage and MC/DC coverage start building more complex expressions.
Diffstat (limited to 'tests/coverage/while.cov-map')
| -rw-r--r-- | tests/coverage/while.cov-map | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/coverage/while.cov-map b/tests/coverage/while.cov-map index c6557b48e27..4d813a935a0 100644 --- a/tests/coverage/while.cov-map +++ b/tests/coverage/while.cov-map @@ -1,15 +1,13 @@ 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, 02, 06, 06, 03, 01, 00, 02] +Raw bytes (26): 0x[01, 01, 01, 01, 00, 04, 01, 01, 01, 01, 10, 03, 02, 0b, 00, 14, 00, 00, 15, 02, 06, 01, 03, 01, 00, 02] Number of files: 1 - file 0 => global file 1 -Number of expressions: 2 +Number of expressions: 1 - 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 + 2, 6) -- Code(Expression(1, Sub)) at (prev + 3, 1) to (start + 0, 2) - = ((c0 + Zero) - Zero) +- Code(Counter(0)) at (prev + 3, 1) to (start + 0, 2) |
