Recursive fibonacci for testing deep recursion with branching
| 21 | |
| 22 | // Recursive fibonacci for testing deep recursion with branching |
| 23 | int recursive_fibonacci(int n) { |
| 24 | CTRACK; |
| 25 | if (n <= 1) { |
| 26 | test_helpers::sleep_ms(5); |
| 27 | return n; |
| 28 | } |
| 29 | test_helpers::sleep_ms(5); |
| 30 | return recursive_fibonacci(n - 1) + recursive_fibonacci(n - 2); |
| 31 | } |
| 32 | |
| 33 | // Diamond pattern helper functions |
| 34 | void diamond_leaf_d(int sleep_ms) { |
no test coverage detected