viiccwen opened a new issue, #1181:
URL: https://github.com/apache/mahout/issues/1181

   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`.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to