oasis_runtime_sdk/testing/
mod.rs

1//! Module which contains utilities useful for testing and development.
2
3pub mod keymanager;
4pub mod keys;
5pub mod mock;
6
7/// Constructs a BTreeMap where keys are coerced to strings, and values to cbor::Value.
8/// Syntax: `configmap! { "key" => value, ... }`.
9macro_rules! configmap {
10    // allow trailing comma
11    ( $($key:expr => $value:expr,)+ ) => (configmap!($($key => $value),+));
12    ( $($key:expr => $value:expr),* ) => {
13        {
14            let mut m = BTreeMap::new();
15            $( m.insert($key.to_string(), cbor::to_value($value)); )*
16            m
17        }
18    };
19}
20pub(crate) use configmap;