test: add fibonacci golden test, expand GOLDEN_TESTS

This commit is contained in:
2026-06-07 16:10:05 +03:00
parent e1038059c2
commit 9dd964dc48
4 changed files with 2997 additions and 1 deletions
+6
View File
@@ -0,0 +1,6 @@
[Package]
Name = "fibonacci"
Version = "0.1.0"
Type = "bin"
[Build]
Output = "Bin"
File diff suppressed because it is too large Load Diff
+23
View File
@@ -0,0 +1,23 @@
// Fibonacci - Recursive function with while loop
import Std::Io::{PrintLine};
import Std::Fmt::{Fmt_Fmt1};
func Fibonacci(n: int) -> int {
if n <= 1 {
return n;
}
return Fibonacci(n - 1) + Fibonacci(n - 2);
}
func Main() -> int {
PrintLine("Fibonacci sequence:");
var i: int = 0;
while i < 10 {
let fib: int = Fibonacci(i);
PrintLine(Fmt_Fmt1("{0}", String_FromInt(fib)));
i = i + 1;
}
return 0;
}