From 46e79e69ae866df88cb9442a7329c72662ed2db3 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 4 Oct 2025 15:33:07 +0900 Subject: refactor: rename test files --- tests/recursive_functions.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/recursive_functions.sh (limited to 'tests/recursive_functions.sh') diff --git a/tests/recursive_functions.sh b/tests/recursive_functions.sh new file mode 100644 index 0000000..709cfbe --- /dev/null +++ b/tests/recursive_functions.sh @@ -0,0 +1,15 @@ +test_exit_code 0 <<'EOF' +#include "../../helpers.h" + +int fib(int n) { + if (n <= 1) { + return 1; + } else { + return fib(n - 1) + fib(n - 2); + } +} + +int main() { + ASSERT_EQ(89, fib(10)); +} +EOF -- cgit v1.2.3-70-g09d2