Change proptest to property_test - #424
Merged
Merged
Conversation
skejserjensen
requested review from
CGodiksen and
chrthomsen
and
a lite review from Copilot
August 22, 2026 10:35
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses #372 by migrating property-based tests from the proptest! { ... } macro to the #[property_test] attribute macro to improve tooling compatibility (e.g., rustfmt support within tests).
Changes:
- Replaced
proptest!macro blocks with#[property_test]functions and#[strategy = ...]parameters across multiple test modules. - Enabled
proptest’s attribute-macro feature inCargo.tomlto support#[property_test]. - Updated dependency lockfile as part of the dependency resolution changes.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/modelardb_types/src/types.rs | Converts ErrorBound proptests to #[property_test] with inline strategies. |
| crates/modelardb_server/src/storage/uncompressed_data_buffer.rs | Converts sorting proptests to #[property_test] and reformats for readability. |
| crates/modelardb_compression/src/models/timestamps.rs | Converts timestamp compression proptest to #[property_test]. |
| crates/modelardb_compression/src/models/swing.rs | Converts many Swing proptests to #[property_test] and updates strategies. |
| crates/modelardb_compression/src/models/pmc_mean.rs | Converts PMCMean proptests to #[property_test]. |
| crates/modelardb_compression/src/models/mod.rs | Converts models module proptests to #[property_test]. |
| crates/modelardb_compression/src/models/macaque_v.rs | Converts MacaqueV proptests to #[property_test] and adjusts formatting. |
| crates/modelardb_compression/src/models/bits.rs | Converts BitVec proptest to #[property_test]. |
| Cargo.toml | Enables proptest feature attr-macro. |
| Cargo.lock | Adds proptest-macro and includes broad dependency version updates. |
Suppressed comments (1)
crates/modelardb_types/src/types.rs:734
- The generated strategy includes 0.0, but
try_new_relative(0.0)is expected to fail (seetest_relative_error_bound_cannot_be_zero). This property test will fail whenever 0.0 is generated. Use a strictly-positive range.
#[strategy = 0.0..=f32::MAX] percentage: f32,
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
CGodiksen
approved these changes
Aug 23, 2026
skejserjensen
force-pushed
the
dev/use_property_test
branch
from
August 25, 2026 09:32
b7ecda9 to
4a0e3e5
Compare
skejserjensen
force-pushed
the
dev/use_property_test
branch
from
August 25, 2026 11:36
4a0e3e5 to
9ea68d8
Compare
chrthomsen
approved these changes
Aug 28, 2026
Co-authored-by: Christian Thomsen <chr@cs.aau.dk>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes #372 by changing all
proptesttoproperty_test.