diff --git a/tests/baseline_compat/hyperon-mettalog_sanity/rust_tests.metta b/tests/baseline_compat/hyperon-mettalog_sanity/rust_tests.metta new file mode 100644 index 00000000000..86778d61fb3 --- /dev/null +++ b/tests/baseline_compat/hyperon-mettalog_sanity/rust_tests.metta @@ -0,0 +1,20 @@ +;; Basic evaluation + +!(assertEqualToResult (rust !(+ 1 2)) (3)) +!(assertEqualToResult (rust! (+ 1 2)) (3)) + +;; Rust uses a separate atomspace + +;; Match + +!(assertEqualToResult (rust (likes John Jane)) ()) +!(assertEqualToResult (rust !(match &self (likes John $who) $who)) (Jane)) +!(assertEqualToResult (rust! (match &self (likes John $who) $who)) (Jane)) +!(assertEqualToResult (match &self (likes John $who) $who) ()) + +;; Function evaluation + +!(assertEqualToResult (rust (= (foo $x) (+ $x 1))) ()) +!(assertEqualToResult (rust !(foo 1)) (2)) +!(assertEqualToResult (rust! (foo 1)) (2)) +!(assertEqualToResult (foo 1) ((foo 1)))