Additional eval test
This commit is contained in:
parent
f4d3282090
commit
f28f4eab78
@ -390,6 +390,27 @@ fn chnurmek(a: Int): Int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
(chnurmek(5), chnurmek(0))
|
(chnurmek(5), chnurmek(0))
|
||||||
"#;
|
"#;
|
||||||
eval_assert(source, r#"(9999, 2)"#);
|
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))");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user