Wrap eval errors in ErrorInFunctionCall.

This commit is contained in:
Stephen Chung
2021-02-18 14:33:12 +08:00
parent f8a7ada2a2
commit 9a9adbefcc
3 changed files with 44 additions and 7 deletions

View File

@@ -106,7 +106,7 @@ fn test_max_operations_eval() -> Result<(), Box<EvalAltResult>> {
"#
)
.expect_err("should error"),
EvalAltResult::ErrorTooManyOperations(_)
EvalAltResult::ErrorInFunctionCall(_, _, err, _) if matches!(*err, EvalAltResult::ErrorTooManyOperations(_))
));
Ok(())