Simplify custom syntax test.

This commit is contained in:
Stephen Chung 2021-08-11 19:27:15 +08:00
parent 805163912d
commit d9f1f663ee

View File

@ -25,8 +25,8 @@ fn test_custom_syntax() -> Result<(), Box<EvalAltResult>> {
|context, inputs| { |context, inputs| {
let var_name = inputs[0].get_variable_name().unwrap().to_string(); let var_name = inputs[0].get_variable_name().unwrap().to_string();
let max = inputs[1].get_literal_value::<INT>().unwrap(); let max = inputs[1].get_literal_value::<INT>().unwrap();
let stmt = inputs.get(2).unwrap(); let stmt = &inputs[2];
let condition = inputs.get(3).unwrap(); let condition = &inputs[3];
context.scope_mut().push(var_name.clone(), 0 as INT); context.scope_mut().push(var_name.clone(), 0 as INT);