1
0
dust/tests/root.rs

30 lines
448 B
Rust
Raw Normal View History

2024-02-16 15:23:33 +00:00
use dust_lang::*;
#[test]
fn returns_final_statement() {
assert_eq!(
interpret(
"
1
1 + 1
3
"
),
Ok(Value::Integer(3))
);
}
#[test]
fn return_statement() {
assert_eq!(
interpret(
"
return 1
1 + 1
3
"
),
Ok(Value::Integer(1))
);
}