Module assertions

Module assertions 

Source
Expand description

Assertion macros and result tracking for simulation testing.

This module provides always_assert! and sometimes_assert! macros for testing distributed system properties. Assertions are tracked using thread-local storage to enable statistical analysis of system behavior across multiple simulation runs.

Structs§

AssertionStats
Statistics for a tracked assertion.

Functions§

get_assertion_results
Get current assertion statistics for all tracked assertions.
panic_on_assertion_violations
Check assertion validation and panic if violations are found.
record_assertion
Record an assertion result for statistical tracking.
reset_assertion_results
Reset all assertion statistics to empty state.
validate_assertion_contracts
Validate that all sometimes_assert! assertions actually behave as “sometimes”.