Better String parameter error message.

This commit is contained in:
Stephen Chung
2020-06-08 14:10:06 +08:00
parent 5fb4b04cb0
commit a4cabc1ac7
3 changed files with 7 additions and 3 deletions

View File

@@ -8,7 +8,7 @@ fn test_decrement() -> Result<(), Box<EvalAltResult>> {
assert!(matches!(
*engine.eval::<String>(r#"let s = "test"; s -= "ing"; s"#).expect_err("expects error"),
EvalAltResult::ErrorFunctionNotFound(err, _) if err == "- (string, string)"
EvalAltResult::ErrorFunctionNotFound(err, _) if err == "- (&str | ImmutableString, &str | ImmutableString)"
));
Ok(())