From d3e0f12f693d9713160af05bfda892cb4fe309a3 Mon Sep 17 00:00:00 2001 From: numzero Date: Sat, 19 Apr 2025 14:07:53 +0300 Subject: [PATCH] fix tests --- src/run.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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);