mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-23 13:10:19 +00:00
0e5366df5d
This will be more compatible once we move to having queries have an associated `DynDb` type. It also reads nicely.
19 lines
504 B
Rust
19 lines
504 B
Rust
macro_rules! assert_keys {
|
|
($db:expr, $($query:expr => ($($key:expr),*),)*) => {
|
|
$(
|
|
let entries = $query.in_db(&$db).entries::<Vec<_>>();
|
|
let mut keys = entries.into_iter().map(|e| e.key).collect::<Vec<_>>();
|
|
keys.sort();
|
|
assert_eq!(keys, vec![$($key),*], "query {:?} had wrong keys", $query);
|
|
)*
|
|
};
|
|
}
|
|
|
|
mod db;
|
|
mod derived_tests;
|
|
mod discard_values;
|
|
mod group;
|
|
mod interned;
|
|
mod log;
|
|
mod shallow_constant_tests;
|
|
mod volatile_tests;
|