MCPcopy Create free account
hub / github.com/catchorg/Catch2 / Fibonacci

Function Fibonacci

tests/SelfTest/UsageTests/Benchmark.tests.cpp:18–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16
17namespace {
18 std::uint64_t Fibonacci(std::uint64_t number) {
19 return number < 2 ? number : Fibonacci(number - 1) + Fibonacci(number - 2);
20 }
21}
22
23TEST_CASE("Benchmark Fibonacci", "[!benchmark]") {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected