Skip to content

Property-based tests for split-stream weight allocation #9

Description

@gbengaeben

Category: Testing | Priority: Low | Dependencies: none | Out of scope: new split entrypoints

Description & Context: Split dust math (largest-remainder) has unit tests but no randomized proptest — the settlement invariant only fuzzes single streams. Weight/dust edge cases deserve the same treatment.

Acceptance Criteria / DoD:

  • proptest over random (total_amount, weights) for both _bps and _pct: shares sum to exactly total; every share > 0; no share > total; deterministic across runs (same seed)
  • Property test: per-member created events' amounts sum to the single pulled total
  • Run in CI (rust.yml) alongside the existing proptest suite

How to verify: cargo test -p stream-core split — new properties run thousands of random cases, all green.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    contractsSoroban contracts (Rust)testingTest coverage & QA

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions