feat: add new tests
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
fn fib(int n) int
|
||||
{
|
||||
if (n <= 1)
|
||||
return n;
|
||||
|
||||
return fib(n - 1) + fib(n - 2);
|
||||
}
|
||||
|
||||
fn sum(uint a, uint b) uint
|
||||
{
|
||||
return a + b;
|
||||
}
|
||||
|
||||
if (fib(7) == 13 && sum(2, 2) == 4)
|
||||
printline("functions passed");
|
||||
else
|
||||
{
|
||||
printline("functions failed");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user