Overview
Add proptest property-based tests for validate_buffer_size (rust/cuprum-rust/src/lib.rs, line 119).
Baseline
No Rust-level #[test], proptest, Kani, or Verus coverage currently exists under rust/cuprum-rust.
Justification
Current tests hit 0 and normal values but not platform boundary values such as i64::MAX or values that overflow usize.
Benefit
Proves all non-positive values are rejected and accepted values fit usize on the target platform.
Cost Trade-Off
Low.
Verifiability Improvement
Extract checked_buffer_size(i64) -> Result<usize, ErrorKind> and add an explicit upper memory cap.
Tool Fit
proptest — straightforward numeric boundary coverage.
Raised from PR #62 by @leynos.
Overview
Add proptest property-based tests for
validate_buffer_size(rust/cuprum-rust/src/lib.rs, line 119).Baseline
No Rust-level
#[test], proptest, Kani, or Verus coverage currently exists underrust/cuprum-rust.Justification
Current tests hit
0and normal values but not platform boundary values such asi64::MAXor values that overflowusize.Benefit
Proves all non-positive values are rejected and accepted values fit
usizeon the target platform.Cost Trade-Off
Low.
Verifiability Improvement
Extract
checked_buffer_size(i64) -> Result<usize, ErrorKind>and add an explicit upper memory cap.Tool Fit
proptest — straightforward numeric boundary coverage.
Raised from PR #62 by @leynos.