Skip to main content

turso_assert_eq

Macro turso_assert_eq 

Source
turso_assert_eq!() { /* proc-macro */ }
Expand description

Drop-in replacement for [assert_eq!] that additionally reports to the Antithesis SDK in Antithesis builds (--cfg=antithesis).

§Behavior

  • Without antithesis feature: behaves exactly like [assert_eq!].
  • With antithesis feature: reports to Antithesis, then on failure prints the error and calls std::process::exit(0).

§Parameters

  • left, right — values to compare for equality.
  • "message" (optional) — auto-generated as "left == right" if omitted.
  • { "key": value, ... } (optional) — structured details.

§Usage

turso_assert_eq!(left, right);
turso_assert_eq!(left, right, "message");
turso_assert_eq!(left, right, "message", { "key": value });

§Examples

turso_assert_eq!(QueryMode::new(&cmd), mode);
turso_assert_eq!(joined_tables.len(), 1, "expected only one joined table");