rust/tests/coverage-map/long_and_wide.cov-map
Zalathar 004db4728b Add test suite coverage-map to test coverage mappings emitted by LLVM
We compile each test file to LLVM IR assembly, and then pass that IR to a
dedicated program that can decode LLVM coverage maps and print them in a more
human-readable format. We can then check that output against known-good
snapshots.

This test suite has some advantages over the existing `run-coverage` tests:

- We can test coverage instrumentation without needing to run target binaries.

- We can observe subtle improvements/regressions in the underlying coverage
mappings that don't make a visible difference to coverage reports.
2023-09-05 11:55:17 +10:00

33 lines
1022 B
Plaintext

Function name: long_and_wide::far_function
Raw bytes (10): 0x[01, 01, 00, 01, 01, 96, 01, 01, 00, 15]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
- Code(Counter(0)) at (prev + 150, 1) to (start + 0, 21)
Function name: long_and_wide::long_function
Raw bytes (10): 0x[01, 01, 00, 01, 01, 10, 01, 84, 01, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
- Code(Counter(0)) at (prev + 16, 1) to (start + 132, 2)
Function name: long_and_wide::main
Raw bytes (9): 0x[01, 01, 00, 01, 01, 07, 01, 04, 02]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
- Code(Counter(0)) at (prev + 7, 1) to (start + 4, 2)
Function name: long_and_wide::wide_function
Raw bytes (10): 0x[01, 01, 00, 01, 01, 0e, 01, 00, 8b, 01]
Number of files: 1
- file 0 => global file 1
Number of expressions: 0
Number of file 0 mappings: 1
- Code(Counter(0)) at (prev + 14, 1) to (start + 0, 139)