mirror of
https://github.com/Noratrieb/dilaria.git
synced 2026-01-14 17:35:03 +01:00
fix return values
This commit is contained in:
parent
eaa2f3527c
commit
b063850b53
8 changed files with 64 additions and 15 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue