ethers-rs/ethers-contract/ethers-contract-abigen/src/test/macros.rs

11 lines
296 B
Rust
Raw Normal View History

2020-05-26 09:37:31 +00:00
/// Asserts the result of an expansion matches source output.
///
/// # Panics
///
/// If the expanded source does not match the quoted source.
macro_rules! assert_quote {
($ex:expr, { $($t:tt)* } $(,)?) => {
assert_eq!($ex.to_string(), quote::quote! { $($t)* }.to_string())
};
}