Additional eval test

This commit is contained in:
Greg Shuflin 2021-11-01 11:16:42 -07:00
parent f4d3282090
commit f28f4eab78

View File

@ -390,6 +390,27 @@ fn chnurmek(a: Int): Int {
}
(chnurmek(5), chnurmek(0))
"#;
"#;
eval_assert(source, r#"(9999, 2)"#);
let source = r#"
fn marbuk(a: Int, b: Int): (Int, Int) {
if a == 5 then {
if b == 6 then {
return (50, 50);
}
return (a, b + 1)
}
(a * 100, b * 100)
}
let x = marbuk(1, 1)
let y = marbuk(5, 1)
let z = marbuk(5, 6)
(x, y, z)
"#;
eval_assert(source, "((100, 100), (5, 2), (50, 50))");
}