ref: #1058
What
Add focused tests for qdp/qdp-core/src/encoding/angle.rs.
Current coverage for this file is still zero:
- Function coverage:
0.00% (0/4)
- Line coverage:
0.00% (0/77)
Why
The streaming angle encoder has important validation branches that are not covered at all right now, including:
- qubit and sample-size mismatch
- chunk-size overflow checks
- non-finite angle rejection
- kernel launch path coverage
Without tests here, it is easy to break error messages or validation behavior without noticing.
How
Add tests under qdp/qdp-core/tests/ that exercise qdp/qdp-core/src/encoding/angle.rs, ideally through the same streaming entry point used in production.
Suggested coverage targets:
- reject
sample_size == 0
- reject
sample_size > STAGE_SIZE_ELEMENTS
- reject
sample_size != num_qubits
- reject
NaN and infinity with sample and angle index in the error
- add one happy-path encode that reaches the kernel launch path
This issue is done when encoding/angle.rs has meaningful non-zero coverage in cargo llvm-cov.