Skip to main content

Crate saluki_antithesis

Crate saluki_antithesis 

Source
Expand description

Thin facade over the Antithesis SDK.

This crate owns the single antithesis feature for the project. It is no-op unless specifically enabled. Each macro forwards to the SDK macro. These macros convert a trailing map into JSON for consumption by the underlying SDK.

§Use Guidance

A more precise assertion gives Antithesis better exploration. Prefer the numeric macros like always_gt!(x, y, ...) over always!(x > y, ...).

Macros§

always
Asserts condition holds every time this line runs, and that the line runs at least once.
always_ge
Asserts left >= right always, with numeric guidance on the two operands.
always_gt
Asserts left > right always, with numeric guidance on the two operands.
always_le
Asserts left <= right always, with numeric guidance on the two operands.
always_lt
Asserts left < right always, with numeric guidance on the two operands.
always_or_unreachable
Asserts condition holds every time this line runs. Passes even if the line never runs.
always_some
Asserts at least one of the named conditions always holds, with per-name guidance.
reachable
Asserts this line is reached at least once.
sometimes
Asserts condition holds at least once across all runs of this line.
sometimes_all
Asserts every named condition holds at least once, with per-name guidance.
sometimes_ge
Asserts left >= right at least once, with numeric guidance on the two operands.
sometimes_gt
Asserts left > right at least once, with numeric guidance on the two operands.
sometimes_le
Asserts left <= right at least once, with numeric guidance on the two operands.
sometimes_lt
Asserts left < right at least once, with numeric guidance on the two operands.
unreachable
Asserts this line is never reached.

Functions§

init
Initializes the Antithesis SDK and its assertion catalog. No-op without the antithesis feature.