fix tests
This commit is contained in:
parent
1e889cc604
commit
d3e0f12f69
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user