tisonkun commented on PR #168: URL: https://github.com/apache/datasketches-rust/pull/168#issuecomment-5101229138
### Test migration review I re-reviewed `fa98dce`, `95197af`, and `a93e3c9` against one boundary: tests should protect user-visible behavior or a concrete regression, not private storage layout or control flow. **Motivation** - Theta and Tuple use the same generic hash-table machinery, so parallel private suites duplicated coverage and coupled tests to resize and capacity details. - Rejection of malformed serialized input is a public deserialization contract and belongs at the integration boundary across sketch families. - Tuple compaction and generic summary policies are public API capabilities, so their meaningful contracts must remain covered after the internal tests are reduced. **Result** - Kept the duplicate private hash-table tests removed. Follow-up `5f27d94` preserves the important selection invariant through the public Theta API: after `trim`, the sketch retains exactly the smallest `k` hashes and sets theta to the next hash. Private table size, probing, resize, and memory-layout checks remain intentionally untested. - Kept malformed-input coverage consolidated in `serde_tests`. Follow-up `6f65c94` first verifies that the complete serialization deserializes successfully, then verifies that every proper prefix is rejected with `InvalidData`. This prevents an invalid fixture from making the truncation test pass falsely. - Follow-up `863b167` removes the remaining test module from `src/tuple/sketch.rs` and covers compaction through the public integration suite in both exact and estimation modes, including entries, summaries, theta, seed, estimate, and requested ordering. It also restores public generic-policy coverage for a distinct `AddAssign` RHS and for one policy accepting multiple update representations. The narrower max-policy test was replaced rather than duplicated. - No production behavior was changed. **Validation** - `cargo x check` - `cargo x test` — 481 tests passed, including 125 doctests - `cargo x lint` -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
