fix return values

This commit is contained in:
nora 2022-05-30 19:10:53 +02:00
parent eaa2f3527c
commit b063850b53
8 changed files with 64 additions and 15 deletions

View file

@ -43,7 +43,6 @@ print "correct3";
);
run_test!(
#[ignore]
parameters,
r#"
fn fancy_print(str) {
@ -67,7 +66,6 @@ print x;
);
run_test!(
#[ignore]
parameters_and_return,
r#"
fn add(a, b) {
@ -84,6 +82,28 @@ if added == 6 {
"#
);
run_test!(
#[ignore]
nested_calls,
r#"
fn cooler_add(a, b) {
return a + b;
}
fn add(a, b) {
return cooler_add(a, b);
}
let added = add(1, 5);
if added == 6 {
print "correct";
} else {
print "FAILED";
}
"#
);
run_test!(
#[ignore]
fib5,