rust/tests/coverage/branch/if.cov-map
Zalathar d01df6f9aa 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.
2024-05-14 13:58:40 +10:00

131 lines
6.7 KiB
Plaintext

Function name: if::branch_and
Raw bytes (56): 0x[01, 01, 04, 05, 09, 0d, 02, 11, 0f, 0d, 02, 08, 01, 2b, 01, 01, 10, 05, 03, 08, 00, 09, 20, 09, 02, 00, 08, 00, 09, 09, 00, 0d, 00, 0e, 20, 11, 0d, 00, 0d, 00, 0e, 11, 00, 0f, 02, 06, 0f, 02, 0c, 02, 06, 0b, 03, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 4
- expression 0 operands: lhs = Counter(1), rhs = Counter(2)
- expression 1 operands: lhs = Counter(3), rhs = Expression(0, Sub)
- expression 2 operands: lhs = Counter(4), rhs = Expression(3, Add)
- expression 3 operands: lhs = Counter(3), rhs = Expression(0, Sub)
Number of file 0 mappings: 8
- Code(Counter(0)) at (prev + 43, 1) to (start + 1, 16)
- Code(Counter(1)) at (prev + 3, 8) to (start + 0, 9)
- Branch { true: Counter(2), false: Expression(0, Sub) } at (prev + 0, 8) to (start + 0, 9)
true = c2
false = (c1 - c2)
- Code(Counter(2)) at (prev + 0, 13) to (start + 0, 14)
- Branch { true: Counter(4), false: Counter(3) } at (prev + 0, 13) to (start + 0, 14)
true = c4
false = c3
- Code(Counter(4)) at (prev + 0, 15) to (start + 2, 6)
- Code(Expression(3, Add)) at (prev + 2, 12) to (start + 2, 6)
= (c3 + (c1 - c2))
- Code(Expression(2, Add)) at (prev + 3, 1) to (start + 0, 2)
= (c4 + (c3 + (c1 - c2)))
Function name: if::branch_not
Raw bytes (116): 0x[01, 01, 07, 05, 09, 05, 0d, 05, 0d, 05, 11, 05, 11, 05, 15, 05, 15, 12, 01, 0c, 01, 01, 10, 05, 03, 08, 00, 09, 20, 09, 02, 00, 08, 00, 09, 09, 01, 09, 00, 11, 02, 01, 06, 00, 07, 05, 01, 08, 00, 0a, 20, 0a, 0d, 00, 08, 00, 0a, 0a, 00, 0b, 02, 06, 0d, 02, 06, 00, 07, 05, 01, 08, 00, 0b, 20, 11, 12, 00, 08, 00, 0b, 11, 00, 0c, 02, 06, 12, 02, 06, 00, 07, 05, 01, 08, 00, 0c, 20, 1a, 15, 00, 08, 00, 0c, 1a, 00, 0d, 02, 06, 15, 02, 06, 00, 07, 05, 01, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 7
- expression 0 operands: lhs = Counter(1), rhs = Counter(2)
- expression 1 operands: lhs = Counter(1), rhs = Counter(3)
- expression 2 operands: lhs = Counter(1), rhs = Counter(3)
- expression 3 operands: lhs = Counter(1), rhs = Counter(4)
- expression 4 operands: lhs = Counter(1), rhs = Counter(4)
- expression 5 operands: lhs = Counter(1), rhs = Counter(5)
- expression 6 operands: lhs = Counter(1), rhs = Counter(5)
Number of file 0 mappings: 18
- Code(Counter(0)) at (prev + 12, 1) to (start + 1, 16)
- Code(Counter(1)) at (prev + 3, 8) to (start + 0, 9)
- Branch { true: Counter(2), false: Expression(0, Sub) } at (prev + 0, 8) to (start + 0, 9)
true = c2
false = (c1 - c2)
- Code(Counter(2)) at (prev + 1, 9) to (start + 0, 17)
- Code(Expression(0, Sub)) at (prev + 1, 6) to (start + 0, 7)
= (c1 - c2)
- Code(Counter(1)) at (prev + 1, 8) to (start + 0, 10)
- Branch { true: Expression(2, Sub), false: Counter(3) } at (prev + 0, 8) to (start + 0, 10)
true = (c1 - c3)
false = c3
- Code(Expression(2, Sub)) at (prev + 0, 11) to (start + 2, 6)
= (c1 - c3)
- Code(Counter(3)) at (prev + 2, 6) to (start + 0, 7)
- Code(Counter(1)) at (prev + 1, 8) to (start + 0, 11)
- Branch { true: Counter(4), false: Expression(4, Sub) } at (prev + 0, 8) to (start + 0, 11)
true = c4
false = (c1 - c4)
- Code(Counter(4)) at (prev + 0, 12) to (start + 2, 6)
- Code(Expression(4, Sub)) at (prev + 2, 6) to (start + 0, 7)
= (c1 - c4)
- Code(Counter(1)) at (prev + 1, 8) to (start + 0, 12)
- Branch { true: Expression(6, Sub), false: Counter(5) } at (prev + 0, 8) to (start + 0, 12)
true = (c1 - c5)
false = c5
- Code(Expression(6, Sub)) at (prev + 0, 13) to (start + 2, 6)
= (c1 - c5)
- Code(Counter(5)) at (prev + 2, 6) to (start + 0, 7)
- Code(Counter(1)) at (prev + 1, 1) to (start + 0, 2)
Function name: if::branch_not_as
Raw bytes (90): 0x[01, 01, 05, 05, 09, 05, 0d, 05, 0d, 05, 11, 05, 11, 0e, 01, 1d, 01, 01, 10, 05, 03, 08, 00, 14, 20, 02, 09, 00, 08, 00, 14, 02, 00, 15, 02, 06, 09, 02, 06, 00, 07, 05, 01, 08, 00, 15, 20, 0d, 0a, 00, 08, 00, 15, 0d, 00, 16, 02, 06, 0a, 02, 06, 00, 07, 05, 01, 08, 00, 16, 20, 12, 11, 00, 08, 00, 16, 12, 00, 17, 02, 06, 11, 02, 06, 00, 07, 05, 01, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 5
- expression 0 operands: lhs = Counter(1), rhs = Counter(2)
- expression 1 operands: lhs = Counter(1), rhs = Counter(3)
- expression 2 operands: lhs = Counter(1), rhs = Counter(3)
- expression 3 operands: lhs = Counter(1), rhs = Counter(4)
- expression 4 operands: lhs = Counter(1), rhs = Counter(4)
Number of file 0 mappings: 14
- Code(Counter(0)) at (prev + 29, 1) to (start + 1, 16)
- Code(Counter(1)) at (prev + 3, 8) to (start + 0, 20)
- Branch { true: Expression(0, Sub), false: Counter(2) } at (prev + 0, 8) to (start + 0, 20)
true = (c1 - c2)
false = c2
- Code(Expression(0, Sub)) at (prev + 0, 21) to (start + 2, 6)
= (c1 - c2)
- Code(Counter(2)) at (prev + 2, 6) to (start + 0, 7)
- Code(Counter(1)) at (prev + 1, 8) to (start + 0, 21)
- Branch { true: Counter(3), false: Expression(2, Sub) } at (prev + 0, 8) to (start + 0, 21)
true = c3
false = (c1 - c3)
- Code(Counter(3)) at (prev + 0, 22) to (start + 2, 6)
- Code(Expression(2, Sub)) at (prev + 2, 6) to (start + 0, 7)
= (c1 - c3)
- Code(Counter(1)) at (prev + 1, 8) to (start + 0, 22)
- Branch { true: Expression(4, Sub), false: Counter(4) } at (prev + 0, 8) to (start + 0, 22)
true = (c1 - c4)
false = c4
- Code(Expression(4, Sub)) at (prev + 0, 23) to (start + 2, 6)
= (c1 - c4)
- Code(Counter(4)) at (prev + 2, 6) to (start + 0, 7)
- Code(Counter(1)) at (prev + 1, 1) to (start + 0, 2)
Function name: if::branch_or
Raw bytes (56): 0x[01, 01, 04, 05, 09, 09, 0d, 0f, 11, 09, 0d, 08, 01, 35, 01, 01, 10, 05, 03, 08, 00, 09, 20, 09, 02, 00, 08, 00, 09, 02, 00, 0d, 00, 0e, 20, 0d, 11, 00, 0d, 00, 0e, 0f, 00, 0f, 02, 06, 11, 02, 0c, 02, 06, 0b, 03, 01, 00, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 4
- expression 0 operands: lhs = Counter(1), rhs = Counter(2)
- expression 1 operands: lhs = Counter(2), rhs = Counter(3)
- expression 2 operands: lhs = Expression(3, Add), rhs = Counter(4)
- expression 3 operands: lhs = Counter(2), rhs = Counter(3)
Number of file 0 mappings: 8
- Code(Counter(0)) at (prev + 53, 1) to (start + 1, 16)
- Code(Counter(1)) at (prev + 3, 8) to (start + 0, 9)
- Branch { true: Counter(2), false: Expression(0, Sub) } at (prev + 0, 8) to (start + 0, 9)
true = c2
false = (c1 - c2)
- Code(Expression(0, Sub)) at (prev + 0, 13) to (start + 0, 14)
= (c1 - c2)
- Branch { true: Counter(3), false: Counter(4) } at (prev + 0, 13) to (start + 0, 14)
true = c3
false = c4
- Code(Expression(3, Add)) at (prev + 0, 15) to (start + 2, 6)
= (c2 + c3)
- Code(Counter(4)) at (prev + 2, 12) to (start + 2, 6)
- Code(Expression(2, Add)) at (prev + 3, 1) to (start + 0, 2)
= ((c2 + c3) + c4)