diff --git a/src/run.rs b/src/run.rs index 072dbd5..9632f93 100644 --- a/src/run.rs +++ b/src/run.rs @@ -213,10 +213,10 @@ mod tests { Some(ValueInner::Number(arg * arg)) }); assert_eq!( - ast::Expression::Call { + ast::Expression::Call(ast::Call { callee: "sqr".into(), args: vec![ast::Expression::Constant(ast::Constant::Number(7))], - } + }) .eval(&mut scope), Some(49.into()) ); @@ -278,13 +278,13 @@ mod tests { }); assert_eq!(scope.get("foo"), None); assert_eq!(scope.get("bar"), None); - ast::Statement::Call { + ast::Statement::Call(ast::Call { callee: "set".into(), args: vec![ ast::Expression::Constant(ast::Constant::String("foo".into())), ast::Expression::Constant(ast::Constant::Number(42)), ], - } + }) .exec(&mut scope); assert_eq!(scope.get("foo"), Some(42.into())); assert_eq!(scope.get("bar"), None);