macro_rules! assert_always_greater_than {
($left:expr, $right:expr, $message:expr$(, $details:expr)?) => { ... };
($($rest:tt)*) => { ... };
}Expand description
assert_always_greater_than(x, y, ...) is mostly equivalent to assert_always!(x > y, ...), except Antithesis has more visibility to the value of x and y, and the assertion details would be merged with {"left": x, "right": y}.
Ensure that non-const-evaluable messages are rejected.
use serde_json::json;
const MESSAGE: &str = concat!("x", " over y");
antithesis_sdk::assert_always_greater_than!(2, 1, MESSAGE, &json!({}));ⓘ
use serde_json::json;
antithesis_sdk::assert_always_greater_than!(2, 1, format!("{}", "x over y"), &json!({}));