surrealpatch/lib/tests/util.rs
Przemyslaw Hugh Kaznowski 769ed5ab85
Sur 253 Change Cl->Nd, rework key/mod (#2257)
Co-authored-by: Tobie Morgan Hitchcock <tobie@surrealdb.com>
2023-07-18 18:32:38 +00:00

23 lines
461 B
Rust

#[allow(unused_macros)]
macro_rules! assert_empty_val {
($tx:expr, $key:expr) => {{
let r = $tx.get($key).await?;
assert!(r.is_none());
}};
}
#[allow(unused_macros)]
macro_rules! assert_empty_prefix {
($tx:expr, $rng:expr) => {{
let r = $tx.getp($rng, 1).await?;
assert!(r.is_empty());
}};
}
#[allow(unused_macros)]
macro_rules! assert_empty_range {
($tx:expr, $rng:expr) => {{
let r = $tx.getr($rng, 1).await?;
assert!(r.is_empty());
}};
}