Add is_def_fn with 3 parameters.

This commit is contained in:
Stephen Chung
2023-03-30 16:43:15 +08:00
parent 2a98d38a7e
commit 34c7dabe44
4 changed files with 77 additions and 12 deletions

View File

@@ -108,6 +108,15 @@ fn test_method_call_typed() -> Result<(), Box<EvalAltResult>> {
TestStruct { x: 1002 }
);
assert!(engine.eval::<bool>(
r#"
fn "Test-Struct#ABC".foo(x) {
this.update(x);
}
is_def_fn("Test-Struct#ABC", "foo", 1)
"#
)?);
assert!(matches!(
*engine
.run(