pub fn test<F, O>(f: F) -> Result<O>
Expand description
Construct an empty macro context which can be used for testing.
ยงExamples
use rune::ast;
use rune::macros;
macros::test(|cx| {
let lit = cx.lit("hello world")?;
assert!(matches!(lit, ast::Lit::Str(..)));
Ok(())
})?;