Skip to main content

assert_has_leaks

Macro assert_has_leaks 

Source
macro_rules! assert_has_leaks {
    ($body:expr, $expected:expr) => { ... };
}
Expand description

Assert that an obligation body has exactly the specified number of leaks.

§Example

use asupersync::{assert_has_leaks, obligation_body};
use asupersync::record::ObligationKind;

let body = obligation_body!("leaky", |b| {
    let _v = b.reserve(ObligationKind::SendPermit);
    // No commit or abort — definite leak.
});
assert_has_leaks!(body, 1);