Skip to content

Change proptest to property_test - #424

Merged
skejserjensen merged 4 commits into
mainfrom
dev/use_property_test
Aug 28, 2026
Merged

Change proptest to property_test#424
skejserjensen merged 4 commits into
mainfrom
dev/use_property_test

Conversation

@skejserjensen

Copy link
Copy Markdown
Contributor

This PR fixes #372 by changing all proptest to property_test.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 in Cargo.toml to 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 (see test_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.

Comment thread crates/modelardb_types/src/types.rs Outdated
Comment thread crates/modelardb_compression/src/models/swing.rs
@skejserjensen
skejserjensen force-pushed the dev/use_property_test branch from 4a0e3e5 to 9ea68d8 Compare August 25, 2026 11:36
Comment thread crates/modelardb_server/src/storage/uncompressed_data_manager.rs Outdated
Co-authored-by: Christian Thomsen <chr@cs.aau.dk>
@skejserjensen
skejserjensen merged commit 425230a into main Aug 28, 2026
5 checks passed
@skejserjensen
skejserjensen deleted the dev/use_property_test branch August 28, 2026 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Check if #[property_test] can replace proptest!{}

4 participants