Skip to content

Convert unit tests to PBT with Hegel - #40

Merged
mrhheffernan merged 7 commits into
mainfrom
matt/hegel
Aug 28, 2026
Merged

mrhheffernan merged 7 commits into
mainfrom
matt/hegel

Conversation

@mrhheffernan

@mrhheffernan mrhheffernan commented Aug 28, 2026 •

Copy link
Copy Markdown
Owner

Description:

Explore property-based testing (PBT) with the Hegel library. Converts existing test coverage over to property-based #[hegel::test] tests.

Key changes:

  • Converted to Hegel property tests(generate random inputs via the engine instead of fixed fixtures):
  • New property tests added:
    • test_maximin_criterion_square_uniform / test_maxpro_criterion_square_uniform: generate an n×n design whose entries are bounded in [0, 1] and verify the criteria are well-defined.
    • test_calculate_l2_distance_symmetry: asserts dist(a, b) == dist(b, a) and dist(a, a) == 0.

Testing:

  • cargo test --lib — all 13 unit + property tests pass.
  • New/updated property tests run with cargo test --lib <test_name>.

Impacts:

  • Rust
  • Python

@mrhheffernan mrhheffernan changed the title Explore PBT with Hegel Convert unit tests to PBT with Hegel Aug 28, 2026
@mrhheffernan
mrhheffernan marked this pull request as ready for review August 28, 2026 05:28
@mrhheffernan
mrhheffernan merged commit 0b8782b into main Aug 28, 2026
18 checks passed
@mrhheffernan
mrhheffernan deleted the matt/hegel branch August 28, 2026 05:33
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.

1 participant