1
0

Add VM test

This commit is contained in:
Jeff 2024-08-28 12:18:27 -04:00
parent 8043e24637
commit 5f186ade41

View File

@ -1430,6 +1430,13 @@ mod tests {
use super::*;
#[test]
fn dereference_deep_copy() {
let source = "let mut x = 42; let mut y = *x; y += 1; x";
assert_eq!(run(source), Ok(Some(Value::integer(42))));
}
#[test]
fn dereference_variable() {
let source = "let x = 42; let y = x; *y";