From 41d24c967eb5fce3f811fc567f60204c77dada15 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 8 Jan 2026 00:18:34 +0900 Subject: refactor: rewrite some tests in C --- tests/recursive_functions.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/recursive_functions.c (limited to 'tests/recursive_functions.c') diff --git a/tests/recursive_functions.c b/tests/recursive_functions.c new file mode 100644 index 0000000..b81824a --- /dev/null +++ b/tests/recursive_functions.c @@ -0,0 +1,13 @@ +#include + +int fib(int n) { + if (n <= 1) { + return 1; + } else { + return fib(n - 1) + fib(n - 2); + } +} + +int main() { + ASSERT_EQ(89, fib(10)); +} -- cgit v1.2.3-70-g09d2